We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
shallow copy, wrong shallow copy type, destructuring map class
https://www.typescriptlang.org/play/?ts=5.5.3#code/MYewdgzgLgBAhjAvDMBTA7jAsnADgCgEoBuAKFElgCMkYBvAOibgF9zwIQAbVBrkAOb4qDAaiiEgA
const a = new Map(); const b = {...a} console.log(b.get)
According to types, b.get is defined, but it is actually undefined
b.get
undefined
b should not have methods of Map class after shallow copying it
b
Map
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #53765 / #53747. Used search terms: spread map in:title
spread map in:title
The relevant issue for this is #9726.
Sorry, something went wrong.
No branches or pull requests
π Search Terms
shallow copy, wrong shallow copy type, destructuring map class
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.3#code/MYewdgzgLgBAhjAvDMBTA7jAsnADgCgEoBuAKFElgCMkYBvAOibgF9zwIQAbVBrkAOb4qDAaiiEgA
π» Code
π Actual behavior
According to types,
b.get
is defined, but it is actuallyundefined
π Expected behavior
b
should not have methods ofMap
class after shallow copying itAdditional information about the issue
No response
The text was updated successfully, but these errors were encountered: