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

Destructuring function expression (without invocation) does not report #2612

Closed
minedeljkovic opened this issue Oct 11, 2016 · 3 comments
Closed
Labels

Comments

@minedeljkovic
Copy link

Examples:

Tuple (motivating example):
Try

function foo(): [number, string] { return [1, ''] }
const [a, b] = foo // should report missing function invocation

Ordinary array too, if elements are destructured without rest:
Try

function foo(): [number] { return [1, 2] }
const [a] = foo // should report missing function invocation

But with rest it reports:
Try

function foo(): [number] { return [1, 2] }
const [a, ...b] = foo // reports missing function invocation

Function return type makes no difference:
Try

function foo(): number { return 1 }
const [a] = foo // should report missing function invocation
@vkurchatkin
Copy link
Contributor

Probably related: #1512

@gkz
Copy link
Member

gkz commented Dec 11, 2023

Fixed in 80ca16f

@gkz gkz closed this as completed Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants