Closed
Description
type MapThing<T> = {
[x: string]: T; // Property 'length' of type 'number' is not assignable to string index type 'T'.
length: number;
}
let a: MapThing<number>;
let b: MapThing<string>;
interface MapThingi<T> {
[x: string]: T; // Property 'length' of type 'number' is not assignable to string index type 'T'.
length: number;
}
let c: MapThingi<number>;
let d: MapThingi<string>;
A type parameter on an indexer is checked eagerly, should happen on instantiation.