diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 33f1a983208f9..f3306a558ebaa 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -4577,3 +4577,19 @@ interface Date { */ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } + +type Split = Source extends `${infer Left}${Separator}${infer Right}` ? [...(string extends Left ? string[] : [`${Left}`]), ...Split] + : Source extends "" ? Separator extends "" ? [] + : [""] + : string extends Source ? string[] + : [Source]; + +interface String { + split( + this: Source, + separator: Separator, + limit?: undefined, + ): Split; + + split(separator: string | RegExp, limit: 0): []; +} diff --git a/tests/baselines/reference/anyAssignableToEveryType.symbols b/tests/baselines/reference/anyAssignableToEveryType.symbols index 64b78525adbb7..7c0bba25fba15 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.symbols +++ b/tests/baselines/reference/anyAssignableToEveryType.symbols @@ -116,7 +116,7 @@ var p: Number = a; var q: String = a; >q : Symbol(q, Decl(anyAssignableToEveryType.ts, 32, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) function foo(x: T, y: U, z: V) { diff --git a/tests/baselines/reference/apparentTypeSubtyping.symbols b/tests/baselines/reference/apparentTypeSubtyping.symbols index 8450c89b27b0b..8d46dc55b338f 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.symbols +++ b/tests/baselines/reference/apparentTypeSubtyping.symbols @@ -7,7 +7,7 @@ class Base { >Base : Symbol(Base, Decl(apparentTypeSubtyping.ts, 0, 0)) >U : Symbol(U, Decl(apparentTypeSubtyping.ts, 3, 11)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) x: U; >x : Symbol(Base.x, Decl(apparentTypeSubtyping.ts, 3, 30)) @@ -22,7 +22,7 @@ class Derived extends Base { // error x: String; >x : Symbol(Derived.x, Decl(apparentTypeSubtyping.ts, 8, 39)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } class Base2 { @@ -30,18 +30,18 @@ class Base2 { x: String; >x : Symbol(Base2.x, Decl(apparentTypeSubtyping.ts, 12, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) static s: String; >s : Symbol(Base2.s, Decl(apparentTypeSubtyping.ts, 13, 14)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } // is U extends String (S) a subtype of String (T)? Apparent type of U is String so it succeeds class Derived2 extends Base2 { // error because of the prototype's not matching, not because of the instance side >Derived2 : Symbol(Derived2, Decl(apparentTypeSubtyping.ts, 15, 1)) >U : Symbol(U, Decl(apparentTypeSubtyping.ts, 18, 15)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Base2 : Symbol(Base2, Decl(apparentTypeSubtyping.ts, 10, 1)) x: U; diff --git a/tests/baselines/reference/apparentTypeSupertype.symbols b/tests/baselines/reference/apparentTypeSupertype.symbols index 59a1b913d711b..85b407f9d5a62 100644 --- a/tests/baselines/reference/apparentTypeSupertype.symbols +++ b/tests/baselines/reference/apparentTypeSupertype.symbols @@ -15,7 +15,7 @@ class Base { class Derived extends Base { // error >Derived : Symbol(Derived, Decl(apparentTypeSupertype.ts, 5, 1)) >U : Symbol(U, Decl(apparentTypeSupertype.ts, 8, 14)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Base : Symbol(Base, Decl(apparentTypeSupertype.ts, 0, 0)) x: U; diff --git a/tests/baselines/reference/arrayLiterals2ES5.symbols b/tests/baselines/reference/arrayLiterals2ES5.symbols index 236cc654c3099..9d8b69b6aae02 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.symbols +++ b/tests/baselines/reference/arrayLiterals2ES5.symbols @@ -89,7 +89,7 @@ interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES5.ts, 44, 43)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var d0 = [1, true, ...temp,]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES5.ts, 46, 3)) diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 46084570c17f5..24441aacc1e80 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -81,7 +81,7 @@ interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3)) diff --git a/tests/baselines/reference/arrayLiterals3.symbols b/tests/baselines/reference/arrayLiterals3.symbols index 015ed97cd3b13..faa8d70aff020 100644 --- a/tests/baselines/reference/arrayLiterals3.symbols +++ b/tests/baselines/reference/arrayLiterals3.symbols @@ -54,7 +54,7 @@ interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals3.ts, 29, 43)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var c0: tup = [...temp2]; // Error >c0 : Symbol(c0, Decl(arrayLiterals3.ts, 31, 3)) diff --git a/tests/baselines/reference/assignFromStringInterface.symbols b/tests/baselines/reference/assignFromStringInterface.symbols index eea3e81e87905..c04c4c77b09d5 100644 --- a/tests/baselines/reference/assignFromStringInterface.symbols +++ b/tests/baselines/reference/assignFromStringInterface.symbols @@ -6,7 +6,7 @@ var x = ''; var a: String; >a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) x = a; >x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 8c2cd74aa7df2..460ab4f68b8d8 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -1,9 +1,13 @@ +assignFromStringInterface2.ts(42,1): error TS2322: Type 'NotString' is not assignable to type 'String'. + The types returned by 'split(...)' are incompatible between these types. + Type 'string[]' is not assignable to type '[]'. + Target allows only 0 element(s) but source may have more. assignFromStringInterface2.ts(47,1): error TS2322: Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assignable to type 'string'. -==== assignFromStringInterface2.ts (2 errors) ==== +==== assignFromStringInterface2.ts (3 errors) ==== interface String { doStuff(): string; } @@ -46,6 +50,11 @@ assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assig a = x; a = b; + ~ +!!! error TS2322: Type 'NotString' is not assignable to type 'String'. +!!! error TS2322: The types returned by 'split(...)' are incompatible between these types. +!!! error TS2322: Type 'string[]' is not assignable to type '[]'. +!!! error TS2322: Target allows only 0 element(s) but source may have more. b = a; b = x; diff --git a/tests/baselines/reference/assignFromStringInterface2.symbols b/tests/baselines/reference/assignFromStringInterface2.symbols index 40846e9388e8f..ed02a79b09683 100644 --- a/tests/baselines/reference/assignFromStringInterface2.symbols +++ b/tests/baselines/reference/assignFromStringInterface2.symbols @@ -2,7 +2,7 @@ === assignFromStringInterface2.ts === interface String { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0)) doStuff(): string; >doStuff : Symbol(String.doStuff, Decl(assignFromStringInterface2.ts, 0, 18)) @@ -145,7 +145,7 @@ var x = ''; var a: String; >a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0)) var b: NotString; >b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols index b66e34ceb34d5..06b4b02de051f 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols @@ -15,7 +15,7 @@ y = x; var a: String = Object.create(""); >a : Symbol(a, Decl(assigningFromObjectToAnythingElse.ts, 4, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -23,7 +23,7 @@ var a: String = Object.create(""); var c: String = Object.create(1); >c : Symbol(c, Decl(assigningFromObjectToAnythingElse.ts, 5, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/bigintIndex.symbols b/tests/baselines/reference/bigintIndex.symbols index a16ac17f82f25..1ddda8d67c0df 100644 --- a/tests/baselines/reference/bigintIndex.symbols +++ b/tests/baselines/reference/bigintIndex.symbols @@ -58,7 +58,7 @@ typedArray[bigNum] = 0xAA; // should error typedArray[String(bigNum)] = 0xAA; >typedArray : Symbol(typedArray, Decl(a.ts, 18, 5)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 4 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 5 more) >bigNum : Symbol(bigNum, Decl(a.ts, 17, 5)) typedArray["1"] = 0xBB; diff --git a/tests/baselines/reference/builtinIterator.symbols b/tests/baselines/reference/builtinIterator.symbols index e756cb5f59899..8368134bd3f10 100644 --- a/tests/baselines/reference/builtinIterator.symbols +++ b/tests/baselines/reference/builtinIterator.symbols @@ -12,7 +12,7 @@ const mapped = iterator.map(String); >iterator.map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >iterator : Symbol(iterator, Decl(builtinIterator.ts, 0, 5)) >map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) const filtered = iterator.filter(x => x > 0); >filtered : Symbol(filtered, Decl(builtinIterator.ts, 4, 5)) diff --git a/tests/baselines/reference/callOverloads2.symbols b/tests/baselines/reference/callOverloads2.symbols index e4e9da45fe062..9cbf10179de0f 100644 --- a/tests/baselines/reference/callOverloads2.symbols +++ b/tests/baselines/reference/callOverloads2.symbols @@ -34,7 +34,7 @@ function Goo(s:string); // error - no implementation declare function Gar(s:String); // expect no error >Gar : Symbol(Gar, Decl(callOverloads2.ts, 13, 23)) >s : Symbol(s, Decl(callOverloads2.ts, 15, 21)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var f1 = new Foo("hey"); >f1 : Symbol(f1, Decl(callOverloads2.ts, 17, 3)) diff --git a/tests/baselines/reference/classExtendingBuiltinType.symbols b/tests/baselines/reference/classExtendingBuiltinType.symbols index 68426f4e6357c..52a7dbb9a0f3e 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.symbols +++ b/tests/baselines/reference/classExtendingBuiltinType.symbols @@ -11,7 +11,7 @@ class C2 extends Function { } class C3 extends String { } >C3 : Symbol(C3, Decl(classExtendingBuiltinType.ts, 1, 29)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) class C4 extends Boolean { } >C4 : Symbol(C4, Decl(classExtendingBuiltinType.ts, 2, 27)) diff --git a/tests/baselines/reference/completionsCommitCharactersGlobal.baseline b/tests/baselines/reference/completionsCommitCharactersGlobal.baseline index 582d3363da492..0cb56976d9c0b 100644 --- a/tests/baselines/reference/completionsCommitCharactersGlobal.baseline +++ b/tests/baselines/reference/completionsCommitCharactersGlobal.baseline @@ -2717,6 +2717,7 @@ // | interface RegExpMatchArray // | type Required = { [P in keyof T]-?: T[P]; } // | type ReturnType any> = T extends (...args: any) => infer R ? R : any +// | type Split = Source extends `${infer Left}${Separator}${infer Right}` ? [...string extends Left ? string[] : [`${Left}`], ...Split] : Source extends "" ? Separator extends "" ? [] : [...] : string extends Source ? string[] : [...] // | string // | interface String // | var String: StringConstructor @@ -2897,6 +2898,7 @@ // | interface RegExpMatchArray // | type Required = { [P in keyof T]-?: T[P]; } // | type ReturnType any> = T extends (...args: any) => infer R ? R : any +// | type Split = Source extends `${infer Left}${Separator}${infer Right}` ? [...string extends Left ? string[] : [`${Left}`], ...Split] : Source extends "" ? Separator extends "" ? [] : [...] : string extends Source ? string[] : [...] // | string // | interface String // | var String: StringConstructor @@ -82257,6 +82259,483 @@ } ] }, + { + "name": "Split", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15", + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Split", + "kind": "aliasName" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "`${", + "kind": "stringLiteral" + }, + { + "text": "infer", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": "}${", + "kind": "stringLiteral" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": "}${", + "kind": "stringLiteral" + }, + { + "text": "infer", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Right", + "kind": "typeParameterName" + }, + { + "text": "}`", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "punctuation" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "`${", + "kind": "stringLiteral" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": "}`", + "kind": "stringLiteral" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "...", + "kind": "punctuation" + }, + { + "text": "Split", + "kind": "aliasName" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Right", + "kind": "typeParameterName" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "\"\"", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "\"\"", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "text" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "text" + }, + { + "text": "]", + "kind": "punctuation" + } + ], + "documentation": [] + }, { "name": "string", "kind": "keyword", @@ -91728,6 +92207,483 @@ } ] }, + { + "name": "Split", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15", + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Split", + "kind": "aliasName" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "`${", + "kind": "stringLiteral" + }, + { + "text": "infer", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": "}${", + "kind": "stringLiteral" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": "}${", + "kind": "stringLiteral" + }, + { + "text": "infer", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Right", + "kind": "typeParameterName" + }, + { + "text": "}`", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "punctuation" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "`${", + "kind": "stringLiteral" + }, + { + "text": "Left", + "kind": "typeParameterName" + }, + { + "text": "}`", + "kind": "stringLiteral" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "...", + "kind": "punctuation" + }, + { + "text": "Split", + "kind": "aliasName" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Right", + "kind": "typeParameterName" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "\"\"", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Separator", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "\"\"", + "kind": "stringLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "text" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "extends", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Source", + "kind": "typeParameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "text" + }, + { + "text": "]", + "kind": "punctuation" + } + ], + "documentation": [] + }, { "name": "string", "kind": "keyword", diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index bf00835b43760..40b4fe9211383 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -14,7 +14,7 @@ // | (method) String.replace(searchValue: string | RegExp, replaceValue: string): string (+1 overload) // | (method) String.search(regexp: string | RegExp): number // | (method) String.slice(start?: number, end?: number): string -// | (method) String.split(separator: string | RegExp, limit?: number): string[] +// | (method) String.split(separator: string | RegExp, limit?: number): string[] (+2 overloads) // | (method) String.substring(start: number, end?: number): string // | (method) String.toLocaleLowerCase(locales?: string | string[]): string // | (method) String.toLocaleUpperCase(locales?: string | string[]): string @@ -1542,6 +1542,34 @@ { "text": "]", "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "+", + "kind": "operator" + }, + { + "text": "2", + "kind": "numericLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "overloads", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" } ], "documentation": [ diff --git a/tests/baselines/reference/complexNarrowingWithAny.symbols b/tests/baselines/reference/complexNarrowingWithAny.symbols index c8e1fd3e220ea..7fcb143e9904c 100644 --- a/tests/baselines/reference/complexNarrowingWithAny.symbols +++ b/tests/baselines/reference/complexNarrowingWithAny.symbols @@ -136,7 +136,7 @@ namespace import49 { //export var NG_VALUE_ACCESSOR = new OpaqueToken('ngValueAccessor') export var NG_VALUE_ACCESSOR = new String('foo') >NG_VALUE_ACCESSOR : Symbol(NG_VALUE_ACCESSOR, Decl(complexNarrowingWithAny.ts, 103, 11)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } //using a class - < 1 sec typecheck diff --git a/tests/baselines/reference/computedPropertyNames3_ES5.symbols b/tests/baselines/reference/computedPropertyNames3_ES5.symbols index 1ce44e6fa101d..085903c16b73e 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNames3_ES5.symbols @@ -23,7 +23,7 @@ class C { static get [""]() { } >[""] : Symbol(C[""], Decl(computedPropertyNames3_ES5.ts, 5, 23)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) static set [id.toString()](v) { } >[id.toString()] : Symbol(C[id.toString()], Decl(computedPropertyNames3_ES5.ts, 6, 33)) diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.symbols b/tests/baselines/reference/computedPropertyNames3_ES6.symbols index 216cd50a41e5c..55dc819c968aa 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNames3_ES6.symbols @@ -23,7 +23,7 @@ class C { static get [""]() { } >[""] : Symbol(C[""], Decl(computedPropertyNames3_ES6.ts, 5, 23)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) static set [id.toString()](v) { } >[id.toString()] : Symbol(C[id.toString()], Decl(computedPropertyNames3_ES6.ts, 6, 33)) diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.symbols b/tests/baselines/reference/constraintSatisfactionWithAny.symbols index 497c2a5cb39f7..3b1776d2fbc0a 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.symbols +++ b/tests/baselines/reference/constraintSatisfactionWithAny.symbols @@ -6,7 +6,7 @@ function foo(x: T): T { return null; } >foo : Symbol(foo, Decl(constraintSatisfactionWithAny.ts, 0, 0)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(constraintSatisfactionWithAny.ts, 2, 31)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) @@ -69,7 +69,7 @@ foo4(b); class C { >C : Symbol(C, Decl(constraintSatisfactionWithAny.ts, 16, 13)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 22, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) constructor(public x: T) { } >x : Symbol(C.x, Decl(constraintSatisfactionWithAny.ts, 23, 16)) diff --git a/tests/baselines/reference/dependentDestructuredVariablesFromNestedPatterns.symbols b/tests/baselines/reference/dependentDestructuredVariablesFromNestedPatterns.symbols index 231ec9008a911..9a69c83fb6087 100644 --- a/tests/baselines/reference/dependentDestructuredVariablesFromNestedPatterns.symbols +++ b/tests/baselines/reference/dependentDestructuredVariablesFromNestedPatterns.symbols @@ -70,7 +70,7 @@ async function myAllSettled(fn: () => T) { : [undefined, new Error(String(result.reason))], >undefined : Symbol(undefined) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) >result.reason : Symbol(PromiseRejectedResult.reason, Decl(lib.es2020.promise.d.ts, --, --)) >result : Symbol(result, Decl(dependentDestructuredVariablesFromNestedPatterns.ts, 21, 23)) >reason : Symbol(PromiseRejectedResult.reason, Decl(lib.es2020.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols index 6ba709c844c87..ad5ad852c590e 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols @@ -10,17 +10,17 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 6, 32)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 42)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function a1(...x: (number|string)[]) { } @@ -35,7 +35,7 @@ function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 11, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 12, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 12, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.symbols index ebe20f8b6f7bd..c599859d1627e 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.symbols @@ -10,17 +10,17 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5iterable.ts, 0, 0)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5iterable.ts, 6, 32)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5iterable.ts, 7, 42)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function a1(...x: (number|string)[]) { } @@ -35,7 +35,7 @@ function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5iterable.ts, 11, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5iterable.ts, 12, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5iterable.ts, 12, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols index efb4d2a43ca0b..ece8d7b24ded6 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols @@ -10,17 +10,17 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 6, 32)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 42)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function a1(...x: (number|string)[]) { } @@ -35,7 +35,7 @@ function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 11, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 12, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 12, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.symbols b/tests/baselines/reference/destructuringParameterDeclaration4.symbols index 8d9afd471fd50..63e9d10128758 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration4.symbols @@ -10,17 +10,17 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration4.ts, 0, 0)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration4.ts, 6, 32)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration4.ts, 7, 42)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function a0(...x: [number, number, string]) { } // Error, rest parameter must be array type diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2015.symbols b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2015.symbols index f6a4fc73a6753..0ef66cfbe6a49 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2015.symbols +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2015.symbols @@ -299,11 +299,11 @@ const testStringSup = "".sup(); const testStringConstructorFromCodePoint = String.fromCodePoint(); >testStringConstructorFromCodePoint : Symbol(testStringConstructorFromCodePoint, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 86, 5)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) const testStringConstructorRaw = String.raw``; >testStringConstructorRaw : Symbol(testStringConstructorRaw, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 87, 5)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) const testRegExpFlags = /abc/g.flags; >testRegExpFlags : Symbol(testRegExpFlags, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 88, 5)) diff --git a/tests/baselines/reference/duplicateNumericIndexers.symbols b/tests/baselines/reference/duplicateNumericIndexers.symbols index d4a2c66a9f484..a5dc5e9e830ad 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.symbols +++ b/tests/baselines/reference/duplicateNumericIndexers.symbols @@ -14,7 +14,7 @@ interface Number { } interface String { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateNumericIndexers.ts, 5, 1)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateNumericIndexers.ts, 5, 1)) [x: number]: string; >x : Symbol(x, Decl(duplicateNumericIndexers.ts, 8, 5)) diff --git a/tests/baselines/reference/duplicatePropertyNames.symbols b/tests/baselines/reference/duplicatePropertyNames.symbols index aac9db9c6a32d..22927340deaea 100644 --- a/tests/baselines/reference/duplicatePropertyNames.symbols +++ b/tests/baselines/reference/duplicatePropertyNames.symbols @@ -14,7 +14,7 @@ interface Number { } interface String { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicatePropertyNames.ts, 5, 1)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicatePropertyNames.ts, 5, 1)) foo(): string; >foo : Symbol(String.foo, Decl(duplicatePropertyNames.ts, 7, 18), Decl(duplicatePropertyNames.ts, 8, 18)) diff --git a/tests/baselines/reference/dynamicImportEvaluateSpecifier.symbols b/tests/baselines/reference/dynamicImportEvaluateSpecifier.symbols index 5e91337bd9da1..dfff66a30ae99 100644 --- a/tests/baselines/reference/dynamicImportEvaluateSpecifier.symbols +++ b/tests/baselines/reference/dynamicImportEvaluateSpecifier.symbols @@ -6,11 +6,11 @@ let i = 0; >i : Symbol(i, Decl(dynamicImportEvaluateSpecifier.ts, 1, 3)) import(String(i++)); ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 3 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 4 more) >i : Symbol(i, Decl(dynamicImportEvaluateSpecifier.ts, 1, 3)) import(String(i++)); ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 3 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 4 more) >i : Symbol(i, Decl(dynamicImportEvaluateSpecifier.ts, 1, 3)) const getPath = async () => { diff --git a/tests/baselines/reference/enumAssignability.symbols b/tests/baselines/reference/enumAssignability.symbols index 4aca6c8cd628e..ab061643b81ab 100644 --- a/tests/baselines/reference/enumAssignability.symbols +++ b/tests/baselines/reference/enumAssignability.symbols @@ -152,7 +152,7 @@ module Others { var q: String = e; >q : Symbol(q, Decl(enumAssignability.ts, 44, 7)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >e : Symbol(e, Decl(enumAssignability.ts, 5, 3)) function foo(x: T, y: U, z: V) { diff --git a/tests/baselines/reference/errorHandlingInInstanceOf.symbols b/tests/baselines/reference/errorHandlingInInstanceOf.symbols index aceaf503437d1..a96ff53af382b 100644 --- a/tests/baselines/reference/errorHandlingInInstanceOf.symbols +++ b/tests/baselines/reference/errorHandlingInInstanceOf.symbols @@ -2,7 +2,7 @@ === errorHandlingInInstanceOf.ts === if (x instanceof String) { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } var y: any; diff --git a/tests/baselines/reference/everyTypeAssignableToAny.symbols b/tests/baselines/reference/everyTypeAssignableToAny.symbols index 5764b21d90e3b..70874d8ce79a5 100644 --- a/tests/baselines/reference/everyTypeAssignableToAny.symbols +++ b/tests/baselines/reference/everyTypeAssignableToAny.symbols @@ -89,7 +89,7 @@ var p: Number; var q: String; >q : Symbol(q, Decl(everyTypeAssignableToAny.ts, 29, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) a = b; >a : Symbol(a, Decl(everyTypeAssignableToAny.ts, 0, 3)) diff --git a/tests/baselines/reference/exportAssignNonIdentifier.symbols b/tests/baselines/reference/exportAssignNonIdentifier.symbols index 51eafae2a7a68..74455e2dc4d65 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.symbols +++ b/tests/baselines/reference/exportAssignNonIdentifier.symbols @@ -30,7 +30,7 @@ export = void; // Error, void operator requires an argument === foo7.ts === export = Date || String; // Ok >Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) === foo8.ts === diff --git a/tests/baselines/reference/expressionTypeNodeShouldError.symbols b/tests/baselines/reference/expressionTypeNodeShouldError.symbols index 1b3260982ed13..411c63537aa50 100644 --- a/tests/baselines/reference/expressionTypeNodeShouldError.symbols +++ b/tests/baselines/reference/expressionTypeNodeShouldError.symbols @@ -7,7 +7,7 @@ declare const x: "foo".charCodeAt(0); === string.ts === interface String { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(string.ts, 0, 0)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(string.ts, 0, 0)) typeof(x: T): T; >typeof : Symbol(String.typeof, Decl(string.ts, 0, 18)) diff --git a/tests/baselines/reference/extendGlobalThis.symbols b/tests/baselines/reference/extendGlobalThis.symbols index 011517cb70dda..89dbc3d3cd977 100644 --- a/tests/baselines/reference/extendGlobalThis.symbols +++ b/tests/baselines/reference/extendGlobalThis.symbols @@ -24,9 +24,9 @@ console.log(globalThis.test.split("-")); >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) ->globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >globalThis.test : Symbol(test, Decl(extension.d.ts, 2, 11)) >globalThis : Symbol(globalThis, Decl(extension.d.ts, 0, 16)) >test : Symbol(test, Decl(extension.d.ts, 2, 11)) ->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/extendGlobalThis.types b/tests/baselines/reference/extendGlobalThis.types index 499b561819e53..b5a3ea23b713c 100644 --- a/tests/baselines/reference/extendGlobalThis.types +++ b/tests/baselines/reference/extendGlobalThis.types @@ -42,16 +42,16 @@ console.log(globalThis.test.split("-")); > : ^^^^ ^^ ^^^^^ >globalThis.test.split("-") : string[] > : ^^^^^^^^ ->globalThis.test.split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>globalThis.test.split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >globalThis.test : string > : ^^^^^^ >globalThis : typeof globalThis > : ^^^^^^^^^^^^^^^^^ >test : string > : ^^^^^^ ->split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >"-" : "-" > : ^^^ diff --git a/tests/baselines/reference/extendStringInterface.symbols b/tests/baselines/reference/extendStringInterface.symbols index f1bbb2619ecde..8b87be54b2ec5 100644 --- a/tests/baselines/reference/extendStringInterface.symbols +++ b/tests/baselines/reference/extendStringInterface.symbols @@ -2,7 +2,7 @@ === extendStringInterface.ts === interface String { ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(extendStringInterface.ts, 0, 0)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(extendStringInterface.ts, 0, 0)) doStuff(): string; >doStuff : Symbol(String.doStuff, Decl(extendStringInterface.ts, 0, 18)) diff --git a/tests/baselines/reference/genericFunctionSpecializations1.symbols b/tests/baselines/reference/genericFunctionSpecializations1.symbols index c8f449e9b6119..306f17872e9a3 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.symbols +++ b/tests/baselines/reference/genericFunctionSpecializations1.symbols @@ -20,7 +20,7 @@ function foo4(test: string); // valid function foo4(test: T) { } >foo4 : Symbol(foo4, Decl(genericFunctionSpecializations1.ts, 1, 29), Decl(genericFunctionSpecializations1.ts, 3, 31)) >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >test : Symbol(test, Decl(genericFunctionSpecializations1.ts, 4, 32)) >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) diff --git a/tests/baselines/reference/identicalGenericConditionalsWithInferRelated.symbols b/tests/baselines/reference/identicalGenericConditionalsWithInferRelated.symbols index 408c5c4a46a3d..82c61553bd3b4 100644 --- a/tests/baselines/reference/identicalGenericConditionalsWithInferRelated.symbols +++ b/tests/baselines/reference/identicalGenericConditionalsWithInferRelated.symbols @@ -57,7 +57,7 @@ export type MappedResult = T extends String ? string : >T : Symbol(T, Decl(identicalGenericConditionalsWithInferRelated.ts, 12, 25)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) T >T : Symbol(T, Decl(identicalGenericConditionalsWithInferRelated.ts, 12, 25)) diff --git a/tests/baselines/reference/intraExpressionInferences.symbols b/tests/baselines/reference/intraExpressionInferences.symbols index f0a01515373d5..640d8ac1be08c 100644 --- a/tests/baselines/reference/intraExpressionInferences.symbols +++ b/tests/baselines/reference/intraExpressionInferences.symbols @@ -542,7 +542,7 @@ example({ map: (number) => String(number) >map : Symbol(map, Decl(intraExpressionInferences.ts, 170, 35)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 171, 10)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 171, 10)) }); @@ -559,7 +559,7 @@ example({ map: (number) => String(number) >map : Symbol(map, Decl(intraExpressionInferences.ts, 175, 48)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 176, 10)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 176, 10)) }); @@ -576,7 +576,7 @@ example({ map: (number) => String(number) >map : Symbol(map, Decl(intraExpressionInferences.ts, 180, 40)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 181, 10)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >number : Symbol(number, Decl(intraExpressionInferences.ts, 181, 10)) }); diff --git a/tests/baselines/reference/jsdocInTypeScript.symbols b/tests/baselines/reference/jsdocInTypeScript.symbols index 10df4906cb903..d700ee1bcdc1a 100644 --- a/tests/baselines/reference/jsdocInTypeScript.symbols +++ b/tests/baselines/reference/jsdocInTypeScript.symbols @@ -97,5 +97,5 @@ E[""]; /** @type {import("should-not-be-resolved").Type} */ var v = import(String()); >v : Symbol(v, Decl(jsdocInTypeScript.ts, 55, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) diff --git a/tests/baselines/reference/jsdocParseDotDotDotInJSDocFunction.symbols b/tests/baselines/reference/jsdocParseDotDotDotInJSDocFunction.symbols index aa200020c33fe..bcb040706f1cb 100644 --- a/tests/baselines/reference/jsdocParseDotDotDotInJSDocFunction.symbols +++ b/tests/baselines/reference/jsdocParseDotDotDotInJSDocFunction.symbols @@ -18,6 +18,6 @@ function g(callback) { var stringFromCharCode = String.fromCharCode; >stringFromCharCode : Symbol(stringFromCharCode, Decl(a.js, 10, 3)) >String.fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/libMembers.symbols b/tests/baselines/reference/libMembers.symbols index 06f8f497807a8..09cee6ecae810 100644 --- a/tests/baselines/reference/libMembers.symbols +++ b/tests/baselines/reference/libMembers.symbols @@ -19,7 +19,7 @@ s.subby(12); // error unresolved String.fromCharCode(12); >String.fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) module M { diff --git a/tests/baselines/reference/library_StringSlice.symbols b/tests/baselines/reference/library_StringSlice.symbols index 2f647bd3973c1..fae06d79ab7a0 100644 --- a/tests/baselines/reference/library_StringSlice.symbols +++ b/tests/baselines/reference/library_StringSlice.symbols @@ -5,21 +5,21 @@ String.prototype.slice(); >String.prototype.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) >String.prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) >slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) String.prototype.slice(0); >String.prototype.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) >String.prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) >slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) String.prototype.slice(0,1); >String.prototype.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) >String.prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prototype : Symbol(StringConstructor.prototype, Decl(lib.es5.d.ts, --, --)) >slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/nativeToBoxedTypes.symbols b/tests/baselines/reference/nativeToBoxedTypes.symbols index 4901479233b7a..6a121bf82378c 100644 --- a/tests/baselines/reference/nativeToBoxedTypes.symbols +++ b/tests/baselines/reference/nativeToBoxedTypes.symbols @@ -14,7 +14,7 @@ n = N; var S = new String(); >S : Symbol(S, Decl(nativeToBoxedTypes.ts, 4, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var s = "foge"; >s : Symbol(s, Decl(nativeToBoxedTypes.ts, 5, 3)) diff --git a/tests/baselines/reference/newOperator.symbols b/tests/baselines/reference/newOperator.symbols index 7765991d24525..1c10fd8e663c0 100644 --- a/tests/baselines/reference/newOperator.symbols +++ b/tests/baselines/reference/newOperator.symbols @@ -57,7 +57,7 @@ var t5 = new new Date; // Can be an expression new String; ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // Error on union declare const union: { a: string } | { b: string } diff --git a/tests/baselines/reference/nonPrimitiveAssignError.symbols b/tests/baselines/reference/nonPrimitiveAssignError.symbols index 3a53a3a32d14f..5ed17b1305a9b 100644 --- a/tests/baselines/reference/nonPrimitiveAssignError.symbols +++ b/tests/baselines/reference/nonPrimitiveAssignError.symbols @@ -70,7 +70,7 @@ var boolObj: Boolean = true; var strObj: String = "string"; >strObj : Symbol(strObj, Decl(nonPrimitiveAssignError.ts, 22, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) a = numObj; // ok >a : Symbol(a, Decl(nonPrimitiveAssignError.ts, 2, 3)) diff --git a/tests/baselines/reference/nullAssignableToEveryType.symbols b/tests/baselines/reference/nullAssignableToEveryType.symbols index e617437519c6f..420fb293f82bb 100644 --- a/tests/baselines/reference/nullAssignableToEveryType.symbols +++ b/tests/baselines/reference/nullAssignableToEveryType.symbols @@ -95,7 +95,7 @@ var p: Number = null; var q: String = null; >q : Symbol(q, Decl(nullAssignableToEveryType.ts, 30, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo(x: T, y: U, z: V) { >foo : Symbol(foo, Decl(nullAssignableToEveryType.ts, 30, 21)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols index 880a6cd9d345c..0f309b6de80ab 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols @@ -30,7 +30,7 @@ class B> { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 12, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo(x: T): string { return null; } >foo : Symbol(C.foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 12, 27)) @@ -110,13 +110,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) @@ -190,7 +190,7 @@ function foo5b(x: C); // ok >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo5b(x: any) { } >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 29)) @@ -251,7 +251,7 @@ function foo9(x: C); // ok >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 28)) @@ -297,7 +297,7 @@ function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 29)) @@ -312,7 +312,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 30)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 30)) @@ -357,7 +357,7 @@ function foo15(x: C); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo15(x: any) { } >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 29)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.symbols index 4e5ac25e7d4fe..60acf7465a424 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.symbols @@ -40,7 +40,7 @@ class C { >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 8)) >U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 20)) >U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 20)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo(x: T, y: U): string { return null; } >foo : Symbol(C.foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 40)) @@ -155,15 +155,15 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37)) @@ -240,8 +240,8 @@ function foo5b(x: C); // ok >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo5b(x: any) { } >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 37)) @@ -251,8 +251,8 @@ function foo5c(x: C); >foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo5c(x: D); // ok >foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 37)) @@ -269,8 +269,8 @@ function foo6c(x: C); >foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 34)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo6c(x: D); // error, "any" does not satisfy the constraint >foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 34)) @@ -341,8 +341,8 @@ function foo9(x: C); // ok >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 36)) @@ -391,8 +391,8 @@ function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 37)) @@ -407,8 +407,8 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 38)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 38)) @@ -455,8 +455,8 @@ function foo15(x: C); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo15(x: any) { } >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 37)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols index 3126f4a6b5622..fd357c016afac 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols @@ -18,7 +18,7 @@ class B> { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 8, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) constructor(x: T) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 9, 16)) @@ -80,13 +80,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) @@ -162,7 +162,7 @@ function foo9(x: C); // error, types are structurally equal >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 28)) @@ -208,7 +208,7 @@ function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 29)) @@ -223,7 +223,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 30)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 30)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.symbols index ca1cd5d470f7c..c2d778aec8d1e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.symbols @@ -24,7 +24,7 @@ class C { >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 8)) >U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 20)) >U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 20)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) constructor(x: T, y: U) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 9, 16)) @@ -120,15 +120,15 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37)) @@ -184,8 +184,8 @@ function foo5c(x: C); >foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo5c(x: D); // ok >foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 37)) @@ -202,8 +202,8 @@ function foo6c(x: C); >foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 34)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo6c(x: D); // ok >foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 34)) @@ -244,8 +244,8 @@ function foo9(x: C); // error, types are structurally equal >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 36)) @@ -294,8 +294,8 @@ function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 37)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 37)) @@ -310,8 +310,8 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 38)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 38)) diff --git a/tests/baselines/reference/overloadsWithConstraints.symbols b/tests/baselines/reference/overloadsWithConstraints.symbols index b66e32149d360..a2fbea5e1b628 100644 --- a/tests/baselines/reference/overloadsWithConstraints.symbols +++ b/tests/baselines/reference/overloadsWithConstraints.symbols @@ -12,7 +12,7 @@ declare function f(x: T): T; declare function f(x: T): T >f : Symbol(f, Decl(overloadsWithConstraints.ts, 0, 0), Decl(overloadsWithConstraints.ts, 0, 46)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(overloadsWithConstraints.ts, 1, 37)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) diff --git a/tests/baselines/reference/parserRealSource11.symbols b/tests/baselines/reference/parserRealSource11.symbols index 676682dedf82d..e0c90f266dcb5 100644 --- a/tests/baselines/reference/parserRealSource11.symbols +++ b/tests/baselines/reference/parserRealSource11.symbols @@ -443,7 +443,7 @@ module TypeScript { resolved += String.fromCharCode(charCode); >resolved : Symbol(resolved, Decl(parserRealSource11.ts, 160, 15)) >String.fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fromCharCode : Symbol(StringConstructor.fromCharCode, Decl(lib.es5.d.ts, --, --)) >charCode : Symbol(charCode, Decl(parserRealSource11.ts, 166, 23)) @@ -7280,11 +7280,11 @@ module TypeScript { >this.text : Symbol(Comment.text, Decl(parserRealSource11.ts, 2325, 38)) >this : Symbol(Comment, Decl(parserRealSource11.ts, 2323, 5)) >text : Symbol(Comment.text, Decl(parserRealSource11.ts, 2325, 38)) ->this.content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>this.content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >this.content : Symbol(Comment.content, Decl(parserRealSource11.ts, 2329, 21)) >this : Symbol(Comment, Decl(parserRealSource11.ts, 2323, 5)) >content : Symbol(Comment.content, Decl(parserRealSource11.ts, 2329, 21)) ->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) for (var i = 0; i < this.text.length; i++) { >i : Symbol(i, Decl(parserRealSource11.ts, 2337, 28)) diff --git a/tests/baselines/reference/parserRealSource11.types b/tests/baselines/reference/parserRealSource11.types index d941bb4c4efe1..58613326b005c 100644 --- a/tests/baselines/reference/parserRealSource11.types +++ b/tests/baselines/reference/parserRealSource11.types @@ -18550,16 +18550,16 @@ module TypeScript { > : ^^^^^^^^ >this.content.split("\n") : string[] > : ^^^^^^^^ ->this.content.split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>this.content.split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >this.content : string > : ^^^^^^ >this : this > : ^^^^ >content : string > : ^^^^^^ ->split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >"\n" : "\n" > : ^^^^ diff --git a/tests/baselines/reference/parserharness.symbols b/tests/baselines/reference/parserharness.symbols index 1bab54ca5c5b5..b012d924d3c35 100644 --- a/tests/baselines/reference/parserharness.symbols +++ b/tests/baselines/reference/parserharness.symbols @@ -63,9 +63,9 @@ function filePath(fullPath: string) { var components = fullPath.split("/"); >components : Symbol(components, Decl(parserharness.ts, 33, 7)) ->fullPath.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>fullPath.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fullPath : Symbol(fullPath, Decl(parserharness.ts, 31, 18)) ->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var path: string[] = components.slice(0, components.length - 1); >path : Symbol(path, Decl(parserharness.ts, 34, 7)) @@ -551,9 +551,9 @@ module Harness { // we have to string-based splitting instead and try to figure out the delimiting chars var lines = content.split('\r\n'); >lines : Symbol(lines, Decl(parserharness.ts, 202, 11)) ->content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >content : Symbol(content, Decl(parserharness.ts, 198, 43)) ->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) if (lines.length === 1) { >lines.length : Symbol(Array.length, Decl(lib.es5.d.ts, --, --)) @@ -562,9 +562,9 @@ module Harness { lines = content.split('\n'); >lines : Symbol(lines, Decl(parserharness.ts, 202, 11)) ->content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>content.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >content : Symbol(content, Decl(parserharness.ts, 198, 43)) ->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) +>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } return lines; >lines : Symbol(lines, Decl(parserharness.ts, 202, 11)) diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index 0326d8453ba19..4570a4fa611bd 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -94,12 +94,12 @@ function filePath(fullPath: string) { > : ^^^^^^^^ >fullPath.split("/") : string[] > : ^^^^^^^^ ->fullPath.split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>fullPath.split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >fullPath : string > : ^^^^^^ ->split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >"/" : "/" > : ^^^ @@ -1264,12 +1264,12 @@ module Harness { > : ^^^^^^^^ >content.split('\r\n') : string[] > : ^^^^^^^^ ->content.split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>content.split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >content : string > : ^^^^^^ ->split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >'\r\n' : "\r\n" > : ^^^^^^ @@ -1292,12 +1292,12 @@ module Harness { > : ^^^^^^^^ >content.split('\n') : string[] > : ^^^^^^^^ ->content.split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>content.split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >content : string > : ^^^^^^ ->split : (separator: string | RegExp, limit?: number) => string[] -> : ^ ^^ ^^ ^^^ ^^^^^ +>split : { (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ >'\n' : "\n" > : ^^^^ } diff --git a/tests/baselines/reference/primitiveMembers.symbols b/tests/baselines/reference/primitiveMembers.symbols index d47ee8744b176..dbeaf43fab012 100644 --- a/tests/baselines/reference/primitiveMembers.symbols +++ b/tests/baselines/reference/primitiveMembers.symbols @@ -57,7 +57,7 @@ var n2: Number = 34; var s: String = "yo"; >s : Symbol(s, Decl(primitiveMembers.ts, 17, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var b: Boolean = true; >b : Symbol(b, Decl(primitiveMembers.ts, 18, 3)) diff --git a/tests/baselines/reference/sourceMapValidationForIn.symbols b/tests/baselines/reference/sourceMapValidationForIn.symbols index 9e1cd05bfacf1..1c5df41a128cd 100644 --- a/tests/baselines/reference/sourceMapValidationForIn.symbols +++ b/tests/baselines/reference/sourceMapValidationForIn.symbols @@ -3,7 +3,7 @@ === sourceMapValidationForIn.ts === for (var x in String) { >x : Symbol(x, Decl(sourceMapValidationForIn.ts, 0, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) WScript.Echo(x); >WScript.Echo : Symbol(Echo, Decl(lib.scripthost.d.ts, --, --)) @@ -13,7 +13,7 @@ for (var x in String) { } for (x in String) { >x : Symbol(x, Decl(sourceMapValidationForIn.ts, 0, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) WScript.Echo(x); >WScript.Echo : Symbol(Echo, Decl(lib.scripthost.d.ts, --, --)) @@ -23,7 +23,7 @@ for (x in String) { } for (var x2 in String) >x2 : Symbol(x2, Decl(sourceMapValidationForIn.ts, 6, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) { WScript.Echo(x2); >WScript.Echo : Symbol(Echo, Decl(lib.scripthost.d.ts, --, --)) @@ -33,7 +33,7 @@ for (var x2 in String) } for (x in String) >x : Symbol(x, Decl(sourceMapValidationForIn.ts, 0, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) { WScript.Echo(x); >WScript.Echo : Symbol(Echo, Decl(lib.scripthost.d.ts, --, --)) diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.symbols b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.symbols index c50e9f8bd3b17..3ece2057a7aa7 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.symbols +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.symbols @@ -46,7 +46,7 @@ class C2 { class C3 { >C3 : Symbol(C3, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 13, 1)) >T : Symbol(T, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 15, 9)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo(x: 'a'); >foo : Symbol(C3.foo, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 15, 28), Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 16, 16), Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 17, 14)) @@ -104,7 +104,7 @@ interface I2 { interface I3 { >I3 : Symbol(I3, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 33, 1)) >T : Symbol(T, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 35, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) (x: 'a'); >x : Symbol(x, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 36, 5)) @@ -181,7 +181,7 @@ var a3: { foo(x: T); >foo : Symbol(foo, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 58, 14), Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 59, 16)) >T : Symbol(T, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 60, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 60, 26)) >T : Symbol(T, Decl(specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts, 60, 8)) } diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols index 091cd8a5f1cc9..eff5a43362f2c 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols @@ -57,7 +57,7 @@ class C2 { class C3 { >C3 : Symbol(C3, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 18, 1)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 20, 9)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo(x: 'a'); >foo : Symbol(C3.foo, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 20, 28), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 21, 16), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 22, 19), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 23, 14)) @@ -133,7 +133,7 @@ interface I2 { interface I3 { >I3 : Symbol(I3, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 43, 1)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 45, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) (x: 'a'); >x : Symbol(x, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 46, 5)) @@ -238,7 +238,7 @@ var a3: { foo(x: T); >foo : Symbol(foo, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 75, 16), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 76, 19), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 77, 16)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 8)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 26)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 8)) } diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.symbols b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.symbols index ab9c5487302b2..3ce2942b1d1e5 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.symbols +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.symbols @@ -5,7 +5,7 @@ interface MyString extends String { >MyString : Symbol(MyString, Decl(stringIndexerConstrainsPropertyDeclarations.ts, 0, 0)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo: number; >foo : Symbol(MyString.foo, Decl(stringIndexerConstrainsPropertyDeclarations.ts, 2, 35)) diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt new file mode 100644 index 0000000000000..61486b58e0f7f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt @@ -0,0 +1,113 @@ +stringLiteralTypeIsSubtypeOfString.ts(54,5): error TS2416: Property 'split' in type 'C' is not assignable to the same property in base type 'String'. + Type '(separator: any, limit?: number) => string[]' is not assignable to type '{ (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; }'. + Type 'string[]' is not assignable to type '[]'. + Target allows only 0 element(s) but source may have more. + + +==== stringLiteralTypeIsSubtypeOfString.ts (1 errors) ==== + // string literal types are subtypes of string, any + + // ok + function f1(x: 'a'); + function f1(x: string); + function f1(x: string) { } + + // ok + function f2(x: 'a'); + function f2(x: any); + function f2(x: any) { } + + // errors + function f3(x: 'a'); + function f3(x: Object); + function f3(x: any) { } + + function f4(x: 'a'); + function f4(x: {}); + function f4(x: any) { } + + function f5(x: 'a'); + function f5(x: number); + function f5(x: any) { } + + function f6(x: 'a'); + function f6(x: boolean); + function f6(x: any) { } + + function f7(x: 'a'); + function f7(x: Date); + function f7(x: any) { } + + function f8(x: 'a'); + function f8(x: RegExp); + function f8(x: any) { } + + function f9(x: 'a'); + function f9(x: () => {}); + function f9(x: any) { } + + class C implements String { + toString(): string { return null; } + charAt(pos: number): string { return null; } + charCodeAt(index: number): number { return null; } + concat(...strings: string[]): string { return null; } + indexOf(searchString: string, position?: number): number { return null; } + lastIndexOf(searchString: string, position?: number): number { return null; } + localeCompare(that: string): number { return null; } + match(regexp: any): RegExpMatchArray { return null; } + replace(searchValue: any, replaceValue: any): string { return null; } + search(regexp: any): number { return null; } + slice(start?: number, end?: number): string { return null; } + split(separator: any, limit?: number): string[] { return null; } + ~~~~~ +!!! error TS2416: Property 'split' in type 'C' is not assignable to the same property in base type 'String'. +!!! error TS2416: Type '(separator: any, limit?: number) => string[]' is not assignable to type '{ (separator: string | RegExp, limit?: number): string[]; (this: Source, separator: Separator, limit?: undefined): Split; (separator: string | RegExp, limit: 0): []; }'. +!!! error TS2416: Type 'string[]' is not assignable to type '[]'. +!!! error TS2416: Target allows only 0 element(s) but source may have more. + substring(start: number, end?: number): string { return null; } + toLowerCase(): string { return null; } + toLocaleLowerCase(): string { return null; } + toUpperCase(): string { return null; } + toLocaleUpperCase(): string { return null; } + trim(): string { return null; } + length: number; + substr(from: number, length?: number): string { return null; } + valueOf(): string { return null; } + [index: number]: string; + } + + // BUG 831846 + function f10(x: 'a'); + function f10(x: C); + function f10(x: any) { } + + interface I extends String { + foo: string; + } + + // BUG 831846 + function f11(x: 'a'); + function f11(x: I); + function f11(x: any) { } + + function f12(x: 'a'); + function f12(x: T); + function f12(x: any) { } + + function f13(x: 'a'); + function f13(x: T); + function f13(x: any) { } + + enum E { A } + function f14(x: 'a'); + function f14(x: E); + function f14(x: any) { } + + function f15(x: 'a'); + function f15(x: U); + function f15(x: any) { } + + function f16(x: 'a'); + function f16(x: U); + function f16(x: any) { } + \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols index 711aa41cf1699..e3a0c69098c91 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols @@ -119,7 +119,7 @@ function f9(x: any) { } class C implements String { >C : Symbol(C, Decl(stringLiteralTypeIsSubtypeOfString.ts, 39, 23)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) toString(): string { return null; } >toString : Symbol(C.toString, Decl(stringLiteralTypeIsSubtypeOfString.ts, 41, 27)) @@ -225,7 +225,7 @@ function f10(x: any) { } interface I extends String { >I : Symbol(I, Decl(stringLiteralTypeIsSubtypeOfString.ts, 69, 24)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) foo: string; >foo : Symbol(I.foo, Decl(stringLiteralTypeIsSubtypeOfString.ts, 71, 28)) @@ -264,20 +264,20 @@ function f12(x: any) { } function f13(x: 'a'); >f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 31)) function f13(x: T); >f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 31)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 13)) function f13(x: any) { } >f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 31)) enum E { A } @@ -322,7 +322,7 @@ function f15(x: any) { } function f16(x: 'a'); >f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 30)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 13)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 44)) @@ -330,7 +330,7 @@ function f16(x: 'a'); function f16(x: U); >f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 30)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 13)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 44)) @@ -339,7 +339,7 @@ function f16(x: U); function f16(x: any) { } >f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 13)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 30)) >T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 13)) >x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 44)) diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types index 1e85210806b21..f809075f04cd3 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types @@ -33,11 +33,13 @@ function f2(x: any); >f2 : { (x: "a"): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f2(x: any) { } >f2 : { (x: "a"): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ // errors function f3(x: 'a'); @@ -56,6 +58,7 @@ function f3(x: any) { } >f3 : { (x: "a"): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f4(x: 'a'); >f4 : { (x: "a"): any; (x: {}): any; } @@ -73,6 +76,7 @@ function f4(x: any) { } >f4 : { (x: "a"): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f5(x: 'a'); >f5 : { (x: "a"): any; (x: number): any; } @@ -90,6 +94,7 @@ function f5(x: any) { } >f5 : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f6(x: 'a'); >f6 : { (x: "a"): any; (x: boolean): any; } @@ -107,6 +112,7 @@ function f6(x: any) { } >f6 : { (x: "a"): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f7(x: 'a'); >f7 : { (x: "a"): any; (x: Date): any; } @@ -124,6 +130,7 @@ function f7(x: any) { } >f7 : { (x: "a"): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f8(x: 'a'); >f8 : { (x: "a"): any; (x: RegExp): any; } @@ -141,6 +148,7 @@ function f8(x: any) { } >f8 : { (x: "a"): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f9(x: 'a'); >f9 : { (x: "a"): any; (x: () => {}): any; } @@ -158,6 +166,7 @@ function f9(x: any) { } >f9 : { (x: "a"): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ class C implements String { >C : C @@ -211,17 +220,21 @@ class C implements String { >match : (regexp: any) => RegExpMatchArray > : ^ ^^ ^^^^^ >regexp : any +> : ^^^ replace(searchValue: any, replaceValue: any): string { return null; } >replace : (searchValue: any, replaceValue: any) => string > : ^ ^^ ^^ ^^ ^^^^^ >searchValue : any +> : ^^^ >replaceValue : any +> : ^^^ search(regexp: any): number { return null; } >search : (regexp: any) => number > : ^ ^^ ^^^^^ >regexp : any +> : ^^^ slice(start?: number, end?: number): string { return null; } >slice : (start?: number, end?: number) => string @@ -235,6 +248,7 @@ class C implements String { >split : (separator: any, limit?: number) => string[] > : ^ ^^ ^^ ^^^ ^^^^^ >separator : any +> : ^^^ >limit : number > : ^^^^^^ @@ -304,6 +318,7 @@ function f10(x: any) { } >f10 : { (x: "a"): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ interface I extends String { foo: string; @@ -328,6 +343,7 @@ function f11(x: any) { } >f11 : { (x: "a"): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f12(x: 'a'); >f12 : { (x: "a"): any; (x: T_1): any; } @@ -345,6 +361,7 @@ function f12(x: any) { } >f12 : { (x: "a"): any; (x: T_1): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f13(x: 'a'); >f13 : { (x: "a"): any; (x: T_1): any; } @@ -362,6 +379,7 @@ function f13(x: any) { } >f13 : { (x: "a"): any; (x: T_1): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ enum E { A } >E : E @@ -385,6 +403,7 @@ function f14(x: any) { } >f14 : { (x: "a"): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f15(x: 'a'); >f15 : { (x: "a"): any; (x: U_1): any; } @@ -402,6 +421,7 @@ function f15(x: any) { } >f15 : { (x: "a"): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ function f16(x: 'a'); >f16 : { (x: "a"): any; (x: U_1): any; } @@ -419,4 +439,5 @@ function f16(x: any) { } >f16 : { (x: "a"): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any +> : ^^^ diff --git a/tests/baselines/reference/stringRawType.symbols b/tests/baselines/reference/stringRawType.symbols index ee710e5dc87e2..42a95495f9a64 100644 --- a/tests/baselines/reference/stringRawType.symbols +++ b/tests/baselines/reference/stringRawType.symbols @@ -3,7 +3,7 @@ === stringRawType.ts === String.raw({ raw: ["foo", "bar", "baz"] }, 1, 2); >String.raw : Symbol(StringConstructor.raw, Decl(lib.es2015.core.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) >raw : Symbol(StringConstructor.raw, Decl(lib.es2015.core.d.ts, --, --)) >raw : Symbol(raw, Decl(stringRawType.ts, 0, 12)) diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.symbols b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.symbols index 29c6ea9ef2974..467a11bce27f5 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.symbols +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.symbols @@ -205,7 +205,7 @@ function f5(x: T) { function f6(x: T) { >f6 : Symbol(f6, Decl(subtypesOfTypeParameterWithConstraints2.ts, 61, 1)) >T : Symbol(T, Decl(subtypesOfTypeParameterWithConstraints2.ts, 63, 12)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(subtypesOfTypeParameterWithConstraints2.ts, 63, 30)) >T : Symbol(T, Decl(subtypesOfTypeParameterWithConstraints2.ts, 63, 12)) diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.symbols b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.symbols index 85f7b8971536d..448ddf100159c 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.symbols +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.symbols @@ -21,6 +21,6 @@ class B extends A { constructor() { super(value => String(value)); } >value : Symbol(value, Decl(superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts, 7, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts, 7, 26)) } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.symbols b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.symbols index 47db0a3fc443b..09e1c9c574e55 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.symbols +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.symbols @@ -21,6 +21,6 @@ class B extends A { constructor() { super(value => String(value)); } >value : Symbol(value, Decl(superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.ts, 7, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.ts, 7, 26)) } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.symbols b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.symbols index f00d7c390c7b3..042277ff9ff59 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.symbols +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.symbols @@ -17,6 +17,6 @@ class B extends A { constructor() { super(value => String(value)); } >value : Symbol(value, Decl(superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.ts, 7, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.ts, 7, 26)) } diff --git a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.symbols b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.symbols index cef480346df40..f764c6512cf24 100644 --- a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.symbols +++ b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.symbols @@ -16,6 +16,6 @@ class B { constructor() { super(value => String(value)); } >value : Symbol(value, Decl(superCallFromClassThatHasNoBaseType1.ts, 7, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallFromClassThatHasNoBaseType1.ts, 7, 26)) } diff --git a/tests/baselines/reference/superCallFromFunction1.symbols b/tests/baselines/reference/superCallFromFunction1.symbols index c046061d5b737..a40d205711dab 100644 --- a/tests/baselines/reference/superCallFromFunction1.symbols +++ b/tests/baselines/reference/superCallFromFunction1.symbols @@ -6,6 +6,6 @@ function foo() { super(value => String(value)); >value : Symbol(value, Decl(superCallFromFunction1.ts, 1, 10)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallFromFunction1.ts, 1, 10)) } diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.symbols b/tests/baselines/reference/superCallParameterContextualTyping1.symbols index 01bb8d0be9803..a046a9088f315 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.symbols +++ b/tests/baselines/reference/superCallParameterContextualTyping1.symbols @@ -23,7 +23,7 @@ class B extends A { constructor() { super(value => String(value.toExponential())); } >super : Symbol(A, Decl(superCallParameterContextualTyping1.ts, 0, 0)) >value : Symbol(value, Decl(superCallParameterContextualTyping1.ts, 8, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value.toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallParameterContextualTyping1.ts, 8, 26)) >toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.symbols b/tests/baselines/reference/superCallParameterContextualTyping2.symbols index d80cb614650c7..c783c5e699301 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.symbols +++ b/tests/baselines/reference/superCallParameterContextualTyping2.symbols @@ -23,6 +23,6 @@ class C extends A { constructor() { super(value => String(value())); } >super : Symbol(A, Decl(superCallParameterContextualTyping2.ts, 0, 0)) >value : Symbol(value, Decl(superCallParameterContextualTyping2.ts, 8, 26)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superCallParameterContextualTyping2.ts, 8, 26)) } diff --git a/tests/baselines/reference/superNewCall1.symbols b/tests/baselines/reference/superNewCall1.symbols index 9f42e21413a11..c18637ae15e38 100644 --- a/tests/baselines/reference/superNewCall1.symbols +++ b/tests/baselines/reference/superNewCall1.symbols @@ -23,7 +23,7 @@ class B extends A { new super(value => String(value)); >super : Symbol(A, Decl(superNewCall1.ts, 0, 0)) >value : Symbol(value, Decl(superNewCall1.ts, 8, 18)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >value : Symbol(value, Decl(superNewCall1.ts, 8, 18)) } } diff --git a/tests/baselines/reference/templateLiteralTypes2.symbols b/tests/baselines/reference/templateLiteralTypes2.symbols index 5c447c6c70cb1..a892b227f6a88 100644 --- a/tests/baselines/reference/templateLiteralTypes2.symbols +++ b/tests/baselines/reference/templateLiteralTypes2.symbols @@ -242,7 +242,7 @@ function ft14(t: `foo${number}`) { let x2: String = t; >x2 : Symbol(x2, Decl(templateLiteralTypes2.ts, 66, 7)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >t : Symbol(t, Decl(templateLiteralTypes2.ts, 64, 14)) let x3: Object = t; diff --git a/tests/baselines/reference/templateStringInInstanceOf.symbols b/tests/baselines/reference/templateStringInInstanceOf.symbols index 6fe0b1a1730fa..a9517bbd07eff 100644 --- a/tests/baselines/reference/templateStringInInstanceOf.symbols +++ b/tests/baselines/reference/templateStringInInstanceOf.symbols @@ -3,5 +3,5 @@ === templateStringInInstanceOf.ts === var x = `abc${ 0 }def` instanceof String; >x : Symbol(x, Decl(templateStringInInstanceOf.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringInInstanceOfES6.symbols b/tests/baselines/reference/templateStringInInstanceOfES6.symbols index 1017516715bf0..24da7615814ad 100644 --- a/tests/baselines/reference/templateStringInInstanceOfES6.symbols +++ b/tests/baselines/reference/templateStringInInstanceOfES6.symbols @@ -3,5 +3,5 @@ === templateStringInInstanceOfES6.ts === var x = `abc${ 0 }def` instanceof String; >x : Symbol(x, Decl(templateStringInInstanceOfES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.symbols b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.symbols index 0867e276ba371..d8490e1e3a2bb 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.symbols @@ -3,5 +3,5 @@ === templateStringWithEmbeddedInstanceOf.ts === var x = `abc${ "hello" instanceof String }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedInstanceOf.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.symbols index 8fe945b4b71d7..bee6e6b71c742 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.symbols @@ -3,5 +3,5 @@ === templateStringWithEmbeddedInstanceOfES6.ts === var x = `abc${ "hello" instanceof String }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedInstanceOfES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols index 012c8bc0b2fce..83418263fd681 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols @@ -3,5 +3,5 @@ === templateStringWithEmbeddedNewOperator.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperator.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols index aa2cccac7747c..a53761a163a5e 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols @@ -3,5 +3,5 @@ === templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperatorES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js index 5a4e9f3db3c0d..02e911747cafc 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js @@ -1108,6 +1108,12 @@ Info seq [hh:mm:ss:mss] response: "kindModifiers": "declare", "sortText": "15" }, + { + "name": "Split", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, { "name": "string", "kind": "keyword", diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_revertUpdatedFile.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_revertUpdatedFile.js index f0d22e519baee..f2b7e057e10e0 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_revertUpdatedFile.js +++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_revertUpdatedFile.js @@ -1060,6 +1060,12 @@ Info seq [hh:mm:ss:mss] response: "kindModifiers": "declare", "sortText": "15" }, + { + "name": "Split", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, { "name": "string", "kind": "keyword", diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.symbols b/tests/baselines/reference/typeArgumentConstraintResolution1.symbols index 9f4642db11679..0e48bd7d6f703 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.symbols +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.symbols @@ -17,7 +17,7 @@ function foo1(test: string); function foo1(test: any) { } >foo1 : Symbol(foo1, Decl(typeArgumentConstraintResolution1.ts, 0, 0), Decl(typeArgumentConstraintResolution1.ts, 0, 39), Decl(typeArgumentConstraintResolution1.ts, 1, 46)) >T : Symbol(T, Decl(typeArgumentConstraintResolution1.ts, 2, 14)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >test : Symbol(test, Decl(typeArgumentConstraintResolution1.ts, 2, 32)) foo1(""); // should error @@ -44,7 +44,7 @@ function foo2(test: string): T; function foo2(test: any): any { return null; } >foo2 : Symbol(foo2, Decl(typeArgumentConstraintResolution1.ts, 3, 15), Decl(typeArgumentConstraintResolution1.ts, 7, 42), Decl(typeArgumentConstraintResolution1.ts, 8, 49)) >T : Symbol(T, Decl(typeArgumentConstraintResolution1.ts, 9, 14)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >test : Symbol(test, Decl(typeArgumentConstraintResolution1.ts, 9, 32)) foo2(""); // Type Date does not satisfy the constraint 'Number' for type parameter 'T extends Number' diff --git a/tests/baselines/reference/typeGuardConstructorNarrowAny.symbols b/tests/baselines/reference/typeGuardConstructorNarrowAny.symbols index 4f8fb55c63d1e..b2cc0eb9405c9 100644 --- a/tests/baselines/reference/typeGuardConstructorNarrowAny.symbols +++ b/tests/baselines/reference/typeGuardConstructorNarrowAny.symbols @@ -7,7 +7,7 @@ let var1: any; if (var1.constructor === String) { >var1 : Symbol(var1, Decl(typeGuardConstructorNarrowAny.ts, 1, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) var1; // String >var1 : Symbol(var1, Decl(typeGuardConstructorNarrowAny.ts, 1, 3)) diff --git a/tests/baselines/reference/typeGuardConstructorNarrowPrimitivesInUnion.symbols b/tests/baselines/reference/typeGuardConstructorNarrowPrimitivesInUnion.symbols index 9b5a06e9ac236..57411ba698212 100644 --- a/tests/baselines/reference/typeGuardConstructorNarrowPrimitivesInUnion.symbols +++ b/tests/baselines/reference/typeGuardConstructorNarrowPrimitivesInUnion.symbols @@ -19,7 +19,7 @@ if (var1.constructor === String) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardConstructorNarrowPrimitivesInUnion.ts, 1, 3)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var1; // "hello" | "world" >var1 : Symbol(var1, Decl(typeGuardConstructorNarrowPrimitivesInUnion.ts, 1, 3)) diff --git a/tests/baselines/reference/typeGuardConstructorPrimitiveTypes.symbols b/tests/baselines/reference/typeGuardConstructorPrimitiveTypes.symbols index b1410f89508bf..2a8d0e3e45d54 100644 --- a/tests/baselines/reference/typeGuardConstructorPrimitiveTypes.symbols +++ b/tests/baselines/reference/typeGuardConstructorPrimitiveTypes.symbols @@ -9,7 +9,7 @@ if (var1.constructor === String) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardConstructorPrimitiveTypes.ts, 1, 3)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) var1; // string >var1 : Symbol(var1, Decl(typeGuardConstructorPrimitiveTypes.ts, 1, 3)) @@ -63,7 +63,7 @@ if (var1.constructor === BigInt) { // Narrow a union of primitive object types let var2: String | Number | Boolean | Symbol | BigInt; >var2 : Symbol(var2, Decl(typeGuardConstructorPrimitiveTypes.ts, 22, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2020.number.d.ts, --, --)) >Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) @@ -73,7 +73,7 @@ if (var2.constructor === String) { >var2.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardConstructorPrimitiveTypes.ts, 22, 3)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 8 more) var2; // String >var2 : Symbol(var2, Decl(typeGuardConstructorPrimitiveTypes.ts, 22, 3)) diff --git a/tests/baselines/reference/undefinedAssignableToEveryType.symbols b/tests/baselines/reference/undefinedAssignableToEveryType.symbols index f773a627fe77f..98c5a5f88288a 100644 --- a/tests/baselines/reference/undefinedAssignableToEveryType.symbols +++ b/tests/baselines/reference/undefinedAssignableToEveryType.symbols @@ -113,7 +113,7 @@ var p: Number = undefined; var q: String = undefined; >q : Symbol(q, Decl(undefinedAssignableToEveryType.ts, 30, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) function foo(x: T, y: U, z: V) { diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols b/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols index 7ef788fdf3f89..fb9eeffd90d5d 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols @@ -42,7 +42,7 @@ class D1A extends Base { foo: String; >foo : Symbol(D1A.foo, Decl(undefinedIsSubtypeOfEverything.ts, 18, 24)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } diff --git a/tests/baselines/reference/validStringAssignments.symbols b/tests/baselines/reference/validStringAssignments.symbols index cd41110d2e6b7..d7495fc50c7b9 100644 --- a/tests/baselines/reference/validStringAssignments.symbols +++ b/tests/baselines/reference/validStringAssignments.symbols @@ -19,6 +19,6 @@ var c: string = x; var d: String = x; >d : Symbol(d, Decl(validStringAssignments.ts, 5, 3)) ->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(validStringAssignments.ts, 0, 3))