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
TypeScript Version: 3.9.2 (doesn't work in any version I tested, including 4)
Search Terms:
higher order function return value object excess property check
Code
interfaceFoo{foo: {bar: number}}// Error for unknown property buzconstgetFoo=(): Foo=>({foo: {bar: 1,buz: 2,}})// Typeing should be the same. Autocomplete works, but no error is shown for the excessive property buzconstgetFoo3=(): ()=>Foo=>()=>({foo: {bar: 1,buz: 2}})// Same problem as above. The issue doesn't seem to be directly related to higher order functionsconstgetFoo2: ()=>Foo=()=>({foo: {bar: 1,buz: 2,}})
Expected behavior:
Error should be thrown for the excess property in all cases.
Actual behavior:
Error for excess properties is only thrown, when the return value of the function is directly typed.
TypeScript Version: 3.9.2 (doesn't work in any version I tested, including 4)
Search Terms:
higher order function return value object excess property check
Code
Expected behavior:
Error should be thrown for the excess property in all cases.
Actual behavior:
Error for excess properties is only thrown, when the return value of the function is directly typed.
Playground Link
Related Issues: -
The text was updated successfully, but these errors were encountered: