Reported in the IRC channel against 1.7.5. Still exists in 1.8.0-dev.20160117
foo.ts(1,5): error TS2322: Type 'undefined[]' is not assignable to type '[number]'.
Property '0' is missing in type 'undefined[]'.
I guess undefined comes from the fact that the RHS array is empty, so its element type is left uninitialized. Maybe you want to detect that and have a different error message? "An empty array is not assignable to type [number]." or something.
Reported in the IRC channel against 1.7.5. Still exists in 1.8.0-dev.20160117
I guess
undefinedcomes from the fact that the RHS array is empty, so its element type is left uninitialized. Maybe you want to detect that and have a different error message? "An empty array is not assignable to type [number]." or something.