-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
TypeScript Version: 3.8.0-dev.20191026
Search Terms:
- array destructuring object
- array destructure assign
Code
let bar = [1, 2, 3]
let foo: any[] = { ...bar }
console.log(Array.isArray(foo)) // false
Expected behavior: Typescript errors about type mismatch.
Actual behavior: Typescript does neither warn nor error about this and foo
is no longer an array.
Related Issues: #14768
jogibear9988, cscleison, DetachHead, yuriy-sng and bezrodnov
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed