mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
411 B
TypeScript
25 lines
411 B
TypeScript
//// [tests/cases/conformance/classes/propertyMemberDeclarations/thisInInstanceMemberInitializer.ts] ////
|
|
|
|
//// [thisInInstanceMemberInitializer.ts]
|
|
class C {
|
|
x = this;
|
|
}
|
|
|
|
class D<T> {
|
|
x = this;
|
|
y: T;
|
|
}
|
|
|
|
//// [thisInInstanceMemberInitializer.js]
|
|
"use strict";
|
|
class C {
|
|
constructor() {
|
|
this.x = this;
|
|
}
|
|
}
|
|
class D {
|
|
constructor() {
|
|
this.x = this;
|
|
}
|
|
}
|