We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.6.0
new Map()
Related #41, and specifically - this bug was introduced in #53.
Previously (when new Map() returned a Map<any, any>) - this would have worked:
Map<any, any>
function expectsBooleanMap(map: Map<string, boolean>) {} expectsBooleanMap(new Map());
But with 0.6.0 it no longer works!
error TS2345: Argument of type 'Map<unknown, unknown>' is not assignable to parameter of type 'Map<string, boolean>'.
This also reproduces with usages such as:
const map: Map<string, boolean> = new Map(); const map = new Map() satisfies Map<string, boolean>;
The text was updated successfully, but these errors were encountered:
Map<unknown, unknown>
Can confirm, after upgrade most new Map()s return a type error now, before they were type inferred properly.
(needed to revert to previous version)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Related #41, and specifically - this bug was introduced in #53.
Previously (when
new Map()
returned aMap<any, any>
) - this would have worked:But with
0.6.0
it no longer works!This also reproduces with usages such as:
The text was updated successfully, but these errors were encountered: