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
When spreading a Map, the resulting object is also considered a Map, allowing to call all the Map methods on it even though they aren't inherited.
Map
const map: Map<number, string> = new Map(); const spread = { ...map }; spread.has(0) // -> spread.has is not a function
Is this intended, and is there a compiler option that would result in an error here?
The text was updated successfully, but these errors were encountered:
#28801
#9726
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
When spreading a
Map
, the resulting object is also considered aMap
, allowing to call all theMap
methods on it even though they aren't inherited.Is this intended, and is there a compiler option that would result in an error here?
The text was updated successfully, but these errors were encountered: