cd0434aa76
* fix(39744): make template literals more spec compliant * Add evaluation test for template literals * Add test for template literals with source map
15 lines
411 B
TypeScript
15 lines
411 B
TypeScript
//// [templateLiteralsInTypes.ts]
|
|
const f = (hdr: string, val: number) => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n`;
|
|
|
|
f("x").foo;
|
|
|
|
|
|
//// [templateLiteralsInTypes.js]
|
|
"use strict";
|
|
var f = function (hdr, val) { return "".concat(hdr, ":\t").concat(val, "\r\n"); };
|
|
f("x").foo;
|
|
|
|
|
|
//// [templateLiteralsInTypes.d.ts]
|
|
declare const f: (hdr: string, val: number) => `${string}:\t${number}\r\n`;
|