mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
611 B
TypeScript
26 lines
611 B
TypeScript
//// [tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName.ts] ////
|
|
|
|
//// [instanceMemberWithComputedPropertyName.ts]
|
|
// https://github.com/microsoft/TypeScript/issues/30953
|
|
"use strict";
|
|
const x = 1;
|
|
class C {
|
|
[x] = true;
|
|
constructor() {
|
|
const { a, b } = { a: 1, b: 2 };
|
|
}
|
|
}
|
|
|
|
//// [instanceMemberWithComputedPropertyName.js]
|
|
// https://github.com/microsoft/TypeScript/issues/30953
|
|
"use strict";
|
|
var _a;
|
|
const x = 1;
|
|
class C {
|
|
constructor() {
|
|
this[_a] = true;
|
|
const { a, b } = { a: 1, b: 2 };
|
|
}
|
|
}
|
|
_a = x;
|