Added test for tagged templates in new expressions.
This commit is contained in:
parent
fe8615d0a8
commit
6107e05e8c
|
@ -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);
|
Loading…
Reference in a new issue