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
The construct signature for WeakMap at the moment is:
new<K,V>(): WeakMap<K,V>;
which is why this is allowed. We don't currently have a way to specify that K must be an object type but not a primitive, but such a feature has been suggested in #1809.
The type checker shouldn't accept this:
A key must be of type "Object".
The text was updated successfully, but these errors were encountered: