mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35 lines
513 B
TypeScript
35 lines
513 B
TypeScript
//// [tests/cases/compiler/jsDeclarationEmitThisAssignment.ts] ////
|
|
|
|
//// [main.js]
|
|
export class Foo {
|
|
static {
|
|
this.bar = 10;
|
|
}
|
|
|
|
constructor() {
|
|
this.baz = "hello";
|
|
}
|
|
}
|
|
|
|
export class Bar {
|
|
constructor() {
|
|
this.x = 42;
|
|
this.y = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
//// [main.d.ts]
|
|
export declare class Foo {
|
|
static bar: number | undefined;
|
|
baz: string;
|
|
constructor();
|
|
}
|
|
export declare class Bar {
|
|
x: number;
|
|
y: boolean;
|
|
constructor();
|
|
}
|