mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
31 lines
626 B
TypeScript
31 lines
626 B
TypeScript
//// [tests/cases/compiler/declarationEmitMultipleComputedNamesSameDomain.ts] ////
|
|
|
|
//// [declarationEmitMultipleComputedNamesSameDomain.ts]
|
|
declare const x: string;
|
|
declare const y: "y";
|
|
|
|
export class Test {
|
|
[x] = 10;
|
|
[y] = 10;
|
|
}
|
|
|
|
//// [declarationEmitMultipleComputedNamesSameDomain.js]
|
|
var _a, _b;
|
|
export class Test {
|
|
constructor() {
|
|
this[_a] = 10;
|
|
this[_b] = 10;
|
|
}
|
|
}
|
|
_a = x, _b = y;
|
|
|
|
|
|
//// [declarationEmitMultipleComputedNamesSameDomain.d.ts]
|
|
declare const x: string;
|
|
declare const y: "y";
|
|
export declare class Test {
|
|
[x]: number;
|
|
[y]: number;
|
|
}
|
|
export {};
|