TypeScript/tests/cases/compiler/generics0.ts
2014-07-12 17:30:19 -07:00

8 lines
119 B
TypeScript

// @declaration: true
interface G<T> {
x: T;
}
var v2: G<string>;
var z = v2.x; // 'y' should be of type 'string'