Why is this illegal in TypeScript?
interface numarr {
[i : number] : number;
}
var p : numarr = [3,6,8];
The compiler says "Cannot convert 'number[]' to 'numarr'."
I'm afraid I've misunderstood something quite basic here. I thought the point of the above interface was to describe an array of numbers indexed by numbers, which is exactly what [3,6,8] is.