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
src/a.ts(2,10): error TS2345: Argument of type '{ foo: (v: string) => boolean; }' is not assignable to parameter of type '{ foo: (val: {}) => boolean; }'.
Types of property 'foo' are incompatible.
Type '(v: string) => boolean' is not assignable to type '(val: {}) => boolean'.
Types of parameters 'v' and 'val' are incompatible.
Type '{}' is not assignable to type 'string'.
Worked in 2.7.0-dev.20180116.
Detected in lodash on DefinitelyTyped.
The text was updated successfully, but these errors were encountered:
@ahejlsberg It looks like this is a change from #21157. If I run git revert 1ae0b461f88e9a68c2b2ad51519611a2cc292fec (the first commit in that PR) I can compile without errors when testing with a local build.
TypeScript Version: 2.7.0-dev.20180118
Code
Expected behavior:
No error.
T
is inferred as{ foo: string }
.Actual behavior:
T
is inferred as{ foo: {} }
.Worked in 2.7.0-dev.20180116.
Detected in
lodash
on DefinitelyTyped.The text was updated successfully, but these errors were encountered: