Skip to content

Commit 253253d

Browse files
Merge pull request #9855 from Microsoft/tsaImmutableTo-2.0
Port TemplateStringsArray immutability to release-2.0
2 parents 3721a2d + 6968ebf commit 253253d

File tree

45 files changed

+226
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+226
-190
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ interface NumberConstructor {
513513
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
514514
declare const Number: NumberConstructor;
515515

516-
interface TemplateStringsArray extends Array<string> {
517-
readonly raw: string[];
516+
interface TemplateStringsArray extends ReadonlyArray<string> {
517+
readonly raw: ReadonlyArray<string>
518518
}
519519

520520
interface Math {

tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,60 +13,60 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
1313
noParams ``;
1414

1515
// Generic tag with parameter which does not use type parameter
16-
function noGenericParams<T>(n: string[]) { }
16+
function noGenericParams<T>(n: TemplateStringsArray) { }
1717
noGenericParams ``;
1818

1919
// Generic tag with multiple type parameters and only one used in parameter type annotation
2020
function someGenerics1a<T, U>(n: T, m: number) { }
2121
someGenerics1a `${3}`;
2222

23-
function someGenerics1b<T, U>(n: string[], m: U) { }
23+
function someGenerics1b<T, U>(n: TemplateStringsArray, m: U) { }
2424
someGenerics1b `${3}`;
2525

2626
// Generic tag with argument of function type whose parameter is of type parameter type
27-
function someGenerics2a<T>(strs: string[], n: (x: T) => void) { }
27+
function someGenerics2a<T>(strs: TemplateStringsArray, n: (x: T) => void) { }
2828
someGenerics2a `${(n: string) => n}`;
2929

30-
function someGenerics2b<T, U>(strs: string[], n: (x: T, y: U) => void) { }
30+
function someGenerics2b<T, U>(strs: TemplateStringsArray, n: (x: T, y: U) => void) { }
3131
someGenerics2b `${ (n: string, x: number) => n }`;
3232

3333
// Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter
34-
function someGenerics3<T>(strs: string[], producer: () => T) { }
34+
function someGenerics3<T>(strs: TemplateStringsArray, producer: () => T) { }
3535
someGenerics3 `${() => ''}`;
3636
someGenerics3 `${() => undefined}`;
3737
someGenerics3 `${() => 3}`;
3838

3939
// 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type
40-
function someGenerics4<T, U>(strs: string[], n: T, f: (x: U) => void) { }
40+
function someGenerics4<T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
4141
someGenerics4 `${4}${ () => null }`;
4242
someGenerics4 `${''}${ () => 3 }`;
4343
someGenerics4 `${ null }${ null }`;
4444

4545
// 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type
46-
function someGenerics5<U, T>(strs: string[], n: T, f: (x: U) => void) { }
46+
function someGenerics5<U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
4747
someGenerics5 `${ 4 } ${ () => null }`;
4848
someGenerics5 `${ '' }${ () => 3 }`;
4949
someGenerics5 `${null}${null}`;
5050

5151
// Generic tag with multiple arguments of function types that each have parameters of the same generic type
52-
function someGenerics6<A>(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
52+
function someGenerics6<A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
5353
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
5454
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
5555
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
5656

5757
// Generic tag with multiple arguments of function types that each have parameters of different generic type
58-
function someGenerics7<A, B, C>(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
58+
function someGenerics7<A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
5959
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
6060
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
6161
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
6262

6363
// Generic tag with argument of generic function type
64-
function someGenerics8<T>(strs: string[], n: T): T { return n; }
64+
function someGenerics8<T>(strs: TemplateStringsArray, n: T): T { return n; }
6565
var x = someGenerics8 `${ someGenerics7 }`;
6666
x `${null}${null}${null}`;
6767

6868
// Generic tag with multiple parameters of generic type passed arguments with no best common type
69-
function someGenerics9<T>(strs: string[], a: T, b: T, c: T): T {
69+
function someGenerics9<T>(strs: TemplateStringsArray, a: T, b: T, c: T): T {
7070
return null;
7171
}
7272
var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`;

tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,60 @@ function noParams<T>(n: T) { }
66
noParams ``;
77

88
// Generic tag with parameter which does not use type parameter
9-
function noGenericParams<T>(n: string[]) { }
9+
function noGenericParams<T>(n: TemplateStringsArray) { }
1010
noGenericParams ``;
1111

1212
// Generic tag with multiple type parameters and only one used in parameter type annotation
1313
function someGenerics1a<T, U>(n: T, m: number) { }
1414
someGenerics1a `${3}`;
1515

16-
function someGenerics1b<T, U>(n: string[], m: U) { }
16+
function someGenerics1b<T, U>(n: TemplateStringsArray, m: U) { }
1717
someGenerics1b `${3}`;
1818

1919
// Generic tag with argument of function type whose parameter is of type parameter type
20-
function someGenerics2a<T>(strs: string[], n: (x: T) => void) { }
20+
function someGenerics2a<T>(strs: TemplateStringsArray, n: (x: T) => void) { }
2121
someGenerics2a `${(n: string) => n}`;
2222

23-
function someGenerics2b<T, U>(strs: string[], n: (x: T, y: U) => void) { }
23+
function someGenerics2b<T, U>(strs: TemplateStringsArray, n: (x: T, y: U) => void) { }
2424
someGenerics2b `${ (n: string, x: number) => n }`;
2525

2626
// Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter
27-
function someGenerics3<T>(strs: string[], producer: () => T) { }
27+
function someGenerics3<T>(strs: TemplateStringsArray, producer: () => T) { }
2828
someGenerics3 `${() => ''}`;
2929
someGenerics3 `${() => undefined}`;
3030
someGenerics3 `${() => 3}`;
3131

3232
// 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type
33-
function someGenerics4<T, U>(strs: string[], n: T, f: (x: U) => void) { }
33+
function someGenerics4<T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
3434
someGenerics4 `${4}${ () => null }`;
3535
someGenerics4 `${''}${ () => 3 }`;
3636
someGenerics4 `${ null }${ null }`;
3737

3838
// 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type
39-
function someGenerics5<U, T>(strs: string[], n: T, f: (x: U) => void) { }
39+
function someGenerics5<U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
4040
someGenerics5 `${ 4 } ${ () => null }`;
4141
someGenerics5 `${ '' }${ () => 3 }`;
4242
someGenerics5 `${null}${null}`;
4343

4444
// Generic tag with multiple arguments of function types that each have parameters of the same generic type
45-
function someGenerics6<A>(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
45+
function someGenerics6<A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
4646
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
4747
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
4848
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
4949

5050
// Generic tag with multiple arguments of function types that each have parameters of different generic type
51-
function someGenerics7<A, B, C>(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
51+
function someGenerics7<A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
5252
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
5353
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
5454
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
5555

5656
// Generic tag with argument of generic function type
57-
function someGenerics8<T>(strs: string[], n: T): T { return n; }
57+
function someGenerics8<T>(strs: TemplateStringsArray, n: T): T { return n; }
5858
var x = someGenerics8 `${ someGenerics7 }`;
5959
x `${null}${null}${null}`;
6060

6161
// Generic tag with multiple parameters of generic type passed arguments with no best common type
62-
function someGenerics9<T>(strs: string[], a: T, b: T, c: T): T {
62+
function someGenerics9<T>(strs: TemplateStringsArray, a: T, b: T, c: T): T {
6363
return null;
6464
}
6565
var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`;

tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,60 +12,60 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
1212
noParams ``;
1313

1414
// Generic tag with parameter which does not use type parameter
15-
function noGenericParams<T>(n: string[]) { }
15+
function noGenericParams<T>(n: TemplateStringsArray) { }
1616
noGenericParams ``;
1717

1818
// Generic tag with multiple type parameters and only one used in parameter type annotation
1919
function someGenerics1a<T, U>(n: T, m: number) { }
2020
someGenerics1a `${3}`;
2121

22-
function someGenerics1b<T, U>(n: string[], m: U) { }
22+
function someGenerics1b<T, U>(n: TemplateStringsArray, m: U) { }
2323
someGenerics1b `${3}`;
2424

2525
// Generic tag with argument of function type whose parameter is of type parameter type
26-
function someGenerics2a<T>(strs: string[], n: (x: T) => void) { }
26+
function someGenerics2a<T>(strs: TemplateStringsArray, n: (x: T) => void) { }
2727
someGenerics2a `${(n: string) => n}`;
2828

29-
function someGenerics2b<T, U>(strs: string[], n: (x: T, y: U) => void) { }
29+
function someGenerics2b<T, U>(strs: TemplateStringsArray, n: (x: T, y: U) => void) { }
3030
someGenerics2b `${ (n: string, x: number) => n }`;
3131

3232
// Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter
33-
function someGenerics3<T>(strs: string[], producer: () => T) { }
33+
function someGenerics3<T>(strs: TemplateStringsArray, producer: () => T) { }
3434
someGenerics3 `${() => ''}`;
3535
someGenerics3 `${() => undefined}`;
3636
someGenerics3 `${() => 3}`;
3737

3838
// 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type
39-
function someGenerics4<T, U>(strs: string[], n: T, f: (x: U) => void) { }
39+
function someGenerics4<T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
4040
someGenerics4 `${4}${ () => null }`;
4141
someGenerics4 `${''}${ () => 3 }`;
4242
someGenerics4 `${ null }${ null }`;
4343

4444
// 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type
45-
function someGenerics5<U, T>(strs: string[], n: T, f: (x: U) => void) { }
45+
function someGenerics5<U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
4646
someGenerics5 `${ 4 } ${ () => null }`;
4747
someGenerics5 `${ '' }${ () => 3 }`;
4848
someGenerics5 `${null}${null}`;
4949

5050
// Generic tag with multiple arguments of function types that each have parameters of the same generic type
51-
function someGenerics6<A>(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
51+
function someGenerics6<A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
5252
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
5353
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
5454
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
5555

5656
// Generic tag with multiple arguments of function types that each have parameters of different generic type
57-
function someGenerics7<A, B, C>(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
57+
function someGenerics7<A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
5858
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
5959
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
6060
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
6161

6262
// Generic tag with argument of generic function type
63-
function someGenerics8<T>(strs: string[], n: T): T { return n; }
63+
function someGenerics8<T>(strs: TemplateStringsArray, n: T): T { return n; }
6464
var x = someGenerics8 `${ someGenerics7 }`;
6565
x `${null}${null}${null}`;
6666

6767
// Generic tag with multiple parameters of generic type passed arguments with no best common type
68-
function someGenerics9<T>(strs: string[], a: T, b: T, c: T): T {
68+
function someGenerics9<T>(strs: TemplateStringsArray, a: T, b: T, c: T): T {
6969
return null;
7070
}
7171
var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`;

tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,60 @@ function noParams<T>(n: T) { }
55
noParams ``;
66

77
// Generic tag with parameter which does not use type parameter
8-
function noGenericParams<T>(n: string[]) { }
8+
function noGenericParams<T>(n: TemplateStringsArray) { }
99
noGenericParams ``;
1010

1111
// Generic tag with multiple type parameters and only one used in parameter type annotation
1212
function someGenerics1a<T, U>(n: T, m: number) { }
1313
someGenerics1a `${3}`;
1414

15-
function someGenerics1b<T, U>(n: string[], m: U) { }
15+
function someGenerics1b<T, U>(n: TemplateStringsArray, m: U) { }
1616
someGenerics1b `${3}`;
1717

1818
// Generic tag with argument of function type whose parameter is of type parameter type
19-
function someGenerics2a<T>(strs: string[], n: (x: T) => void) { }
19+
function someGenerics2a<T>(strs: TemplateStringsArray, n: (x: T) => void) { }
2020
someGenerics2a `${(n: string) => n}`;
2121

22-
function someGenerics2b<T, U>(strs: string[], n: (x: T, y: U) => void) { }
22+
function someGenerics2b<T, U>(strs: TemplateStringsArray, n: (x: T, y: U) => void) { }
2323
someGenerics2b `${ (n: string, x: number) => n }`;
2424

2525
// Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter
26-
function someGenerics3<T>(strs: string[], producer: () => T) { }
26+
function someGenerics3<T>(strs: TemplateStringsArray, producer: () => T) { }
2727
someGenerics3 `${() => ''}`;
2828
someGenerics3 `${() => undefined}`;
2929
someGenerics3 `${() => 3}`;
3030

3131
// 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type
32-
function someGenerics4<T, U>(strs: string[], n: T, f: (x: U) => void) { }
32+
function someGenerics4<T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
3333
someGenerics4 `${4}${ () => null }`;
3434
someGenerics4 `${''}${ () => 3 }`;
3535
someGenerics4 `${ null }${ null }`;
3636

3737
// 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type
38-
function someGenerics5<U, T>(strs: string[], n: T, f: (x: U) => void) { }
38+
function someGenerics5<U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) { }
3939
someGenerics5 `${ 4 } ${ () => null }`;
4040
someGenerics5 `${ '' }${ () => 3 }`;
4141
someGenerics5 `${null}${null}`;
4242

4343
// Generic tag with multiple arguments of function types that each have parameters of the same generic type
44-
function someGenerics6<A>(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
44+
function someGenerics6<A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { }
4545
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
4646
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
4747
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
4848

4949
// Generic tag with multiple arguments of function types that each have parameters of different generic type
50-
function someGenerics7<A, B, C>(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
50+
function someGenerics7<A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { }
5151
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
5252
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
5353
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
5454

5555
// Generic tag with argument of generic function type
56-
function someGenerics8<T>(strs: string[], n: T): T { return n; }
56+
function someGenerics8<T>(strs: TemplateStringsArray, n: T): T { return n; }
5757
var x = someGenerics8 `${ someGenerics7 }`;
5858
x `${null}${null}${null}`;
5959

6060
// Generic tag with multiple parameters of generic type passed arguments with no best common type
61-
function someGenerics9<T>(strs: string[], a: T, b: T, c: T): T {
61+
function someGenerics9<T>(strs: TemplateStringsArray, a: T, b: T, c: T): T {
6262
return null;
6363
}
6464
var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`;

tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped
88

99
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (6 errors) ====
1010
interface I {
11-
(stringParts: string[], ...rest: boolean[]): I;
11+
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
1212
g: I;
1313
h: I;
1414
member: I;

tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//// [taggedTemplateStringsWithIncompatibleTypedTags.ts]
22
interface I {
3-
(stringParts: string[], ...rest: boolean[]): I;
3+
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
44
g: I;
55
h: I;
66
member: I;

tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped
88

99
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts (6 errors) ====
1010
interface I {
11-
(stringParts: string[], ...rest: boolean[]): I;
11+
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
1212
g: I;
1313
h: I;
1414
member: I;

tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//// [taggedTemplateStringsWithIncompatibleTypedTagsES6.ts]
22
interface I {
3-
(stringParts: string[], ...rest: boolean[]): I;
3+
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
44
g: I;
55
h: I;
66
member: I;

tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//// [taggedTemplateStringsWithManyCallAndMemberExpressions.ts]
22
interface I {
3-
(strs: string[], ...subs: number[]): I;
3+
(strs: TemplateStringsArray, ...subs: number[]): I;
44
member: {
55
new (s: string): {
66
new (n: number): {

tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.symbols

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
interface I {
33
>I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 0, 0))
44

5-
(strs: string[], ...subs: number[]): I;
5+
(strs: TemplateStringsArray, ...subs: number[]): I;
66
>strs : Symbol(strs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 5))
7-
>subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 20))
7+
>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --))
8+
>subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 32))
89
>I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 0, 0))
910

1011
member: {
11-
>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43))
12+
>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55))
1213

1314
new (s: string): {
1415
>s : Symbol(s, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 3, 13))
@@ -27,8 +28,8 @@ var f: I;
2728

2829
var x = new new new f `abc${ 0 }def`.member("hello")(42) === true;
2930
>x : Symbol(x, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 12, 3))
30-
>f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43))
31+
>f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55))
3132
>f : Symbol(f, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 10, 3))
32-
>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43))
33+
>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55))
3334

3435

tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
interface I {
33
>I : I
44

5-
(strs: string[], ...subs: number[]): I;
6-
>strs : string[]
5+
(strs: TemplateStringsArray, ...subs: number[]): I;
6+
>strs : TemplateStringsArray
7+
>TemplateStringsArray : TemplateStringsArray
78
>subs : number[]
89
>I : I
910

0 commit comments

Comments
 (0)