You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A *self-contained* demonstration of the problem follows...// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
Expected behavior:
I expect this to work. I expect broken and works to both have the value of [0,1,2,3]
Actual behavior:
The broken line gives me this error:
[tsl] ERROR in /mnt/src/main.ts(6,7)
TS2739: Type 'number[]' is missing the following properties from type '[number, number, number, number]': 0, 1, 2, 3
The new issue template asks for search terms and related issues in order to help the team (which I'm not part of, just a nosy bystander here 🙋♂️👋) triage and respond to them.
This is likely a duplicate of #27859; tuples don't currently preserve their tuple-ness when spread.
I am trying to do a simple spread operator but I am getting typescript errors.
TypeScript Version: 3.8.3
Code
Expected behavior:
I expect this to work. I expect broken and works to both have the value of [0,1,2,3]
Actual behavior:
The broken line gives me this error:
Playground Link:
Playground Link
Related Issues:
The text was updated successfully, but these errors were encountered: