TypeScript/tests/baselines/reference/templateStringInObjectLiteral.js
LowR cd0434aa76
fix(39744): make template literals more spec compliant (#45304)
* fix(39744): make template literals more spec compliant

* Add evaluation test for template literals

* Add test for template literals with source map
2021-10-13 12:03:31 -07:00

16 lines
458 B
TypeScript

//// [templateStringInObjectLiteral.ts]
var x = {
a: `abc${ 123 }def`,
`b`: 321
}
//// [templateStringInObjectLiteral.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var x = {
a: "abc".concat(123, "def")
}(__makeTemplateObject(["b"], ["b"]));
321;