Skip to content

Commit 6107e05

Browse files
Added test for tagged templates in new expressions.
1 parent fe8615d commit 6107e05

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @target: esnext
2+
// @strict: true
3+
4+
export interface SomethingTaggable {
5+
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
6+
}
7+
8+
export interface SomethingNewable {
9+
new <T>(...args: T[]): any;
10+
}
11+
12+
declare const tag: SomethingTaggable;
13+
14+
const a = new tag `${100} ${200}`<string>("hello", "world");
15+
16+
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
17+
18+
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
19+
20+
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);

0 commit comments

Comments
 (0)