cd0434aa76
* fix(39744): make template literals more spec compliant * Add evaluation test for template literals * Add test for template literals with source map
37 lines
782 B
TypeScript
37 lines
782 B
TypeScript
//// [computedPropertyNames10_ES5.ts]
|
|
var s: string;
|
|
var n: number;
|
|
var a: any;
|
|
var v = {
|
|
[s]() { },
|
|
[n]() { },
|
|
[s + s]() { },
|
|
[s + n]() { },
|
|
[+s]() { },
|
|
[""]() { },
|
|
[0]() { },
|
|
[a]() { },
|
|
[<any>true]() { },
|
|
[`hello bye`]() { },
|
|
[`hello ${a} bye`]() { }
|
|
}
|
|
|
|
//// [computedPropertyNames10_ES5.js]
|
|
var _a;
|
|
var s;
|
|
var n;
|
|
var a;
|
|
var v = (_a = {},
|
|
_a[s] = function () { },
|
|
_a[n] = function () { },
|
|
_a[s + s] = function () { },
|
|
_a[s + n] = function () { },
|
|
_a[+s] = function () { },
|
|
_a[""] = function () { },
|
|
_a[0] = function () { },
|
|
_a[a] = function () { },
|
|
_a[true] = function () { },
|
|
_a["hello bye"] = function () { },
|
|
_a["hello ".concat(a, " bye")] = function () { },
|
|
_a);
|