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
index.ts(3,1): error TS2322: Type '{ id: number; }' is not assignable to type '{ id: string; }'.
Types of property 'id' are incompatible.
Type 'number' is not assignable to type 'string'.
Actual behavior:
The error is
index.ts(3,1): error TS2719: Type '{ id: any; }' is not assignable to type '{ id: any; }'. Two different types with this name exist, but they are unrelated.
Types of property 'id' are incompatible.
Type 'number' is not assignable to type 'string'.
And the reported type on hover is also not correct
TypeScript Version: 2.7.1, 2.8.0-dev.20180204
Search Terms: type inference, indexed type
Code
Expected behavior:
The error should be (as in 2.6)
Actual behavior:
The error is
And the reported type on hover is also not correct
Playground Link: link
Related Issues:
The text was updated successfully, but these errors were encountered: