Skip to content

Commit a2073f1

Browse files
Accepted baselines.
1 parent eb8eeaf commit a2073f1

File tree

3 files changed

+17
-51
lines changed

3 files changed

+17
-51
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
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.
1+
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,30): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
2+
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS2347: Untyped function calls may not accept type arguments.
3+
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,30): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
164

175

18-
==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (15 errors) ====
6+
==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (3 errors) ====
197
export interface SomethingTaggable {
208
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
219
}
@@ -29,38 +17,14 @@ tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,68
2917
const a = new tag `${100} ${200}`<string>("hello", "world");
3018

3119
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.
20+
~~~~~~~
21+
!!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
4222

4323
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
4424
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
25+
!!! error TS2347: Untyped function calls may not accept type arguments.
5426

5527
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.
28+
~~~~~~~
29+
!!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
6630

tests/baselines/reference/taggedTemplatesWithTypeArguments2.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
2020

2121
//// [taggedTemplatesWithTypeArguments2.js]
2222
const a = new tag `${100} ${200}`("hello", "world");
23-
const b = new tag(`${"hello"} ${"world"}`(100, 200));
24-
const c = new tag(`${100} ${200}`("hello", "world"));
25-
const d = new tag(`${"hello"} ${"world"}`(100, 200));
23+
const b = new tag `${"hello"} ${"world"}`(100, 200);
24+
const c = (new tag `${100} ${200}`)("hello", "world");
25+
const d = (new tag `${"hello"} ${"world"}`)(100, 200);

tests/baselines/reference/taggedTemplatesWithTypeArguments2.types

+5-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const a = new tag `${100} ${200}`<string>("hello", "world");
3838
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
3939
>b : any
4040
>new tag<number> `${"hello"} ${"world"}`(100, 200) : any
41+
>tag<number> `${"hello"} ${"world"}` : any
4142
>tag : SomethingTaggable
42-
>`${"hello"} ${"world"}`(100, 200) : any
4343
>`${"hello"} ${"world"}` : string
4444
>"hello" : "hello"
4545
>"world" : "world"
@@ -49,8 +49,9 @@ const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
4949
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
5050
>c : any
5151
>new tag<number> `${100} ${200}`<string>("hello", "world") : any
52+
>new tag<number> `${100} ${200}` : any
53+
>tag<number> `${100} ${200}` : SomethingNewable
5254
>tag : SomethingTaggable
53-
>`${100} ${200}`<string>("hello", "world") : any
5455
>`${100} ${200}` : string
5556
>100 : 100
5657
>200 : 200
@@ -60,8 +61,9 @@ const c = new tag<number> `${100} ${200}`<string>("hello", "world");
6061
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
6162
>d : any
6263
>new tag<number> `${"hello"} ${"world"}`<string>(100, 200) : any
64+
>new tag<number> `${"hello"} ${"world"}` : any
65+
>tag<number> `${"hello"} ${"world"}` : any
6366
>tag : SomethingTaggable
64-
>`${"hello"} ${"world"}`<string>(100, 200) : any
6567
>`${"hello"} ${"world"}` : string
6668
>"hello" : "hello"
6769
>"world" : "world"

0 commit comments

Comments
 (0)