swc/crates/swc_ecma_parser/tests/tsc/computedPropertyNames11_ES5.ts

17 lines
385 B
TypeScript

// @target: es5
var s: string;
var n: number;
var a: any;
var v = {
get [s]() { return 0; },
set [n](v) { },
get [s + s]() { return 0; },
set [s + n](v) { },
get [+s]() { return 0; },
set [""](v) { },
get [0]() { return 0; },
set [a](v) { },
get [<any>true]() { return 0; },
set [`hello bye`](v) { },
get [`hello ${a} bye`]() { return 0; }
}