TypeScript/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts

17 lines
257 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
class C {
x = 1;
}
var c = new C();
c.x = 3;
var c2 = new C();
var r = c.x === c2.x;
// #31792
class MyMap<K, V> {
constructor(private readonly Map_: { new<K, V>(): any }) {}
private readonly store = new this.Map_<K, V>();
}