Added test for tagged templates in new expressions.

This commit is contained in:
Daniel Rosenwasser 2018-04-15 15:56:59 -07:00
parent fe8615d0a8
commit 6107e05e8c

View file

@ -0,0 +1,20 @@
// @target: esnext
// @strict: true
export interface SomethingTaggable {
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
}
export interface SomethingNewable {
new <T>(...args: T[]): any;
}
declare const tag: SomethingTaggable;
const a = new tag `${100} ${200}`<string>("hello", "world");
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);