stc
stc copied to clipboard
Type inference should also be correct for more than a two-dimensional array.
In this case:
let a= [[2]];
a;
The TSC infers this case to be let a: number[][], link
but the current STC infers
x Type
,-[$DIR/tests/pass/vars/typeAnn/tuple/2.ts:1:1]
1 | let a = [[1]];
2 | a;
: ^
`----
Error:
> [number][]
in my opinion, it should be inferred like TSC for more than two-dimensional arrays.