diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ed9d7f9b323bc..ae6859ad86e9c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8672,10 +8672,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const meaning = getMeaningOfEntityNameReference(node); const sym = resolveEntityName(leftmost, meaning, /*ignoreErrors*/ true, /*dontResolveAlias*/ true); if (sym) { - if (isSymbolAccessible(sym, context.enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible) { - if (!isDeclarationName(node)) { - introducesError = true; - } + if ( + !(sym.flags & SymbolFlags.TypeParameter) && // Type parameters are visible in the curent context if they are are resolvable + !isDeclarationName(node) && + isSymbolAccessible(sym, context.enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible + ) { + introducesError = true; } else { context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning); diff --git a/tests/baselines/reference/1.0lib-noErrors.types b/tests/baselines/reference/1.0lib-noErrors.types index 2ec358842f93c..17020ba6a41c0 100644 --- a/tests/baselines/reference/1.0lib-noErrors.types +++ b/tests/baselines/reference/1.0lib-noErrors.types @@ -2412,7 +2412,7 @@ interface Array<T> { } declare var Array: { >Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T_1>(...items: T_1[]): T_1[]; new (arrayLength?: number): any[]; new <T_2>(arrayLength: number): T_2[]; new <T_3>(...items: T_3[]): T_3[]; isArray(arg: any): boolean; prototype: Array<any>; } -> : ^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^ ^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^ ^^^ new (arrayLength?: number): any[]; >arrayLength : number diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types index e7e34b01cf53c..3dfd15734532b 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types @@ -160,7 +160,7 @@ module Errors { (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -173,7 +173,7 @@ module Errors { }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types index 1388556f9d186..8fcece343f415 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types @@ -111,7 +111,7 @@ var a16: <T extends Base>(x: { a: T; b: T }) => T[]; var a17: { >a17 : { <T extends Derived>(x: (a: T) => T): T[]; <T_1 extends Base>(x: (a: T_1) => T_1): T_1[]; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(x: (a: T) => T): T[]; >x : (a: T) => T @@ -132,7 +132,7 @@ var a18: { (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -145,7 +145,7 @@ var a18: { }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types index 5e84e38a22c50..016828c0f6a03 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types @@ -160,7 +160,7 @@ module Errors { new (x: { >x : { new <T extends Derived>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(a: T): T; >a : T @@ -173,7 +173,7 @@ module Errors { }): any[]; new (x: { >x : { new <T extends Derived2>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types index d57dca72c794d..c6314af856ffd 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types @@ -111,7 +111,7 @@ var a16: new <T extends Base>(x: { a: T; b: T }) => T[]; var a17: { >a17 : { new <T extends Derived>(x: new (a: T) => T): T[]; new <T_1 extends Base>(x: new (a: T_1) => T_1): T_1[]; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(x: new (a: T) => T): T[]; >x : new (a: T) => T @@ -132,7 +132,7 @@ var a18: { new (x: { >x : { new <T extends Derived>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(a: T): T; >a : T @@ -145,7 +145,7 @@ var a18: { }): any[]; new (x: { >x : { new <T extends Derived2>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types index 22420cd8b9800..444833a10a691 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types @@ -160,7 +160,7 @@ module Errors { (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -173,7 +173,7 @@ module Errors { }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types index 7971c2780002c..c42f464ef9e3d 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types @@ -113,7 +113,7 @@ interface A { // T a17: { >a17 : { <T extends Derived>(x: (a: T) => T): T[]; <T_1 extends Base>(x: (a: T_1) => T_1): T_1[]; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(x: (a: T) => T): T[]; >x : (a: T) => T @@ -134,7 +134,7 @@ interface A { // T (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -147,7 +147,7 @@ interface A { // T }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types index 534729bb0ac7a..e51ffbc4e82e1 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types @@ -54,7 +54,7 @@ var a: { var a2: { >a2 : { <T>(x: T): number; <T_1>(x: T_1): string; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: T): number; >x : T diff --git a/tests/baselines/reference/circularInlineMappedGenericTupleTypeNoCrash.types b/tests/baselines/reference/circularInlineMappedGenericTupleTypeNoCrash.types index ff022d5344218..32e48e24d5f62 100644 --- a/tests/baselines/reference/circularInlineMappedGenericTupleTypeNoCrash.types +++ b/tests/baselines/reference/circularInlineMappedGenericTupleTypeNoCrash.types @@ -7,14 +7,14 @@ class Foo<Elements extends readonly unknown[]> { public readonly elements: { [P in keyof Elements]: { bar: Elements[P] } }; >elements : { [P in keyof Elements]: { bar: Elements[P]; }; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ >bar : Elements[P] > : ^^^^^^^^^^^ public constructor( ...elements: { [P in keyof Elements]: { bar: Elements[P] } } >elements : { [P in keyof Elements]: { bar: Elements[P]; }; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ >bar : Elements[P] > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types index 01a59995fff08..ba805f2d726e9 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types @@ -106,7 +106,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) : BuildPubSubRecordType<SO_FAR & { name: TYPE; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE} : SO_FAR & { name: TYPE; } > : ^^^^^^^^^^^^^^^^^ ^^^ >Object.assign({}, soFar, {name: instance as TYPE}) : SO_FAR & { name: TYPE; } @@ -197,7 +197,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) : BuildPubSubRecordType<SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { <T extends {}, U>(target: T, source: U): T & U; <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -239,7 +239,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) : BuildPubSubRecordType<SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { <T extends {}, U>(target: T, source: U): T & U; <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -347,7 +347,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) : BuildPubSubRecordType<SO_FAR & { identifier: TYPE; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE} : SO_FAR & { identifier: TYPE; } > : ^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >Object.assign({}, soFar, {identifier: instance as TYPE}) : SO_FAR & Record<"record", unknown> & { identifier: TYPE; } @@ -434,7 +434,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) : BuildPubSubRecordType<SO_FAR & { record: TYPE; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE} : SO_FAR & { record: TYPE; } > : ^^^^^^^^^^^^^^^^^^^ ^^^ >Object.assign({}, soFar, {record: instance as TYPE}) : SO_FAR & { record: TYPE; } @@ -529,7 +529,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) : BuildPubSubRecordType<SO_FAR & { maxMsToWaitBeforePublishing: number; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { <T extends {}, U>(target: T, source: U): T & U; <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -563,7 +563,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) : BuildPubSubRecordType<SO_FAR & { maxMsToWaitBeforePublishing: number; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : <SO_FAR_1>(soFar: SO_FAR_1) => BuildPubSubRecordType<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { <T extends {}, U>(target: T, source: U): T & U; <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -746,7 +746,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildNameFieldConstructor(soFar) : { name?: undefined; } | { name: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR & { name: TYPE; }>; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildNameFieldConstructor : <SO_FAR_1>(soFar: SO_FAR_1) => { name?: undefined; } | { name: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR_1 & { name: TYPE; }>; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ @@ -754,7 +754,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildIdentifierFieldConstructor(soFar) : { identifier?: undefined; } | { identifier: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR & { identifier: TYPE; }>; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildIdentifierFieldConstructor : <SO_FAR_1>(soFar: SO_FAR_1) => { identifier?: undefined; } | { identifier: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR_1 & { identifier: TYPE; }>; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ @@ -762,7 +762,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildRecordFieldConstructor(soFar) : { record?: undefined; } | { record: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR & { record: TYPE; }>; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildRecordFieldConstructor : <SO_FAR_1>(soFar: SO_FAR_1) => { record?: undefined; } | { record: <TYPE>(instance?: TYPE) => BuildPubSubRecordType<SO_FAR_1 & { record: TYPE; }>; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ @@ -770,7 +770,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildStoredAsConstructor(soFar) : { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType<SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString; }>; storedAsRedisHash: () => BuildPubSubRecordType<SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA.redisHash; }>; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildStoredAsConstructor : <SO_FAR_1>(soFar: SO_FAR_1) => { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType<SO_FAR_1 & { storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString; }>; storedAsRedisHash: () => BuildPubSubRecordType<SO_FAR_1 & { storedAs: PubSubRecordIsStoredInRedisAsA.redisHash; }>; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ @@ -778,7 +778,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildMaxMsToWaitBeforePublishingFieldConstructor(soFar) : MaxMsToWaitBeforePublishingFieldConstructor<SO_FAR> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildMaxMsToWaitBeforePublishingFieldConstructor : <SO_FAR_1>(soFar: SO_FAR_1) => MaxMsToWaitBeforePublishingFieldConstructor<SO_FAR_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index 8bf7e9ee7ed7a..944b7b43059bc 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -676,7 +676,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(5) : 0 > : ^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >5 : 5 > : ^ @@ -684,7 +684,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf("hello") : "" > : ^^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"hello" : "hello" > : ^^^^^^^ @@ -692,7 +692,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(true) : false > : ^^^^^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >true : true > : ^^^^ @@ -700,7 +700,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(n) : 0 > : ^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ @@ -708,7 +708,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(b) : false > : ^^^^^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b : boolean > : ^^^^^^^ @@ -716,7 +716,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(x) : false | 0 > : ^^^^^^^^^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number | boolean > : ^^^^^^^^^^^^^^^^ @@ -724,7 +724,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(y) : ZeroOf<T> > : ^^^^^^^^^ >zeroOf : <T_1 extends string | number | boolean>(value: T_1) => ZeroOf<T_1> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >y : T > : ^ } diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.types b/tests/baselines/reference/constraintSatisfactionWithAny.types index 701ce8a300f4a..267983b0e9d6d 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.types +++ b/tests/baselines/reference/constraintSatisfactionWithAny.types @@ -20,7 +20,7 @@ function foo2<T extends { x: number }>(x: T): T { return null; } //function foo3<T extends T[]>(x: T): T { return null; } function foo4<T extends <T>(x: T) => void>(x: T): T { return null; } >foo4 : <T extends <T_1>(x: T_1) => void>(x: T) => T -> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^^^ +> : ^ ^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types b/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types index f0fca2db859bf..e8ae45cc566fe 100644 --- a/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types +++ b/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types @@ -172,7 +172,7 @@ var r5 = new a(1, ''); var b: { >b : { new <T>(x: T, y: string): C2<T>; new <T_1>(x: T_1, y: string): C2<T_1>; } -> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^ new <T>(x: T, y: string): C2<T>; >x : T diff --git a/tests/baselines/reference/constructSignaturesWithOverloads.types b/tests/baselines/reference/constructSignaturesWithOverloads.types index 6fb9cc3fac01e..b153d24b5c4b0 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloads.types +++ b/tests/baselines/reference/constructSignaturesWithOverloads.types @@ -173,7 +173,7 @@ var r5 = new a(1, ''); var b: { >b : { new <T>(x: T, y?: string): C2<T>; new <T_1>(x: T_1, y: string): C2<T_1>; } -> : ^^^^^^^ ^^^^^ ^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^ new<T>(x: T, y?: string): C2<T>; >x : T diff --git a/tests/baselines/reference/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.types b/tests/baselines/reference/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.types index 2e40d2d2e3ecb..0182eca2423ed 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.types +++ b/tests/baselines/reference/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.types @@ -83,7 +83,7 @@ var a: { var b: { >b : { new <T>(x: T, y: string): C2<T>; new <T_1>(x: T_1, y: string): C; } -> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^ ^^^ ^^^ +> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^ new <T>(x: T, y: string): C2<T>; >x : T diff --git a/tests/baselines/reference/constructorFunctionMethodTypeParameters.types b/tests/baselines/reference/constructorFunctionMethodTypeParameters.types index eb9d2c68061ad..7979b919d05cb 100644 --- a/tests/baselines/reference/constructorFunctionMethodTypeParameters.types +++ b/tests/baselines/reference/constructorFunctionMethodTypeParameters.types @@ -31,7 +31,7 @@ function Cls(t) { */ Cls.prototype.topLevelComment = function (t, v) { >Cls.prototype.topLevelComment = function (t, v) { return v} : <V extends string>(t: T, v: V) => V -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >Cls.prototype.topLevelComment : any >Cls.prototype : any > : ^^^ @@ -42,7 +42,7 @@ Cls.prototype.topLevelComment = function (t, v) { >topLevelComment : any > : ^^^ >function (t, v) { return v} : <V extends string>(t: T, v: V) => V -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^ >t : T > : ^ >v : V @@ -56,7 +56,7 @@ Cls.prototype.topLevelComment = function (t, v) { Cls.prototype.nestedComment = >Cls.prototype.nestedComment = /** * @template {string} U * @param {T} t * @param {U} u * @return {T} */ function (t, u) { return t } : <U extends string>(t: T, u: U) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >Cls.prototype.nestedComment : any >Cls.prototype : any > : ^^^ @@ -75,7 +75,7 @@ Cls.prototype.nestedComment = */ function (t, u) { >function (t, u) { return t } : <U extends string>(t: T, u: U) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >t : T > : ^ >u : U diff --git a/tests/baselines/reference/contextualComputedNonBindablePropertyType.types b/tests/baselines/reference/contextualComputedNonBindablePropertyType.types index bc073d48ff53e..8d32df03a8cc0 100644 --- a/tests/baselines/reference/contextualComputedNonBindablePropertyType.types +++ b/tests/baselines/reference/contextualComputedNonBindablePropertyType.types @@ -40,7 +40,7 @@ declare function forceMatch2<T>(matched: { >forceMatch2 : <T>(matched: { [key in keyof T]: ({ key }: { key: key; }) => void; }) => void > : ^ ^^^^^^^^^^^ ^^^^^ >matched : { [key in keyof T]: ({ key }: { key: key; }) => void; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^ [key in keyof T]: ({ key }: { key: key }) => void; >key : key @@ -95,9 +95,9 @@ type Mapped = { const propSelector = <propName extends string>(propName: propName): propName => propName; >propSelector : <propName extends string>(propName: propName) => propName -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ><propName extends string>(propName: propName): propName => propName : <propName extends string>(propName: propName) => propName -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >propName : propName > : ^^^^^^^^ >propName : propName diff --git a/tests/baselines/reference/contextualPropertyOfGenericMappedType.types b/tests/baselines/reference/contextualPropertyOfGenericMappedType.types index f19ff919cb9be..b134fb5754da1 100644 --- a/tests/baselines/reference/contextualPropertyOfGenericMappedType.types +++ b/tests/baselines/reference/contextualPropertyOfGenericMappedType.types @@ -9,7 +9,7 @@ declare function f<T extends object>(data: T, handlers: { [P in keyof T]: (value >data : T > : ^ >handlers : { [P in keyof T]: (value: T[P], prop: P) => void; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^ >value : T[P] > : ^^^^ >prop : P diff --git a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types index 9881bb1944b7e..3432b80c373c9 100644 --- a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types +++ b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types @@ -55,7 +55,7 @@ declare function f<T extends { type: string | symbol }>(action: T, blah: { [K in >action : T > : ^ >blah : { [K in T["type"]]: (p: K) => void; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^ >p : K > : ^ diff --git a/tests/baselines/reference/declarationEmitFirstTypeArgumentGenericFunctionType.types b/tests/baselines/reference/declarationEmitFirstTypeArgumentGenericFunctionType.types index 5b1a6d2ec2949..2d96a2be0924a 100644 --- a/tests/baselines/reference/declarationEmitFirstTypeArgumentGenericFunctionType.types +++ b/tests/baselines/reference/declarationEmitFirstTypeArgumentGenericFunctionType.types @@ -59,9 +59,9 @@ var prop2: Y<string[], <Tany>() => Tany>; // space after second type argument var prop3: Y< <Tany>() => Tany, <Tany>() => Tany>; // space before first type argument >prop3 : Y<(<Tany>() => Tany), <Tany_1>() => Tany_1> -> : ^^^^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^ ^^^^ ^^^^^^^ ^ var prop4: Y<(<Tany>() => Tany), <Tany>() => Tany>; // parenthesized first type argument >prop4 : Y<(<Tany>() => Tany), <Tany_1>() => Tany_1> -> : ^^^^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^ ^^^^ ^^^^^^^ ^ diff --git a/tests/baselines/reference/declarationEmitNestedGenerics.types b/tests/baselines/reference/declarationEmitNestedGenerics.types index a365fb4354ede..a005f8b0f6852 100644 --- a/tests/baselines/reference/declarationEmitNestedGenerics.types +++ b/tests/baselines/reference/declarationEmitNestedGenerics.types @@ -3,13 +3,13 @@ === declarationEmitNestedGenerics.ts === function f<T>(p: T) { >f : <T>(p: T) => <T_1>(x: T_1) => typeof p -> : ^ ^^^^^ ^^^^^^ ^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ ^^^^^ ^^^^^ >p : T > : ^ let g: <T>(x: T) => typeof p = null as any; >g : <T_1>(x: T_1) => typeof p -> : ^ ^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >p : T_1 diff --git a/tests/baselines/reference/declarationEmitTypeParamMergedWithPrivate.types b/tests/baselines/reference/declarationEmitTypeParamMergedWithPrivate.types index c9568a5833c2a..30d43ff04e1a1 100644 --- a/tests/baselines/reference/declarationEmitTypeParamMergedWithPrivate.types +++ b/tests/baselines/reference/declarationEmitTypeParamMergedWithPrivate.types @@ -16,7 +16,7 @@ export class Test<T> { public test(): T { >test : () => T -> : ^^^^^^^ +> : ^^^^^^ return null as any; >null as any : any diff --git a/tests/baselines/reference/declarationEmitTypeParameterNameReusedInOverloads.types b/tests/baselines/reference/declarationEmitTypeParameterNameReusedInOverloads.types index 8a0c6dcb1d187..cf50c2550d794 100644 --- a/tests/baselines/reference/declarationEmitTypeParameterNameReusedInOverloads.types +++ b/tests/baselines/reference/declarationEmitTypeParameterNameReusedInOverloads.types @@ -29,7 +29,7 @@ export type Foo = { new (x: { >x : { new <T extends Derived>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(a: T): T; >a : T @@ -42,7 +42,7 @@ export type Foo = { }): any[]; new (x: { >x : { new <T extends Derived2>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/declarationEmitTypeParameterNameShadowedInternally.types b/tests/baselines/reference/declarationEmitTypeParameterNameShadowedInternally.types index 080a79d6230b4..c5daa52956cd4 100644 --- a/tests/baselines/reference/declarationEmitTypeParameterNameShadowedInternally.types +++ b/tests/baselines/reference/declarationEmitTypeParameterNameShadowedInternally.types @@ -3,17 +3,17 @@ === declarationEmitTypeParameterNameShadowedInternally.ts === export const foo = <T,>(x: T) => { >foo : <T>(x: T) => <T_1>(y: T_1) => readonly [T, T_1] -> : ^ ^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ><T,>(x: T) => { const inner = <T,>(y: T) => [x, y] as const; return inner;} : <T>(x: T) => <T_1>(y: T_1) => readonly [T, T_1] -> : ^ ^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >x : T > : ^ const inner = <T,>(y: T) => [x, y] as const; >inner : <T_1>(y: T_1) => readonly [T, T_1] -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ><T,>(y: T) => [x, y] as const : <T_1>(y: T_1) => readonly [T, T_1] -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >y : T > : ^ >[x, y] as const : readonly [T_1, T] diff --git a/tests/baselines/reference/functionConstraintSatisfaction.types b/tests/baselines/reference/functionConstraintSatisfaction.types index f512b87e42f6e..82a71d8302515 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.types +++ b/tests/baselines/reference/functionConstraintSatisfaction.types @@ -176,7 +176,7 @@ var b2: { new <T>(x: T): T }; var c2: { <T>(x: T): T; <T>(x: T, y: T): T }; >c2 : { <T>(x: T): T; <T_1>(x: T_1, y: T_1): T_1; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/functionConstraintSatisfaction3.types b/tests/baselines/reference/functionConstraintSatisfaction3.types index a18da402e8a12..df28192a1956f 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction3.types +++ b/tests/baselines/reference/functionConstraintSatisfaction3.types @@ -150,7 +150,7 @@ var b2: { new <T>(x: T): T }; var c2: { <T>(x: T): T; <T>(x: T, y: T): T }; >c2 : { <T>(x: T): T; <T_1>(x: T_1, y: T_1): T_1; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/functionLiteralForOverloads.types b/tests/baselines/reference/functionLiteralForOverloads.types index 13e5f363cdaab..76ddd907ccec6 100644 --- a/tests/baselines/reference/functionLiteralForOverloads.types +++ b/tests/baselines/reference/functionLiteralForOverloads.types @@ -41,7 +41,7 @@ var f2: { var f3: { >f3 : { <T>(x: T): string; <T_1>(x: T_1): number; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: T): string; >x : T @@ -59,7 +59,7 @@ var f3: { var f4: { >f4 : { <T>(x: string): T; <T_1>(x: number): T_1; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^^^^^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: string): T; >x : string diff --git a/tests/baselines/reference/functionLiteralForOverloads2.types b/tests/baselines/reference/functionLiteralForOverloads2.types index 9332834ff06b3..e8c4e0ecee210 100644 --- a/tests/baselines/reference/functionLiteralForOverloads2.types +++ b/tests/baselines/reference/functionLiteralForOverloads2.types @@ -69,7 +69,7 @@ var f2: { var f3: { >f3 : { new <T>(x: string): D<T>; new <T_1>(x: number): D<T_1>; } -> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ new<T>(x: string): D<T>; >x : string diff --git a/tests/baselines/reference/functionLiterals.types b/tests/baselines/reference/functionLiterals.types index d65d0ec55a1c5..30ec86de4c51d 100644 --- a/tests/baselines/reference/functionLiterals.types +++ b/tests/baselines/reference/functionLiterals.types @@ -189,8 +189,8 @@ c.func5 = c.func4; // generic versions var b2: { ->b2 : { func1<T>(x: T): number; func2: <T_1>(x: T_1) => number; func3: <T_2>(x: T_2) => number; } -> : ^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^ +>b2 : { func1<T>(x: T): number; func2: <T>(x: T_1) => number; func3: { <T>(x: T_1): number; }; } +> : ^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^^^^^^^ ^^^ func1<T>(x: T): number; // Method signature >func1 : <T>(x: T) => number @@ -309,8 +309,8 @@ b2.func3 = b2.func2; > : ^^^^^^^^^^^^^^^^^^^ var c2: { ->c2 : { func4<T>(x: T): number; func4<T_1>(s: T_1): string; func5: { <T_2>(x: T_2): number; <T_3>(s: T_3): string; }; } -> : ^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ^^^^^^^^^^^ ^^^^^^ +>c2 : { func4<T>(x: T): number; func4<T_1>(s: T_1): string; func5: { <T>(x: T_2): number; <T>(s: T_2): string; }; } +> : ^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^ func4<T>(x: T): number; >func4 : { <T>(x: T): number; <T_1>(s: T_1): string; } @@ -326,7 +326,7 @@ var c2: { func5: { >func5 : { <T>(x: T): number; <T_1>(s: T_1): string; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: T): number; >x : T diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.types b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.types index d6b145bcb6c56..16600c33cdd98 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.types +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.types @@ -3,9 +3,9 @@ === genericAssignmentCompatOfFunctionSignatures1.ts === var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { } >x1 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { } : <T, U extends { a: T; b: string; }>(x: T, z: U) => void -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >foo3 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void > : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >a : T @@ -19,9 +19,9 @@ var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { } var x2 = function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { } >x2 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { } : <T, U extends { a: T; b: number; }>(x: T, z: U) => void -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >foo3 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void > : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^^ >a : T diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types index 972c2d95da548..3f270e52be47f 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types @@ -43,7 +43,7 @@ var r = foo4(a); // T is {} (candidates boolean and string), U is any (candidate var b: { >b : { <T>(x: boolean): T; <T_1>(x: T_1): any; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: boolean): T; >x : boolean diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types index 48e6a397a1b2e..3f253a7f6efa5 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types @@ -57,7 +57,7 @@ var r = foo4(a); // T is {} (candidates boolean and string), U is {} (candidates var b: { >b : { new <T>(x: boolean): T; new <T_1>(x: T_1): any; } -> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^ ^^^ +> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ new<T>(x: boolean): T; >x : boolean diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types index 7ed846024704a..3aa1fd4d173bb 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types @@ -106,7 +106,7 @@ module GenericParameter { var b: { new<T>(x: T): string; new<T>(x: number): T; } >b : { new <T>(x: T): string; new <T_1>(x: number): T_1; } -> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number @@ -192,7 +192,7 @@ module GenericParameter { var c: { new <T>(x: T): string; <T>(x: number): T; } >c : { <T>(x: number): T; new <T_1>(x: T_1): string; } -> : ^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number @@ -200,7 +200,7 @@ module GenericParameter { var c2: { new <T>(x: T): string; new<T>(x: number): T; } >c2 : { new <T>(x: T): string; new <T_1>(x: number): T_1; } -> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types index a8cad1b35676a..d727c57924100 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types @@ -154,7 +154,7 @@ module GenericParameter { var c: { new<T>(x: T): number; new<T>(x: number): T; } >c : { new <T>(x: T): number; new <T_1>(x: number): T_1; } -> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types index 305bb9dd5dfc7..bdd177e3f92b7 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types @@ -104,7 +104,7 @@ module GenericParameter { var a: { <T>(x: T): string; <T>(x: number): T; } >a : { <T>(x: T): string; <T_1>(x: number): T_1; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^^^^^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types index ab0fcee6358a4..a1adfae8efc6f 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types @@ -154,7 +154,7 @@ module GenericParameter { var a: { <T>(x: T): number; <T>(x: number): T; } >a : { <T>(x: T): number; <T_1>(x: number): T_1; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^^^^^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ >x : T > : ^ >x : number diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types index 803927122062d..10adada5da9e7 100644 --- a/tests/baselines/reference/genericFunctionInference1.types +++ b/tests/baselines/reference/genericFunctionInference1.types @@ -520,7 +520,7 @@ const g09: <T>(x: T) => number = pipe(list, x => x.length); const g10: <T extends { value: T }>(x: T) => T = pipe(foo); >g10 : <T extends { value: T; }>(x: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >x : T @@ -534,7 +534,7 @@ const g10: <T extends { value: T }>(x: T) => T = pipe(foo); const g12: <T extends { value: T }>(x: T) => T = pipe(foo, foo); >g12 : <T extends { value: T; }>(x: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >x : T diff --git a/tests/baselines/reference/genericMemberFunction.types b/tests/baselines/reference/genericMemberFunction.types index f7ed37a579e11..9615bb8a93b33 100644 --- a/tests/baselines/reference/genericMemberFunction.types +++ b/tests/baselines/reference/genericMemberFunction.types @@ -87,7 +87,7 @@ export class BuildResult<A, B, C>{ >forEach : any > : ^^^ ><A, B extends A, C>(each: FileWithErrors<A, B, C>) => { this.removeFile(each); } : <A_1, B_1 extends A_1, C_1>(each: FileWithErrors<A_1, B_1, C_1>) => void -> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ >each : FileWithErrors<A, B, C> > : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/genericOverloadSignatures.types b/tests/baselines/reference/genericOverloadSignatures.types index c22b59c335f37..a2370649b20a5 100644 --- a/tests/baselines/reference/genericOverloadSignatures.types +++ b/tests/baselines/reference/genericOverloadSignatures.types @@ -62,7 +62,7 @@ class C2<T> { } var b: { >b : { new <T>(x: T, y: string): C2<T>; new <T_1>(x: T_1, y: string): C2<T_1>; } -> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^^^^^ ^^^^^ ^^^^^ ^^^ ^^^ new <T>(x: T, y: string): C2<T>; >x : T diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.types b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.types index 142083765f5a7..864c1df87dc31 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.types +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.types @@ -46,9 +46,9 @@ interface I<X, X> { var m = { >m : { a: <X>() => void; b: <X_1>(a: X_1, b: X_1) => X_1; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^ >{ a: function f<X, X>() {}, b: function f2<X, X>(a: X, b: X): X { return null; }} : { a: <X>() => void; b: <X_1>(a: X_1, b: X_1) => X_1; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^ a: function f<X, X>() {}, >a : <X>() => void diff --git a/tests/baselines/reference/homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.types b/tests/baselines/reference/homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.types index f4fe333460543..a5caf4aba7ea7 100644 --- a/tests/baselines/reference/homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.types +++ b/tests/baselines/reference/homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.types @@ -20,7 +20,7 @@ declare function func1< T extends Record<PropertyKey, readonly any[]>, >(fields: { >fields : { [K in keyof T]: { label: string; options: [...HandleOptions<T[K]>]; }; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^ [K in keyof T]: { label: string; diff --git a/tests/baselines/reference/identicalCallSignatures.types b/tests/baselines/reference/identicalCallSignatures.types index 91e7ac708995a..8d8e482e13b6d 100644 --- a/tests/baselines/reference/identicalCallSignatures.types +++ b/tests/baselines/reference/identicalCallSignatures.types @@ -31,7 +31,7 @@ interface I2<T> { var a: { >a : { (x: any): number; (x: any): number; <T>(x: T): T; <T_1>(x: T_1): T_1; } -> : ^^^^^^^^^^^^ ^^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ (x): number; >x : any diff --git a/tests/baselines/reference/instantiateTemplateTagTypeParameterOnVariableStatement.types b/tests/baselines/reference/instantiateTemplateTagTypeParameterOnVariableStatement.types index 6edd43e862768..3fd58a3f7573e 100644 --- a/tests/baselines/reference/instantiateTemplateTagTypeParameterOnVariableStatement.types +++ b/tests/baselines/reference/instantiateTemplateTagTypeParameterOnVariableStatement.types @@ -8,9 +8,9 @@ */ const seq = a => b => b; >seq : <T>(a: T) => (b: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^ >a => b => b : <T>(a: T) => (b: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^ >a : T > : ^ >b => b : (b: T) => T diff --git a/tests/baselines/reference/instantiationExpressions.types b/tests/baselines/reference/instantiationExpressions.types index 37eea66feeb1e..429c7e2dfdf8b 100644 --- a/tests/baselines/reference/instantiationExpressions.types +++ b/tests/baselines/reference/instantiationExpressions.types @@ -754,7 +754,7 @@ type T32<B> = InstanceType<T30<B>>; // { b: B } declare const g2: { >g2 : { <T extends string>(a: T): T; new <T_1 extends number>(b: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends string>(a: T): T; >a : T @@ -779,7 +779,7 @@ type T41<U extends number> = typeof g2<U>; // Error declare const g3: { >g3 : { <T extends string>(a: T): T; new <T_1 extends number, Q>(b: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends string>(a: T): T; >a : T diff --git a/tests/baselines/reference/jsDeclarationsFunctionsCjs.types b/tests/baselines/reference/jsDeclarationsFunctionsCjs.types index 602a621634faa..674742e149f64 100644 --- a/tests/baselines/reference/jsDeclarationsFunctionsCjs.types +++ b/tests/baselines/reference/jsDeclarationsFunctionsCjs.types @@ -131,9 +131,9 @@ module.exports.d = function d(a, b) { return /** @type {*} */(null); } */ module.exports.e = function e(a, b) { return /** @type {*} */(null); } >module.exports.e = function e(a, b) { return /** @type {*} */(null); } : <T, U>(a: T, b: U) => T & U -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ ^^^^^ >module.exports.e : <T, U>(a: T, b: U) => T & U -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ ^^^^^^^^^^ >module.exports : typeof module.exports > : ^^^^^^^^^^^^^^^^^^^^^ >module : { exports: typeof module.exports; } @@ -143,7 +143,7 @@ module.exports.e = function e(a, b) { return /** @type {*} */(null); } >e : <T, U>(a: T, b: U) => T & U > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function e(a, b) { return /** @type {*} */(null); } : <T, U>(a: T, b: U) => T & U -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ ^^^^^^^^^^ >e : <T, U>(a: T, b: U) => T & U > : ^ ^^ ^^^^^ ^^^^^ ^^^^^^^^^^ >a : T @@ -158,9 +158,9 @@ module.exports.e = function e(a, b) { return /** @type {*} */(null); } */ module.exports.f = function f(a) { >module.exports.f = function f(a) { return a;} : { <T>(a: T): T; self: any; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ >module.exports.f : { <T>(a: T): T; self: any; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ >module.exports : typeof module.exports > : ^^^^^^^^^^^^^^^^^^^^^ >module : { exports: typeof module.exports; } @@ -170,7 +170,7 @@ module.exports.f = function f(a) { >f : { <T>(a: T): T; self: any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function f(a) { return a;} : { <T>(a: T): T; self: any; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ >f : { <T>(a: T): T; self: any; } > : ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ >a : T diff --git a/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js b/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js index 43586e85aed48..33df72eb83eb1 100644 --- a/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js +++ b/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js @@ -120,16 +120,10 @@ export type TaskGroup = { /** * @type {{[P in TaskGroupIds]: {id: P, label: string}}} */ -export const taskGroups: { - parseHTML: { - id: "parseHTML"; - label: string; - }; - styleLayout: { - id: "styleLayout"; - label: string; - }; -}; +export const taskGroups: { [P in TaskGroupIds]: { + id: P; + label: string; +}; }; /** @type {Object<string, TaskGroup>} */ export const taskNameToGroup: { [x: string]: TaskGroup; diff --git a/tests/baselines/reference/jsFileFunctionOverloads.types b/tests/baselines/reference/jsFileFunctionOverloads.types index 8a2a63ae2fd34..808abb33080d8 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads.types +++ b/tests/baselines/reference/jsFileFunctionOverloads.types @@ -40,9 +40,9 @@ */ const identity = x => x; >identity : <T>(x: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ >x => x : <T>(x: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/jsFileFunctionOverloads2.types b/tests/baselines/reference/jsFileFunctionOverloads2.types index 5f4061f57ce77..60125f862b5e3 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads2.types +++ b/tests/baselines/reference/jsFileFunctionOverloads2.types @@ -38,9 +38,9 @@ */ const identity = x => x; >identity : <T>(x: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ >x => x : <T>(x: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/jsdocTemplateConstructorFunction.types b/tests/baselines/reference/jsdocTemplateConstructorFunction.types index 9c237fe4c2a7c..096c9c8f3312a 100644 --- a/tests/baselines/reference/jsdocTemplateConstructorFunction.types +++ b/tests/baselines/reference/jsdocTemplateConstructorFunction.types @@ -42,7 +42,7 @@ function Zet(t) { */ Zet.prototype.add = function(v, id) { >Zet.prototype.add = function(v, id) { this.u = v || this.t return id(this.u)} : (v: T, id: Id<T>) => T -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^ ^^^^^^ >Zet.prototype.add : any > : ^^^ >Zet.prototype : any @@ -54,7 +54,7 @@ Zet.prototype.add = function(v, id) { >add : any > : ^^^ >function(v, id) { this.u = v || this.t return id(this.u)} : (v: T, id: Id<T>) => T -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^ ^^^^^^ >v : T > : ^ >id : Id<T> diff --git a/tests/baselines/reference/jsdocTemplateConstructorFunction2.types b/tests/baselines/reference/jsdocTemplateConstructorFunction2.types index ccc1520ff1eef..13c0adad8b56c 100644 --- a/tests/baselines/reference/jsdocTemplateConstructorFunction2.types +++ b/tests/baselines/reference/jsdocTemplateConstructorFunction2.types @@ -38,8 +38,8 @@ function Zet(t) { * @param {T} o.nested */ Zet.prototype.add = function(v, o) { ->Zet.prototype.add = function(v, o) { this.u = v || o.nested return this.u} : (v: T, o: { nested: T; }) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Zet.prototype.add = function(v, o) { this.u = v || o.nested return this.u} : (v: T, o: { nested: T;}) => T +> : ^^^^ ^^^^^^ ^^ ^^^^^^^^ >Zet.prototype.add : any > : ^^^ >Zet.prototype : any @@ -50,8 +50,8 @@ Zet.prototype.add = function(v, o) { > : ^^^ >add : any > : ^^^ ->function(v, o) { this.u = v || o.nested return this.u} : (v: T, o: { nested: T; }) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>function(v, o) { this.u = v || o.nested return this.u} : (v: T, o: { nested: T;}) => T +> : ^^^^ ^^^^^^ ^^ ^^^^^^^^ >v : T > : ^ >o : { nested: T; } diff --git a/tests/baselines/reference/jsdocTemplateTag2.types b/tests/baselines/reference/jsdocTemplateTag2.types index 1476c842a98e2..2d6f7a3fb1122 100644 --- a/tests/baselines/reference/jsdocTemplateTag2.types +++ b/tests/baselines/reference/jsdocTemplateTag2.types @@ -3,9 +3,9 @@ === github17339.js === var obj = { >obj : { x: <T>(a: T) => T; } -> : ^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^ ^^^ >{ /** * @template T * @param {T} a * @returns {T} */ x: function (a) { return a; },} : { x: <T>(a: T) => T; } -> : ^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^ ^^^ /** * @template T @@ -14,9 +14,9 @@ var obj = { */ x: function (a) { >x : <T>(a: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >function (a) { return a; } : <T>(a: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >a : T > : ^ diff --git a/tests/baselines/reference/jsdocTemplateTag4.types b/tests/baselines/reference/jsdocTemplateTag4.types index bac8ab6afa171..932f609a511ac 100644 --- a/tests/baselines/reference/jsdocTemplateTag4.types +++ b/tests/baselines/reference/jsdocTemplateTag4.types @@ -32,7 +32,7 @@ function Multimap() { */ Multimap.prototype.get = function (key) { >Multimap.prototype.get = function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >Multimap.prototype.get : any >Multimap.prototype : any > : ^^^ @@ -43,7 +43,7 @@ Multimap.prototype.get = function (key) { >get : any > : ^^^ >function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^ >key : K > : ^ @@ -97,7 +97,7 @@ var Multimap2 = function() { */ Multimap2.prototype.get = function (key) { >Multimap2.prototype.get = function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >Multimap2.prototype.get : any >Multimap2.prototype : any > : ^^^ @@ -108,7 +108,7 @@ Multimap2.prototype.get = function (key) { >get : any > : ^^^ >function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^ >key : K > : ^ @@ -174,7 +174,7 @@ Ns.Multimap3 = function() { */ Ns.Multimap3.prototype.get = function (key) { >Ns.Multimap3.prototype.get = function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >Ns.Multimap3.prototype.get : any >Ns.Multimap3.prototype : any > : ^^^ @@ -189,7 +189,7 @@ Ns.Multimap3.prototype.get = function (key) { >get : any > : ^^^ >function (key) { return this._map[key + ''];} : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^ >key : K > : ^ diff --git a/tests/baselines/reference/jsdocTemplateTag5.types b/tests/baselines/reference/jsdocTemplateTag5.types index 852d5a0086147..ffee4633c86b8 100644 --- a/tests/baselines/reference/jsdocTemplateTag5.types +++ b/tests/baselines/reference/jsdocTemplateTag5.types @@ -28,15 +28,15 @@ function Multimap() { Multimap.prototype = { >Multimap.prototype = { /** * @param {K} key the key ok * @returns {V} the value ok */ get(key) { return this._map[key + '']; }} : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ >Multimap.prototype : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ >Multimap : typeof Multimap > : ^^^^^^^^^^^^^^^ >prototype : { get(key: K): V; } > : ^^^^^^^^^^^^^^^^^^^ >{ /** * @param {K} key the key ok * @returns {V} the value ok */ get(key) { return this._map[key + '']; }} : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ /** * @param {K} key the key ok @@ -44,7 +44,7 @@ Multimap.prototype = { */ get(key) { >get : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >key : K > : ^ @@ -95,15 +95,15 @@ var Multimap2 = function() { Multimap2.prototype = { >Multimap2.prototype = { /** * @param {K} key the key ok * @returns {V} the value ok */ get: function(key) { return this._map[key + '']; }} : { get: (key: K) => V; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ ^^^ >Multimap2.prototype : { get: (key: K) => V; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ ^^^ >Multimap2 : typeof Multimap2 > : ^^^^^^^^^^^^^^^^ >prototype : { get: (key: K) => V; } > : ^^^^^^^^^^^^^^^^^^^^^^^ >{ /** * @param {K} key the key ok * @returns {V} the value ok */ get: function(key) { return this._map[key + '']; }} : { get: (key: K) => V; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ ^^^ /** * @param {K} key the key ok @@ -111,9 +111,9 @@ Multimap2.prototype = { */ get: function(key) { >get : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >function(key) { return this._map[key + '']; } : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >key : K > : ^ @@ -176,9 +176,9 @@ Ns.Multimap3 = function() { Ns.Multimap3.prototype = { >Ns.Multimap3.prototype = { /** * @param {K} key the key ok * @returns {V} the value ok */ get(key) { return this._map[key + '']; }} : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ >Ns.Multimap3.prototype : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ >Ns.Multimap3 : typeof Multimap3 > : ^^^^^^^^^^^^^^^^ >Ns : typeof Ns @@ -188,7 +188,7 @@ Ns.Multimap3.prototype = { >prototype : { get(key: K): V; } > : ^^^^^^^^^^^^^^^^^^^ >{ /** * @param {K} key the key ok * @returns {V} the value ok */ get(key) { return this._map[key + '']; }} : { get(key: K): V; } -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^ ^^^ /** * @param {K} key the key ok @@ -196,7 +196,7 @@ Ns.Multimap3.prototype = { */ get(key) { >get : (key: K) => V -> : ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >key : K > : ^ diff --git a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types b/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types index d1c998d9b919c..198e9c9d58a2d 100644 --- a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types +++ b/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types @@ -20,8 +20,8 @@ declare function omit<T, K extends string>(names: readonly K[], obj: T): Omit<T, > : ^ declare function omit<K extends string>(names: readonly K[]): <T>(obj: T) => Omit<T, K>; ->omit : { <T, K_1 extends string>(names: readonly K_1[], obj: T): Omit<T, K_1>; <K extends string>(names: readonly K[]): <T_1>(obj: T_1) => Omit<T_1, K>; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>omit : { <T, K_1 extends string>(names: readonly K_1[], obj: T): Omit<T, K_1>; <K extends string>(names: readonly K[]): <T>(obj: T_1) => Omit<T_1, K>; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >names : readonly K[] > : ^^^^^^^^^^^^ >obj : T diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index d33afc579c34b..acd32d804a1b1 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -2929,7 +2929,7 @@ class Form<T> { private childFormFactories: {[K in keyof T]: (v: T[K]) => Form<T[K]>} >childFormFactories : { [K in keyof T]: (v: T[K]) => Form<T[K]>; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^ >v : T[K] > : ^^^^ diff --git a/tests/baselines/reference/methodSignaturesWithOverloads.types b/tests/baselines/reference/methodSignaturesWithOverloads.types index 6b50733575fc8..1a8333326db00 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads.types @@ -35,8 +35,8 @@ var c: { }; var c2: { ->c2 : { func4?<T>(x: T): number; func4?<T_1>(s: T_1): string; func5?: { <T_2>(x: T_2): number; <T_3>(s: T_3): string; }; } -> : ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ^^^^^^^^^^^ ^^^^^^ +>c2 : { func4?<T>(x: T): number; func4?<T_1>(s: T_1): string; func5?: { <T>(x: T_2): number; <T>(s: T_2): string; }; } +> : ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^^ ^^^ func4<T>(x: T): number; >func4 : { <T>(x: T): number; <T_1>(s: T_1): string; } @@ -52,7 +52,7 @@ var c2: { func5?: { >func5 : { <T>(x: T): number; <T_1>(s: T_1): string; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: T): number; >x : T diff --git a/tests/baselines/reference/methodSignaturesWithOverloads2.types b/tests/baselines/reference/methodSignaturesWithOverloads2.types index 5e02bbd2441ef..360be434362e8 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads2.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads2.types @@ -69,8 +69,8 @@ c.func5 = c.func4; var c2: { ->c2 : { func4?<T>(x: T): number; func4?<T_1>(s: T_1): string; func5?: { <T_2>(x: T_2): number; <T_3>(s: T_3): string; }; } -> : ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ^^^^^^^^^^^ ^^^^^^ +>c2 : { func4?<T>(x: T): number; func4?<T_1>(s: T_1): string; func5?: { <T>(x: T_2): number; <T>(s: T_2): string; }; } +> : ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^ ^^^^^ ^^^ ^^^^^^^^^^ ^^^ func4?<T>(x: T): number; >func4 : { <T>(x: T): number; <T_1>(s: T_1): string; } @@ -86,7 +86,7 @@ var c2: { func5?: { >func5 : { <T>(x: T): number; <T_1>(s: T_1): string; } -> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^ ^^^ ^^^ ^^^^^ ^^^ ^^^ <T>(x: T): number; >x : T diff --git a/tests/baselines/reference/nonInferrableTypePropagation2.types b/tests/baselines/reference/nonInferrableTypePropagation2.types index 6dc4c3f878621..df92694624774 100644 --- a/tests/baselines/reference/nonInferrableTypePropagation2.types +++ b/tests/baselines/reference/nonInferrableTypePropagation2.types @@ -38,8 +38,8 @@ interface Refinement<A, B extends A> { } declare const filter: { ->filter : { <A, B extends A>(refinement: Refinement<A, B>): (as: ReadonlyArray<A>) => ReadonlyArray<B>; <A_1>(predicate: Predicate<A_1>): <B_1 extends A_1>(bs: readonly B_1[]) => readonly B_1[]; <A_2>(predicate: Predicate<A_2>): (as: readonly A_2[]) => readonly A_2[]; } -> : ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>filter : { <A, B extends A>(refinement: Refinement<A, B>): (as: ReadonlyArray<A>) => ReadonlyArray<B>; <A_1>(predicate: Predicate<A_1>): <B extends A_1>(bs: ReadonlyArray<B_1>) => ReadonlyArray<B_1>; <A_2>(predicate: Predicate<A_2>): (as: ReadonlyArray<A_2>) => ReadonlyArray<A_2>; } +> : ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^ ^^^ ^^^ <A, B extends A>(refinement: Refinement<A, B>): (as: ReadonlyArray<A>) => ReadonlyArray<B> >refinement : Refinement<A, B> diff --git a/tests/baselines/reference/paramTagTypeResolution.types b/tests/baselines/reference/paramTagTypeResolution.types index 3b6009d5e4246..e96d4b0cc6302 100644 --- a/tests/baselines/reference/paramTagTypeResolution.types +++ b/tests/baselines/reference/paramTagTypeResolution.types @@ -29,15 +29,15 @@ f(1, n => { }) */ module.exports = function (x, k) { return k(x) } >module.exports = function (x, k) { return k(x) } : <T>(x: T, k: (t: T) => void) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ >module.exports : <T>(x: T, k: (t: T) => void) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ >module : { exports: <T>(x: T, k: (t: T) => void) => void; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >exports : <T>(x: T, k: (t: T) => void) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function (x, k) { return k(x) } : <T>(x: T, k: (t: T) => void) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ >x : T > : ^ >k : (t: T) => void diff --git a/tests/baselines/reference/paramTagTypeResolution2.types b/tests/baselines/reference/paramTagTypeResolution2.types index 86688a68e33cc..6c054d5e56b2f 100644 --- a/tests/baselines/reference/paramTagTypeResolution2.types +++ b/tests/baselines/reference/paramTagTypeResolution2.types @@ -8,7 +8,7 @@ */ function f(a, b) { >f : <T>(a: T, b: { [K in keyof T]: (value: T[K]) => void; }) => void -> : ^ ^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ >a : T > : ^ >b : { [K in keyof T]: (value: T[K]) => void; } diff --git a/tests/baselines/reference/partiallyNamedTuples.types b/tests/baselines/reference/partiallyNamedTuples.types index d08a572170ed2..11910c11065eb 100644 --- a/tests/baselines/reference/partiallyNamedTuples.types +++ b/tests/baselines/reference/partiallyNamedTuples.types @@ -123,7 +123,7 @@ declare function test<T extends readonly unknown[]>( arg: [ >arg : [...{ [K in keyof T]: { type: T[K]; }; }] -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ...{ [K in keyof T]: { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types index f80d72b4ece34..089e0e69c32d3 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types @@ -197,7 +197,7 @@ var r2b = i.foo['foo'](); var a: { >a : { <U extends A, T extends A>(): U; <U_1 extends A, T_1 extends A>(x: U_1): U_1; <U_2 extends A, T_2 extends A>(x: U_2, y: T_2): U_2; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^ ^^^ ^^^ <U extends A, T extends A>(): U; <U extends A, T extends A>(x: U): U; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types index ff00efe120ef3..ab4652fdf64b0 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types @@ -184,7 +184,7 @@ var r2b = i.foo['foo'](); var a: { >a : { <U extends A, T extends U>(): T; <U_1 extends T_1, T_1 extends A>(x: U_1): U_1; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; diff --git a/tests/baselines/reference/recursiveTypeReferences2.js b/tests/baselines/reference/recursiveTypeReferences2.js index 9e9540fb6fe08..3329d4df581d4 100644 --- a/tests/baselines/reference/recursiveTypeReferences2.js +++ b/tests/baselines/reference/recursiveTypeReferences2.js @@ -90,10 +90,10 @@ type Json = boolean | number | string | null | JsonRecord | JsonArray | readonly */ type XMLObject<T> = { $A: { [K in keyof T]?: XMLObject<T[K]>[]; }; - $O: { [K_1 in keyof T]?: { + $O: { [K in keyof T]?: { $$?: Record<string, string>; - } & (T[K_1] extends string ? { + } & (T[K] extends string ? { $: string; - } : XMLObject<T[K_1]>); }; + } : XMLObject<T[K]>); }; $$?: Record<string, string>; -} & { [K_2 in keyof T]?: T[K_2] extends string ? string : XMLObject<T[K_2]>; }; +} & { [K in keyof T]?: (T[K] extends string ? string : XMLObject<T[K]>); }; diff --git a/tests/baselines/reference/reverseMappedContravariantInference.types b/tests/baselines/reference/reverseMappedContravariantInference.types index b051426c9d324..ee60080b88d88 100644 --- a/tests/baselines/reference/reverseMappedContravariantInference.types +++ b/tests/baselines/reference/reverseMappedContravariantInference.types @@ -7,7 +7,7 @@ declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }) >conforms : <T>(source: { [K in keyof T]: (val: T[K]) => boolean; }) => (value: T) => boolean > : ^ ^^^^^^^^^^ ^^^^^ >source : { [K in keyof T]: (val: T[K]) => boolean; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^ >val : T[K] > : ^^^^ >value : T diff --git a/tests/baselines/reference/reverseMappedTupleContext.types b/tests/baselines/reference/reverseMappedTupleContext.types index 7f0f741579afd..c1580a8b4dd6e 100644 --- a/tests/baselines/reference/reverseMappedTupleContext.types +++ b/tests/baselines/reference/reverseMappedTupleContext.types @@ -136,7 +136,7 @@ declare function test4<T extends Record<string, string[]>>(obj: { >test4 : <T extends Record<string, string[]>>(obj: { [K in keyof T & keyof CompilerOptions]: { dependencies: KeepLiteralStrings<T[K]>; }; }) => T > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >obj : { [K in keyof T & keyof CompilerOptions]: { dependencies: KeepLiteralStrings<T[K]>; }; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ [K in keyof T & keyof CompilerOptions]: { dependencies: KeepLiteralStrings<T[K]>; diff --git a/tests/baselines/reference/reverseMappedTypeContextualTypesPerElementOfTupleConstraint.types b/tests/baselines/reference/reverseMappedTypeContextualTypesPerElementOfTupleConstraint.types index 97f37253f201f..6daaa8ea21dec 100644 --- a/tests/baselines/reference/reverseMappedTypeContextualTypesPerElementOfTupleConstraint.types +++ b/tests/baselines/reference/reverseMappedTypeContextualTypesPerElementOfTupleConstraint.types @@ -18,7 +18,7 @@ declare function bindAll< bindings: { >bindings : { [K in keyof TTypes]: { type: TTypes[K]; listener: (ev: Parameters<Extract<TTarget[TTypes[K]], (...args: any[]) => any>>[0]) => void; }; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ [K in keyof TTypes]: { type: TTypes[K]; diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types index d5c7cd1366c7b..3762eed7807e2 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types @@ -175,7 +175,7 @@ var a: { var a2: { >a2 : { (x: 'a'): any; <T>(x: T): any; foo(x: 'a'): any; foo<T_1>(x: T_1): any; } -> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ (x: 'a'); >x : "a" @@ -200,7 +200,7 @@ var a2: { var a3: { >a3 : { (x: 'a'): any; <T>(x: T): any; foo(x: 'a'): any; foo<T_1 extends String>(x: T_1): any; } -> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ (x: 'a'); >x : "a" diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index cd70c759ad224..fc4abf258b85c 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -232,7 +232,7 @@ var a: { var a2: { >a2 : { (x: 'a'): any; (x: string): any; <T>(x: T): any; foo(x: string): any; foo(x: 'a'): any; foo<T_1>(x: T_1): any; } -> : ^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ (x: 'a'); >x : "a" @@ -267,7 +267,7 @@ var a2: { var a3: { >a3 : { (x: 'a'): any; <T>(x: T): any; (x: string): any; foo(x: string): any; foo(x: 'a'): any; foo<T_1 extends String>(x: T_1): any; } -> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ (x: 'a'); >x : "a" diff --git a/tests/baselines/reference/subtypesOfTypeParameter.types b/tests/baselines/reference/subtypesOfTypeParameter.types index 932a0ae23febc..5c260095b72c4 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.types +++ b/tests/baselines/reference/subtypesOfTypeParameter.types @@ -350,13 +350,13 @@ function f2<T, U>(x: T, y: U) { var r8 = true ? <T>(x: T) => { return x } : x; >r8 : T | (<T_1>(x: T_1) => T_1) -> : ^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^^^^^ >true ? <T>(x: T) => { return x } : x : T | (<T_1>(x: T_1) => T_1) -> : ^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^^^^^ >true : true > : ^^^^ ><T>(x: T) => { return x } : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >x : T > : ^ >x : T @@ -366,15 +366,15 @@ function f2<T, U>(x: T, y: U) { var r8b = true ? x : <T>(x: T) => { return x }; // type parameters not identical across declarations >r8b : T | (<T_1>(x: T_1) => T_1) -> : ^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^^^^^ >true ? x : <T>(x: T) => { return x } : T | (<T_1>(x: T_1) => T_1) -> : ^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ ^^^^^^^^^ >true : true > : ^^^^ >x : T > : ^ ><T>(x: T) => { return x } : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types index 30d98b30807b1..6fe0bab54300c 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types @@ -559,13 +559,13 @@ function f12<T extends <U>(x: U) => U>(x: T) { var r8 = true ? <T>(x: T) => { return x } : x; // ok >r8 : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >true ? <T>(x: T) => { return x } : x : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >true : true > : ^^^^ ><T>(x: T) => { return x } : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >x : T > : ^ >x : T @@ -575,15 +575,15 @@ function f12<T extends <U>(x: U) => U>(x: T) { var r8b = true ? x : <T>(x: T) => { return x }; // ok, type parameters not identical across declarations >r8b : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >true ? x : <T>(x: T) => { return x } : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >true : true > : ^^^^ >x : T > : ^ ><T>(x: T) => { return x } : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^ >x : T > : ^ >x : T diff --git a/tests/baselines/reference/subtypesOfUnion.types b/tests/baselines/reference/subtypesOfUnion.types index 0f343b6934f87..26998c5820cf5 100644 --- a/tests/baselines/reference/subtypesOfUnion.types +++ b/tests/baselines/reference/subtypesOfUnion.types @@ -111,7 +111,7 @@ interface I1<T> { foo13: <T>(x: T) => T; // error >foo13 : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ @@ -198,7 +198,7 @@ interface I2<T> { foo13: <T>(x: T) => T; // error >foo13 : <T_1>(x: T_1) => T_1 -> : ^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index df7d041ba4a2f..19ab69dd0b4d7 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -219,7 +219,7 @@ module Errors { (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -232,7 +232,7 @@ module Errors { }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.types b/tests/baselines/reference/subtypingWithCallSignatures4.types index cd198dfbbaf30..c965f9b2878a7 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.types +++ b/tests/baselines/reference/subtypingWithCallSignatures4.types @@ -176,7 +176,7 @@ declare function foo17(a17: { >foo17 : { (a17: { <T extends Derived>(x: (a: T) => T): T[]; <T extends Base>(x: (a: T) => T): T[]; }): any; (a: any): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ >a17 : { <T extends Derived>(x: (a: T) => T): T[]; <T_1 extends Base>(x: (a: T_1) => T_1): T_1[]; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(x: (a: T) => T): T[]; >x : (a: T) => T @@ -204,7 +204,7 @@ declare function foo18(a18: { (x: { >x : { <T extends Derived>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived>(a: T): T; >a : T @@ -217,7 +217,7 @@ declare function foo18(a18: { }): any[]; (x: { >x : { <T extends Derived2>(a: T): T; <T_1 extends Base>(a: T_1): T_1; } -> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.types b/tests/baselines/reference/subtypingWithConstructSignatures3.types index 94d657a356410..3b688f80fdc23 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.types @@ -219,7 +219,7 @@ module Errors { new (x: { >x : { new <T extends Derived>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(a: T): T; >a : T @@ -232,7 +232,7 @@ module Errors { }): any[]; new (x: { >x : { new <T extends Derived2>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.types b/tests/baselines/reference/subtypingWithConstructSignatures4.types index 0c24be32e3c4b..5ac5ea4b21b25 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.types @@ -176,7 +176,7 @@ declare function foo17(a17: { >foo17 : { (a17: { new <T extends Derived>(x: new (a: T) => T): T[]; new <T extends Base>(x: new (a: T) => T): T[]; }): any; (a: any): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ >a17 : { new <T extends Derived>(x: new (a: T) => T): T[]; new <T_1 extends Base>(x: new (a: T_1) => T_1): T_1[]; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(x: new (a: T) => T): T[]; >x : new (a: T) => T @@ -204,7 +204,7 @@ declare function foo18(a18: { new (x: { >x : { new <T extends Derived>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived>(a: T): T; >a : T @@ -217,7 +217,7 @@ declare function foo18(a18: { }): any[]; new (x: { >x : { new <T extends Derived2>(a: T): T; new <T_1 extends Base>(a: T_1): T_1; } -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new <T extends Derived2>(a: T): T; >a : T diff --git a/tests/baselines/reference/typeParametersAvailableInNestedScope3.types b/tests/baselines/reference/typeParametersAvailableInNestedScope3.types index 6902ac0bd8b81..073e110872596 100644 --- a/tests/baselines/reference/typeParametersAvailableInNestedScope3.types +++ b/tests/baselines/reference/typeParametersAvailableInNestedScope3.types @@ -3,7 +3,7 @@ === typeParametersAvailableInNestedScope3.ts === function foo<T>(v: T) { >foo : <T>(v: T) => { a: <T_1>(a: T_1) => T_1; b: () => T; c: <T_2>(v: T_2) => { a: <T_3>(a: T_3) => T_3; b: () => T_2; }; } -> : ^ ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ >v : T > : ^ @@ -23,7 +23,7 @@ function foo<T>(v: T) { function c<T>(v: T) { >c : <T>(v: T) => { a: <T_1>(a: T_1) => T_1; b: () => T; } -> : ^ ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^ ^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^ >v : T > : ^ diff --git a/tests/baselines/reference/typeTagOnFunctionReferencesGeneric.types b/tests/baselines/reference/typeTagOnFunctionReferencesGeneric.types index adbfbc4e4e3ee..2672ed8ad1134 100644 --- a/tests/baselines/reference/typeTagOnFunctionReferencesGeneric.types +++ b/tests/baselines/reference/typeTagOnFunctionReferencesGeneric.types @@ -8,7 +8,7 @@ /**@type {IFn}*/ export function inJs(l) { >inJs : <T>(m: T) => T -> : ^ ^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >l : T > : ^ diff --git a/tests/baselines/reference/typeTagWithGenericSignature.types b/tests/baselines/reference/typeTagWithGenericSignature.types index 72f71506ee91e..b01b7ab4d631b 100644 --- a/tests/baselines/reference/typeTagWithGenericSignature.types +++ b/tests/baselines/reference/typeTagWithGenericSignature.types @@ -3,8 +3,8 @@ === bug25618.js === /** @type {<T>(param?: T) => T | undefined} */ function typed(param) { ->typed : <T>(param?: T | undefined) => T | undefined -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>typed : <T>(param?: T) => T | undefined +> : ^ ^^^^^^^^^^ ^^^^^ >param : T | undefined > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/varianceAnnotations.js b/tests/baselines/reference/varianceAnnotations.js index 558080cadc332..72ba310e540fb 100644 --- a/tests/baselines/reference/varianceAnnotations.js +++ b/tests/baselines/reference/varianceAnnotations.js @@ -328,7 +328,7 @@ declare const qq: ActionObject<{ }>; declare let Anon: { new <out T>(): { - foo(): any; + foo(): InstanceType<(typeof Anon<T>)>; }; }; declare let OuterC: { diff --git a/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts b/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts index a31753176e64e..e2c5cfaade716 100644 --- a/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts +++ b/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts @@ -37,15 +37,15 @@ verify.quickInfos({ 3: `(method) Crate<T>.isPackedTight(): this is (this & { extraContents: T; })`, - 4: `(method) Crate<any>.isPackedTight(): this is Crate<any> & { - extraContents: any; -}`, + 4: `(method) Crate<any>.isPackedTight(): this is (this & { + extraContents: T; +})`, 5: "(method) Crate<any>.isSundries(): this is Crate<Sundries>", - 6: `(method) Crate<Sundries>.isPackedTight(): this is Crate<Sundries> & { - extraContents: Sundries; -}`, + 6: `(method) Crate<Sundries>.isPackedTight(): this is (this & { + extraContents: T; +})`, 7: "(method) Crate<any>.isSupplies(): this is Crate<Supplies>", - 8: `(method) Crate<Supplies>.isPackedTight(): this is Crate<Supplies> & { - extraContents: Supplies; -}` + 8: `(method) Crate<Supplies>.isPackedTight(): this is (this & { + extraContents: T; +})` });