diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 54ae1209cb3de..07b5395b4fbeb 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -513,8 +513,8 @@ interface NumberConstructor { /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare const Number: NumberConstructor; -interface TemplateStringsArray extends Array { - readonly raw: string[]; +interface TemplateStringsArray extends ReadonlyArray { + readonly raw: ReadonlyArray } interface Math { diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt index be5c21f1a0bc9..b345e971ab286 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt @@ -13,60 +13,60 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference noParams ``; // Generic tag with parameter which does not use type parameter - function noGenericParams(n: string[]) { } + function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; - function someGenerics1b(n: string[], m: U) { } + function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type - function someGenerics2a(strs: string[], n: (x: T) => void) { } + function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; - function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } + function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter - function someGenerics3(strs: string[], producer: () => T) { } + function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type - function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } + function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type - function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } + function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type - function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } + function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type - function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } + function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type - function someGenerics8(strs: string[], n: T): T { return n; } + function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type - function someGenerics9(strs: string[], a: T, b: T, c: T): T { + function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js index 1b6e3ab92c8c9..69dcd2841832a 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js @@ -6,60 +6,60 @@ function noParams(n: T) { } noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n: string[]) { } +function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; -function someGenerics1b(n: string[], m: U) { } +function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs: string[], n: (x: T) => void) { } +function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; -function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } +function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs: string[], producer: () => T) { } +function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } +function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } +function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs: string[], n: T): T { return n; } +function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type -function someGenerics9(strs: string[], a: T, b: T, c: T): T { +function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt index 63d04a42b3b76..619e5081a3be9 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt @@ -12,60 +12,60 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference noParams ``; // Generic tag with parameter which does not use type parameter - function noGenericParams(n: string[]) { } + function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; - function someGenerics1b(n: string[], m: U) { } + function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type - function someGenerics2a(strs: string[], n: (x: T) => void) { } + function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; - function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } + function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter - function someGenerics3(strs: string[], producer: () => T) { } + function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type - function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } + function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type - function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } + function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type - function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } + function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type - function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } + function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type - function someGenerics8(strs: string[], n: T): T { return n; } + function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type - function someGenerics9(strs: string[], a: T, b: T, c: T): T { + function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js index 2f57882b4b794..3097e40c9ad67 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js @@ -5,60 +5,60 @@ function noParams(n: T) { } noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n: string[]) { } +function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; -function someGenerics1b(n: string[], m: U) { } +function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs: string[], n: (x: T) => void) { } +function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; -function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } +function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs: string[], producer: () => T) { } +function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } +function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } +function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs: string[], n: T): T { return n; } +function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type -function someGenerics9(strs: string[], a: T, b: T, c: T): T { +function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt index 166769fbbf53d..44b30fb535fec 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt @@ -8,7 +8,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped ==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (6 errors) ==== interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js index 9d11379322834..511928e134244 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithIncompatibleTypedTags.ts] interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt index 89b48b0193cee..c2825c19e6373 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt @@ -8,7 +8,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped ==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts (6 errors) ==== interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.js b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.js index 8b63635606802..99fa7c3d5506a 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithIncompatibleTypedTagsES6.ts] interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.js b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.js index 1814816283bf1..a896a811ffbbe 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.js +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithManyCallAndMemberExpressions.ts] interface I { - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; member: { new (s: string): { new (n: number): { diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.symbols b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.symbols index 226729907def6..c8883fda4feb8 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.symbols @@ -2,13 +2,14 @@ interface I { >I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 0, 0)) - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; >strs : Symbol(strs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 5)) ->subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 20)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) +>subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 32)) >I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 0, 0)) member: { ->member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55)) new (s: string): { >s : Symbol(s, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 3, 13)) @@ -27,8 +28,8 @@ var f: I; var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >x : Symbol(x, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 12, 3)) ->f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43)) +>f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55)) >f : Symbol(f, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 10, 3)) ->member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 43)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressions.ts, 1, 55)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types index 83a0f2cf9f417..553cda2b2b983 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types @@ -2,8 +2,9 @@ interface I { >I : I - (strs: string[], ...subs: number[]): I; ->strs : string[] + (strs: TemplateStringsArray, ...subs: number[]): I; +>strs : TemplateStringsArray +>TemplateStringsArray : TemplateStringsArray >subs : number[] >I : I diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.js b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.js index b985860f0650a..f1acbaa1546a7 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts] interface I { - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; member: { new (s: string): { new (n: number): { diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.symbols b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.symbols index 6535e9988084a..0d163daa640e2 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.symbols @@ -2,13 +2,14 @@ interface I { >I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 0, 0)) - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; >strs : Symbol(strs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 5)) ->subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 20)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --)) +>subs : Symbol(subs, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 32)) >I : Symbol(I, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 0, 0)) member: { ->member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 43)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 55)) new (s: string): { >s : Symbol(s, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 3, 13)) @@ -27,8 +28,8 @@ var f: I; var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >x : Symbol(x, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 12, 3)) ->f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 43)) +>f `abc${ 0 }def`.member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 55)) >f : Symbol(f, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 10, 3)) ->member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 43)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts, 1, 55)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types index c240b7ced11f6..f9d7c605f7f18 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types @@ -2,8 +2,9 @@ interface I { >I : I - (strs: string[], ...subs: number[]): I; ->strs : string[] + (strs: TemplateStringsArray, ...subs: number[]): I; +>strs : TemplateStringsArray +>TemplateStringsArray : TemplateStringsArray >subs : number[] >I : I diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 9e450cbb36879..426eef8ce7fd3 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -1,25 +1,39 @@ -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(9,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. + Property 'raw' is missing in type 'undefined[]'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(10,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(11,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(13,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(14,9): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(21,9): error TS2346: Supplied parameters do not match any signature of call target. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts (4 errors) ==== - function foo(strs: string[]): number; - function foo(strs: string[], x: number): string; - function foo(strs: string[], x: number, y: number): boolean; - function foo(strs: string[], x: number, y: string): {}; +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts (8 errors) ==== + function foo(strs: TemplateStringsArray): number; + function foo(strs: TemplateStringsArray, x: number): string; + function foo(strs: TemplateStringsArray, x: number, y: number): boolean; + function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } var a = foo([]); // number + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Property 'raw' is missing in type 'undefined[]'. var b = foo([], 1); // string + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var c = foo([], 1, 2); // boolean + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) - ~~~~ -!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~~~~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js index 431447df22e38..4245b0cb0f436 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js @@ -1,8 +1,8 @@ //// [taggedTemplateStringsWithOverloadResolution1.ts] -function foo(strs: string[]): number; -function foo(strs: string[], x: number): string; -function foo(strs: string[], x: number, y: number): boolean; -function foo(strs: string[], x: number, y: string): {}; +function foo(strs: TemplateStringsArray): number; +function foo(strs: TemplateStringsArray, x: number): string; +function foo(strs: TemplateStringsArray, x: number, y: number): boolean; +function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index 53361f2052d7e..73adc0c0302bb 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -1,25 +1,39 @@ -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(12,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(9,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. + Property 'raw' is missing in type 'undefined[]'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(10,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(11,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(12,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(13,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(14,9): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(19,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(21,9): error TS2346: Supplied parameters do not match any signature of call target. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts (4 errors) ==== - function foo(strs: string[]): number; - function foo(strs: string[], x: number): string; - function foo(strs: string[], x: number, y: number): boolean; - function foo(strs: string[], x: number, y: string): {}; +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts (8 errors) ==== + function foo(strs: TemplateStringsArray): number; + function foo(strs: TemplateStringsArray, x: number): string; + function foo(strs: TemplateStringsArray, x: number, y: number): boolean; + function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } var a = foo([]); // number + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Property 'raw' is missing in type 'undefined[]'. var b = foo([], 1); // string + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var c = foo([], 1, 2); // boolean + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) - ~~~~ -!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} + ~~ +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~~~~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.js index bd121933b320e..b62671d33ac26 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.js @@ -1,8 +1,8 @@ //// [taggedTemplateStringsWithOverloadResolution1_ES6.ts] -function foo(strs: string[]): number; -function foo(strs: string[], x: number): string; -function foo(strs: string[], x: number, y: number): boolean; -function foo(strs: string[], x: number, y: string): {}; +function foo(strs: TemplateStringsArray): number; +function foo(strs: TemplateStringsArray, x: number): string; +function foo(strs: TemplateStringsArray, x: number, y: number): boolean; +function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js index f12008f9581b7..c16bfa5454f77 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js @@ -6,8 +6,8 @@ function foo1(...stuff: any[]): any { return undefined; } -var a = foo1 `${1}`; // string -var b = foo1([], 1); // number +var a = foo1 `${1}`; +var b = foo1([], 1); function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; @@ -15,8 +15,8 @@ function foo2(...stuff: any[]): any { return undefined; } -var c = foo2 `${1}`; // number -var d = foo2([], 1); // number +var c = foo2 `${1}`; +var d = foo2([], 1); //// [taggedTemplateStringsWithOverloadResolution2.js] function foo1() { @@ -26,8 +26,8 @@ function foo1() { } return undefined; } -var a = (_a = ["", ""], _a.raw = ["", ""], foo1(_a, 1)); // string -var b = foo1([], 1); // number +var a = (_a = ["", ""], _a.raw = ["", ""], foo1(_a, 1)); +var b = foo1([], 1); function foo2() { var stuff = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -35,6 +35,6 @@ function foo2() { } return undefined; } -var c = (_b = ["", ""], _b.raw = ["", ""], foo2(_b, 1)); // number -var d = foo2([], 1); // number +var c = (_b = ["", ""], _b.raw = ["", ""], foo2(_b, 1)); +var d = foo2([], 1); var _a, _b; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols index 52b8f3ab6f09f..241c43c4d782a 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols @@ -19,11 +19,11 @@ function foo1(...stuff: any[]): any { >undefined : Symbol(undefined) } -var a = foo1 `${1}`; // string +var a = foo1 `${1}`; >a : Symbol(a, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 7, 3)) >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 1, 61), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 2, 49)) -var b = foo1([], 1); // number +var b = foo1([], 1); >b : Symbol(b, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 8, 3)) >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 1, 61), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 2, 49)) @@ -46,11 +46,11 @@ function foo2(...stuff: any[]): any { >undefined : Symbol(undefined) } -var c = foo2 `${1}`; // number +var c = foo2 `${1}`; >c : Symbol(c, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 16, 3)) >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 8, 20), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 10, 49), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 11, 61)) -var d = foo2([], 1); // number +var d = foo2([], 1); >d : Symbol(d, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 17, 3)) >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 8, 20), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 10, 49), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 11, 61)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types index 77353e9b3cedc..3c35974ddec13 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types @@ -19,14 +19,14 @@ function foo1(...stuff: any[]): any { >undefined : undefined } -var a = foo1 `${1}`; // string +var a = foo1 `${1}`; >a : string >foo1 `${1}` : string >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } >`${1}` : string >1 : number -var b = foo1([], 1); // number +var b = foo1([], 1); >b : number >foo1([], 1) : number >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } @@ -52,14 +52,14 @@ function foo2(...stuff: any[]): any { >undefined : undefined } -var c = foo2 `${1}`; // number ->c : number ->foo2 `${1}` : number +var c = foo2 `${1}`; +>c : string +>foo2 `${1}` : string >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } >`${1}` : string >1 : number -var d = foo2([], 1); // number +var d = foo2([], 1); >d : number >foo2([], 1) : number >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.js index f208a63354de7..502fa4552a3a1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.js @@ -5,8 +5,8 @@ function foo1(...stuff: any[]): any { return undefined; } -var a = foo1 `${1}`; // string -var b = foo1([], 1); // number +var a = foo1 `${1}`; +var b = foo1([], 1); function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; @@ -14,17 +14,17 @@ function foo2(...stuff: any[]): any { return undefined; } -var c = foo2 `${1}`; // number -var d = foo2([], 1); // number +var c = foo2 `${1}`; +var d = foo2([], 1); //// [taggedTemplateStringsWithOverloadResolution2_ES6.js] function foo1(...stuff) { return undefined; } -var a = foo1 `${1}`; // string -var b = foo1([], 1); // number +var a = foo1 `${1}`; +var b = foo1([], 1); function foo2(...stuff) { return undefined; } -var c = foo2 `${1}`; // number -var d = foo2([], 1); // number +var c = foo2 `${1}`; +var d = foo2([], 1); diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols index cadfa135202a2..9cc79f2596f1e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols @@ -18,11 +18,11 @@ function foo1(...stuff: any[]): any { >undefined : Symbol(undefined) } -var a = foo1 `${1}`; // string +var a = foo1 `${1}`; >a : Symbol(a, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 6, 3)) >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 61), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 1, 49)) -var b = foo1([], 1); // number +var b = foo1([], 1); >b : Symbol(b, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 7, 3)) >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 61), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 1, 49)) @@ -45,11 +45,11 @@ function foo2(...stuff: any[]): any { >undefined : Symbol(undefined) } -var c = foo2 `${1}`; // number +var c = foo2 `${1}`; >c : Symbol(c, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 15, 3)) >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 7, 20), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 9, 49), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 10, 61)) -var d = foo2([], 1); // number +var d = foo2([], 1); >d : Symbol(d, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 16, 3)) >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 7, 20), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 9, 49), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 10, 61)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types index 306bf38cac46d..7faeec19c4a70 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types @@ -18,14 +18,14 @@ function foo1(...stuff: any[]): any { >undefined : undefined } -var a = foo1 `${1}`; // string +var a = foo1 `${1}`; >a : string >foo1 `${1}` : string >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } >`${1}` : string >1 : number -var b = foo1([], 1); // number +var b = foo1([], 1); >b : number >foo1([], 1) : number >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } @@ -51,14 +51,14 @@ function foo2(...stuff: any[]): any { >undefined : undefined } -var c = foo2 `${1}`; // number ->c : number ->foo2 `${1}` : number +var c = foo2 `${1}`; +>c : string +>foo2 `${1}` : string >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } >`${1}` : string >1 : number -var d = foo2([], 1); // number +var d = foo2([], 1); >d : number >foo2([], 1) : number >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js index fcc2cda86dc29..d011c3048a71b 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithTypedTags.ts] interface I { - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.symbols b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.symbols index d3f85d8375a7c..cd28177f5870a 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.symbols @@ -2,13 +2,14 @@ interface I { >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTags.ts, 0, 0)) - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; >stringParts : Symbol(stringParts, Decl(taggedTemplateStringsWithTypedTags.ts, 1, 5)) ->rest : Symbol(rest, Decl(taggedTemplateStringsWithTypedTags.ts, 1, 27)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) +>rest : Symbol(rest, Decl(taggedTemplateStringsWithTypedTags.ts, 1, 39)) >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTags.ts, 0, 0)) g: I; ->g : Symbol(I.g, Decl(taggedTemplateStringsWithTypedTags.ts, 1, 50)) +>g : Symbol(I.g, Decl(taggedTemplateStringsWithTypedTags.ts, 1, 62)) >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTags.ts, 0, 0)) h: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types index 2c992a2d233ff..c7c521154c744 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types @@ -2,8 +2,9 @@ interface I { >I : I - (stringParts: string[], ...rest: number[]): I; ->stringParts : string[] + (stringParts: TemplateStringsArray, ...rest: number[]): I; +>stringParts : TemplateStringsArray +>TemplateStringsArray : TemplateStringsArray >rest : number[] >I : I diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.js b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.js index 9eefc46ec302c..35a616f05f48c 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.js @@ -1,6 +1,6 @@ //// [taggedTemplateStringsWithTypedTagsES6.ts] interface I { - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; g: I; h: I; member: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.symbols b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.symbols index f0b088bd6f63b..f7f9c62d492a1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.symbols @@ -2,13 +2,14 @@ interface I { >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 0, 0)) - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; >stringParts : Symbol(stringParts, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 1, 5)) ->rest : Symbol(rest, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 1, 27)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --)) +>rest : Symbol(rest, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 1, 39)) >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 0, 0)) g: I; ->g : Symbol(I.g, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 1, 50)) +>g : Symbol(I.g, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 1, 62)) >I : Symbol(I, Decl(taggedTemplateStringsWithTypedTagsES6.ts, 0, 0)) h: I; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types index 4bda0f3fbb0ae..bf45144c32953 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types @@ -2,8 +2,9 @@ interface I { >I : I - (stringParts: string[], ...rest: number[]): I; ->stringParts : string[] + (stringParts: TemplateStringsArray, ...rest: number[]): I; +>stringParts : TemplateStringsArray +>TemplateStringsArray : TemplateStringsArray >rest : number[] >I : I diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts index 961544f309a6f..17f2ea6b84814 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts @@ -5,60 +5,60 @@ function noParams(n: T) { } noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n: string[]) { } +function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; -function someGenerics1b(n: string[], m: U) { } +function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs: string[], n: (x: T) => void) { } +function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; -function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } +function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs: string[], producer: () => T) { } +function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } +function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } +function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs: string[], n: T): T { return n; } +function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type -function someGenerics9(strs: string[], a: T, b: T, c: T): T { +function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts index bc9fd75cac93c..a0ca1aa67d6c4 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts @@ -5,60 +5,60 @@ function noParams(n: T) { } noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n: string[]) { } +function noGenericParams(n: TemplateStringsArray) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; -function someGenerics1b(n: string[], m: U) { } +function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs: string[], n: (x: T) => void) { } +function someGenerics2a(strs: TemplateStringsArray, n: (x: T) => void) { } someGenerics2a `${(n: string) => n}`; -function someGenerics2b(strs: string[], n: (x: T, y: U) => void) { } +function someGenerics2b(strs: TemplateStringsArray, n: (x: T, y: U) => void) { } someGenerics2b `${ (n: string, x: number) => n }`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs: string[], producer: () => T) { } +function someGenerics3(strs: TemplateStringsArray, producer: () => T) { } someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics4 `${4}${ () => null }`; someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs: string[], n: T, f: (x: U) => void) { } +function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void) { } someGenerics5 `${ 4 } ${ () => null }`; someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs: string[], a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } +function someGenerics6(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ n => n }${ n => n}${ n => n}`; someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs: string[], a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } +function someGenerics7(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${ n => n }${ n => n }${ n => n }`; someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs: string[], n: T): T { return n; } +function someGenerics8(strs: TemplateStringsArray, n: T): T { return n; } var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type -function someGenerics9(strs: string[], a: T, b: T, c: T): T { +function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { return null; } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts index 0f5d203d60b0f..d8be6cbd7c270 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts @@ -1,5 +1,5 @@ interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts index 36dc249f67276..dec483c167893 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts @@ -1,6 +1,6 @@ // @target: ES6 interface I { - (stringParts: string[], ...rest: boolean[]): I; + (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; h: I; member: I; diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts index d96196ee26e54..f86353e7ddaca 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts @@ -1,5 +1,5 @@ interface I { - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; member: { new (s: string): { new (n: number): { diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts index d0d6604cfde58..914f7ca809f1a 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts @@ -1,6 +1,6 @@ // @target: ES6 interface I { - (strs: string[], ...subs: number[]): I; + (strs: TemplateStringsArray, ...subs: number[]): I; member: { new (s: string): { new (n: number): { diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts index 5b29beddd480b..3743c1a771036 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts @@ -1,7 +1,7 @@ -function foo(strs: string[]): number; -function foo(strs: string[], x: number): string; -function foo(strs: string[], x: number, y: number): boolean; -function foo(strs: string[], x: number, y: string): {}; +function foo(strs: TemplateStringsArray): number; +function foo(strs: TemplateStringsArray, x: number): string; +function foo(strs: TemplateStringsArray, x: number, y: number): boolean; +function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts index f821d84fbdd40..d681c6b98b0cb 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts @@ -1,8 +1,8 @@ //@target: es6 -function foo(strs: string[]): number; -function foo(strs: string[], x: number): string; -function foo(strs: string[], x: number, y: number): boolean; -function foo(strs: string[], x: number, y: string): {}; +function foo(strs: TemplateStringsArray): number; +function foo(strs: TemplateStringsArray, x: number): string; +function foo(strs: TemplateStringsArray, x: number, y: number): boolean; +function foo(strs: TemplateStringsArray, x: number, y: string): {}; function foo(...stuff: any[]): any { return undefined; } diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts index 0ed9b86128b02..98799dd92df11 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts @@ -5,8 +5,8 @@ function foo1(...stuff: any[]): any { return undefined; } -var a = foo1 `${1}`; // string -var b = foo1([], 1); // number +var a = foo1 `${1}`; +var b = foo1([], 1); function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; @@ -14,5 +14,5 @@ function foo2(...stuff: any[]): any { return undefined; } -var c = foo2 `${1}`; // number -var d = foo2([], 1); // number \ No newline at end of file +var c = foo2 `${1}`; +var d = foo2([], 1); \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts index 6c67de325e25a..769c56e47a182 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts @@ -5,8 +5,8 @@ function foo1(...stuff: any[]): any { return undefined; } -var a = foo1 `${1}`; // string -var b = foo1([], 1); // number +var a = foo1 `${1}`; +var b = foo1([], 1); function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; @@ -14,5 +14,5 @@ function foo2(...stuff: any[]): any { return undefined; } -var c = foo2 `${1}`; // number -var d = foo2([], 1); // number \ No newline at end of file +var c = foo2 `${1}`; +var d = foo2([], 1); \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts index 9b3852c2ddb23..60f97104be3d3 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts @@ -1,5 +1,5 @@ interface I { - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; g: I; h: I; member: I; diff --git a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts index 0dc10820a98c1..19fb6a874cc1a 100644 --- a/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts +++ b/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts @@ -1,6 +1,6 @@ // @target: ES6 interface I { - (stringParts: string[], ...rest: number[]): I; + (stringParts: TemplateStringsArray, ...rest: number[]): I; g: I; h: I; member: I; diff --git a/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags3.ts b/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags3.ts index 3843ed34b16c9..b919afc770398 100644 --- a/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags3.ts +++ b/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags3.ts @@ -1,8 +1,8 @@ /// -//// function f(templateStrings: string[], p1_o1: string): number; -//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string; -//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean; +//// function f(templateStrings: TemplateStringsArray, p1_o1: string): number; +//// function f(templateStrings: TemplateStringsArray, p1_o2: number, p2_o2: number, p3_o2: number): string; +//// function f(templateStrings: TemplateStringsArray, p1_o3: string, p2_o3: boolean, p3_o3: number): boolean; //// function f(...foo[]: any) { return ""; } //// //// f `${/*1*/ "s/*2*/tring" /*3*/ } ${ @@ -14,7 +14,7 @@ test.markers().forEach(m => { verify.signatureHelpArgumentCountIs(3); verify.currentSignatureParameterCountIs(4); - verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean'); + verify.currentSignatureHelpIs('f(templateStrings: TemplateStringsArray, p1_o3: string, p2_o3: boolean, p3_o3: number): boolean'); verify.currentParameterHelpArgumentNameIs("p1_o3"); verify.currentParameterSpanIs("p1_o3: string"); }); \ No newline at end of file diff --git a/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags7.ts b/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags7.ts index 9a24aacf86bdf..5f706b8c0fa5c 100644 --- a/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags7.ts +++ b/tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags7.ts @@ -1,8 +1,8 @@ /// -//// function f(templateStrings: string[], p1_o1: string): number; -//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string; -//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean; +//// function f(templateStrings: TemplateStringsArray, p1_o1: string): number; +//// function f(templateStrings: TemplateStringsArray, p1_o2: number, p2_o2: number, p3_o2: number): string; +//// function f(templateStrings: TemplateStringsArray, p1_o3: string, p2_o3: boolean, p3_o3: number): boolean; //// function f(...foo[]: any) { return ""; } //// //// f `${ } ${/*1*/ fa/*2*/lse /*3*/} @@ -14,7 +14,7 @@ test.markers().forEach(m => { verify.signatureHelpArgumentCountIs(3); verify.currentSignatureParameterCountIs(4); - verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean'); + verify.currentSignatureHelpIs('f(templateStrings: TemplateStringsArray, p1_o3: string, p2_o3: boolean, p3_o3: number): boolean'); verify.currentParameterHelpArgumentNameIs("p2_o3"); verify.currentParameterSpanIs("p2_o3: boolean"); }); \ No newline at end of file