basarat / basarat/typescript-book
Spread parameters
Open
bug
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
In the book, this code is demonstrated :
``` ts
function foo(x, y, z) { }
var args = [0, 1, 2];
foo(...args);
```
This is perfectly valid ES6 code, however AFAIK the TS compiler reports an error per https://github.com/Microsoft/TypeScript/issues/5296
Contributor guide
Research direction
Find the book section containing the “Spread parameters” example and review the linked TypeScript issue #5296. Reproduce the snippet with the TypeScript compiler to confirm the reported error, then clarify or correct the example so the documented behavior matches the compiler and ES6 support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100