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
@mhegazy I'm not sure I understand if that implies that the code example is incorrect. If so, can you point out how the code should be changed to avoid the error?
freeze is defined to use a mapped Readonly. Mapped types generate a copy of the type using known keys (i.e. keyof Foo in this example). Since it is "property" | string and string is a super type of "property", "property" gets lost, and the new type created is missing the known property..
so long story short, this behaves as designed, but we need to revisit the design.
See microsoft/vscode#16819
TypeScript Version: typescript@2.1.4-insiders.20161206
Code
Expected behavior:
No erros are shown in the vscode editor
Actual behavior:
The error goes away if property or the index is removed from Foo.
The text was updated successfully, but these errors were encountered: