You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceFoo{key: stringvalue: string}constshouldFail0: Partial<Foo>=''// does not failconstshouldPass0: Partial<Foo>={}// does not failconstshouldFail1: Partial<Foo>={ker: ''}// failsinterfaceBar{(): Partial<Foo>}constshouldFail2: Bar=()=>({car: ''})// does not failsconstshouldFail3: Bar=()=>('')// does not failsconstshouldFail4: Bar=()=>{returnundefined}// fails
TypeScript Version: 2.3.4
Code
I've setup a typescript playground example.
Expected behavior:
Partial type should not pass for values that are strings or incorrect objects.
Actual behavior:
Partial type passes for values that are strings and incorrect objects.
The text was updated successfully, but these errors were encountered: