|
| 1 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,11): error TS2350: Only a void function can be called with the 'new' keyword. |
| 2 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 3 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,27): error TS1005: '(' expected. |
| 4 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 5 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,60): error TS1005: ')' expected. |
| 6 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS2350: Only a void function can be called with the 'new' keyword. |
| 7 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 8 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,27): error TS1005: '(' expected. |
| 9 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 10 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,68): error TS1005: ')' expected. |
| 11 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,11): error TS2350: Only a void function can be called with the 'new' keyword. |
| 12 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 13 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,27): error TS1005: '(' expected. |
| 14 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 15 | +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,68): error TS1005: ')' expected. |
| 16 | + |
| 17 | + |
| 18 | +==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (15 errors) ==== |
| 19 | + export interface SomethingTaggable { |
| 20 | + <T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable; |
| 21 | + } |
| 22 | + |
| 23 | + export interface SomethingNewable { |
| 24 | + new <T>(...args: T[]): any; |
| 25 | + } |
| 26 | + |
| 27 | + declare const tag: SomethingTaggable; |
| 28 | + |
| 29 | + const a = new tag `${100} ${200}`<string>("hello", "world"); |
| 30 | + |
| 31 | + const b = new tag<number> `${"hello"} ${"world"}`(100, 200); |
| 32 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 33 | +!!! error TS2350: Only a void function can be called with the 'new' keyword. |
| 34 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 35 | +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 36 | + ~~~ |
| 37 | +!!! error TS1005: '(' expected. |
| 38 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 39 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 40 | + ~ |
| 41 | +!!! error TS1005: ')' expected. |
| 42 | + |
| 43 | + const c = new tag<number> `${100} ${200}`<string>("hello", "world"); |
| 44 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 45 | +!!! error TS2350: Only a void function can be called with the 'new' keyword. |
| 46 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 47 | +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 48 | + ~~~ |
| 49 | +!!! error TS1005: '(' expected. |
| 50 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 51 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 52 | + ~ |
| 53 | +!!! error TS1005: ')' expected. |
| 54 | + |
| 55 | + const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200); |
| 56 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 57 | +!!! error TS2350: Only a void function can be called with the 'new' keyword. |
| 58 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 59 | +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. |
| 60 | + ~~~ |
| 61 | +!!! error TS1005: '(' expected. |
| 62 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 63 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 64 | + ~ |
| 65 | +!!! error TS1005: ')' expected. |
| 66 | + |
0 commit comments