When looking at the following code:
const xyz: [string, number] = [10, "sample"];
console.log(xyz);
An unexpected red squiggly line appears under 'xyz' with the error message:
[ts] Type '[number, string]' is not compatible with type '[string, number]'. Type 'number' is not compatible with type 'string'.
Despite this error, the code still compiles down to JavaScript like this:
var xyz = [10, "sample"];
console.log(xyz);
Is there a compiler option that I may have missed, or could this be a bug?