Skip to content

Commit 2510c19

Browse files
Accepted baselines.
1 parent 6107e05 commit 2510c19

4 files changed

Lines changed: 203 additions & 0 deletions
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//// [taggedTemplatesWithTypeArguments2.ts]
2+
export interface SomethingTaggable {
3+
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
4+
}
5+
6+
export interface SomethingNewable {
7+
new <T>(...args: T[]): any;
8+
}
9+
10+
declare const tag: SomethingTaggable;
11+
12+
const a = new tag `${100} ${200}`<string>("hello", "world");
13+
14+
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
15+
16+
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
17+
18+
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
19+
20+
21+
//// [taggedTemplatesWithTypeArguments2.js]
22+
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));
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
=== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts ===
2+
export interface SomethingTaggable {
3+
>SomethingTaggable : Symbol(SomethingTaggable, Decl(taggedTemplatesWithTypeArguments2.ts, 0, 0))
4+
5+
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
6+
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 5))
7+
>t : Symbol(t, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 8))
8+
>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --))
9+
>args : Symbol(args, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 32))
10+
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 5))
11+
>SomethingNewable : Symbol(SomethingNewable, Decl(taggedTemplatesWithTypeArguments2.ts, 2, 1))
12+
}
13+
14+
export interface SomethingNewable {
15+
>SomethingNewable : Symbol(SomethingNewable, Decl(taggedTemplatesWithTypeArguments2.ts, 2, 1))
16+
17+
new <T>(...args: T[]): any;
18+
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 9))
19+
>args : Symbol(args, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 12))
20+
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 9))
21+
}
22+
23+
declare const tag: SomethingTaggable;
24+
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
25+
>SomethingTaggable : Symbol(SomethingTaggable, Decl(taggedTemplatesWithTypeArguments2.ts, 0, 0))
26+
27+
const a = new tag `${100} ${200}`<string>("hello", "world");
28+
>a : Symbol(a, Decl(taggedTemplatesWithTypeArguments2.ts, 10, 5))
29+
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
30+
31+
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
32+
>b : Symbol(b, Decl(taggedTemplatesWithTypeArguments2.ts, 12, 5))
33+
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
34+
35+
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
36+
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments2.ts, 14, 5))
37+
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
38+
39+
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
40+
>d : Symbol(d, Decl(taggedTemplatesWithTypeArguments2.ts, 16, 5))
41+
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
42+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
=== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts ===
2+
export interface SomethingTaggable {
3+
>SomethingTaggable : SomethingTaggable
4+
5+
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
6+
>T : T
7+
>t : TemplateStringsArray
8+
>TemplateStringsArray : TemplateStringsArray
9+
>args : T[]
10+
>T : T
11+
>SomethingNewable : SomethingNewable
12+
}
13+
14+
export interface SomethingNewable {
15+
>SomethingNewable : SomethingNewable
16+
17+
new <T>(...args: T[]): any;
18+
>T : T
19+
>args : T[]
20+
>T : T
21+
}
22+
23+
declare const tag: SomethingTaggable;
24+
>tag : SomethingTaggable
25+
>SomethingTaggable : SomethingTaggable
26+
27+
const a = new tag `${100} ${200}`<string>("hello", "world");
28+
>a : any
29+
>new tag `${100} ${200}`<string>("hello", "world") : any
30+
>tag `${100} ${200}` : SomethingNewable
31+
>tag : SomethingTaggable
32+
>`${100} ${200}` : string
33+
>100 : 100
34+
>200 : 200
35+
>"hello" : "hello"
36+
>"world" : "world"
37+
38+
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
39+
>b : any
40+
>new tag<number> `${"hello"} ${"world"}`(100, 200) : any
41+
>tag : SomethingTaggable
42+
>`${"hello"} ${"world"}`(100, 200) : any
43+
>`${"hello"} ${"world"}` : string
44+
>"hello" : "hello"
45+
>"world" : "world"
46+
>100 : 100
47+
>200 : 200
48+
49+
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
50+
>c : any
51+
>new tag<number> `${100} ${200}`<string>("hello", "world") : any
52+
>tag : SomethingTaggable
53+
>`${100} ${200}`<string>("hello", "world") : any
54+
>`${100} ${200}` : string
55+
>100 : 100
56+
>200 : 200
57+
>"hello" : "hello"
58+
>"world" : "world"
59+
60+
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
61+
>d : any
62+
>new tag<number> `${"hello"} ${"world"}`<string>(100, 200) : any
63+
>tag : SomethingTaggable
64+
>`${"hello"} ${"world"}`<string>(100, 200) : any
65+
>`${"hello"} ${"world"}` : string
66+
>"hello" : "hello"
67+
>"world" : "world"
68+
>100 : 100
69+
>200 : 200
70+

0 commit comments

Comments
 (0)