Skip to content
New issue

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

Tuple spread #21

Closed
goodmind opened this issue Feb 20, 2018 · 2 comments
Closed

Tuple spread #21

goodmind opened this issue Feb 20, 2018 · 2 comments

Comments

@goodmind
Copy link

It's possibly to better open TypeScript issue, but since you added tuple length support I ask here.

const func = (x, y) => x + y;
const payload: [number, number] = [1, 2];
payload.length // 2
func(...payload);
// Expected 2 arguments, but got 0 or more.

Is this supposed to error even if we know tuple's length?

@KiaraGrouwstra
Copy link
Owner

KiaraGrouwstra commented Feb 22, 2018

@goodmind: This bug was reported at microsoft/TypeScript#4130 -- I tried a fix at microsoft/TypeScript#18004, though it was considered too hacky.

@goodmind
Copy link
Author

@tycho01 thanks, subscribed to both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants