We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code
const x = [1, [[2]]]; const y: never = x.flat();
Expected behavior: I expect the following error:
Type '(1 | [2])[]' is not assignable to type 'never'.
or with more general types,
Type '(number | number[])[]' is not assignable to type 'never'.
This should actually be pretty easy to implement by simply unwrapping the array type (see link below).
Actual behavior: I instead see
Type 'any[]' is not assignable to type 'never'.
Playground Link: Using the current definitions What I expect should happen
Related Issues: None found.
The text was updated successfully, but these errors were encountered:
Duplicate #29604 or at least just another case we should consider there when examining its definition
Sorry, something went wrong.
👁👁
I searched [Array flat definition] - apparently I should have left off "definition".
No branches or pull requests
Code
Expected behavior:
I expect the following error:
or with more general types,
This should actually be pretty easy to implement by simply unwrapping the array type (see link below).
Actual behavior:
I instead see
Playground Link:
Using the current definitions
What I expect should happen
Related Issues:
None found.
The text was updated successfully, but these errors were encountered: