I'm just learning typescript, and I noticed it doesn't have type safety for arrays when indexing by strings. It works as expected when indexing by number. Anyone explain this? I doubt its a bug but I can't find any information about this behavior. Thanks
let x : string[] = [];
x[0] = 'test'; // OK, as expected
x[0] = 123; // as expected, error TS2322: Type 'number' is not assignable to type 'string'.
x['hi'] = 123; // OK?? Expected error TS2322 as above
