-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
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.
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?
AnyhowStep, niftykins, Djaler, styfle and yekver
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created