diff --git a/tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts b/tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts new file mode 100644 index 00000000000..9c9bb8ee938 --- /dev/null +++ b/tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts @@ -0,0 +1,20 @@ +// @target: esnext +// @strict: true + +export interface SomethingTaggable { + (t: TemplateStringsArray, ...args: T[]): SomethingNewable; +} + +export interface SomethingNewable { + new (...args: T[]): any; +} + +declare const tag: SomethingTaggable; + +const a = new tag `${100} ${200}`("hello", "world"); + +const b = new tag `${"hello"} ${"world"}`(100, 200); + +const c = new tag `${100} ${200}`("hello", "world"); + +const d = new tag `${"hello"} ${"world"}`(100, 200);