diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3f20314adbb65..d6c635fda1344 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -855,6 +855,7 @@ import { ModuleKind, ModuleResolutionKind, ModuleSpecifierResolutionHost, + Mutable, NamedDeclaration, NamedExports, NamedImportsOrExports, @@ -6469,6 +6470,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), expressionOrTypeToTypeNode: (expr: Expression | JsxAttributeValue | undefined, type: Type, addUndefined?: boolean, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => expressionOrTypeToTypeNode(context, expr, type, addUndefined)), serializeTypeForDeclaration: (type: Type, symbol: Symbol, addUndefined?: boolean, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, /*includePrivateSymbol*/ undefined, /*bundled*/ undefined, addUndefined)), + serializeReturnTypeForSignature: (signature: Signature, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => serializeReturnTypeForSignature(context, signature)), indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)), symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), @@ -7649,8 +7651,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function signatureToSignatureDeclarationHelper(signature: Signature, kind: SignatureDeclaration["kind"], context: NodeBuilderContext, options?: SignatureToSignatureDeclarationOptions): SignatureDeclaration { - const suppressAny = context.flags & NodeBuilderFlags.SuppressAnyReturnType; - if (suppressAny) context.flags &= ~NodeBuilderFlags.SuppressAnyReturnType; // suppress only toplevel `any`s + const flags = context.flags; + context.flags &= ~NodeBuilderFlags.SuppressAnyReturnType; // SuppressAnyReturnType should only apply to the signature `return` position context.approximateLength += 3; // Usually a signature contributes a few more characters than this, but 3 is the minimum let typeParameters: TypeParameterDeclaration[] | undefined; let typeArguments: TypeNode[] | undefined; @@ -7780,21 +7782,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (thisParameter) { parameters.unshift(thisParameter); } + context.flags = flags; + + const returnTypeNode = serializeReturnTypeForSignature(context, signature, options?.privateSymbolVisitor, options?.bundledImports); - let returnTypeNode: TypeNode | undefined; - const typePredicate = getTypePredicateOfSignature(signature); - if (typePredicate) { - returnTypeNode = typePredicateToTypePredicateNodeHelper(typePredicate, context); - } - else { - const returnType = getReturnTypeOfSignature(signature); - if (returnType && !(suppressAny && isTypeAny(returnType))) { - returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options?.privateSymbolVisitor, options?.bundledImports); - } - else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); - } - } let modifiers = options?.modifiers; if ((kind === SyntaxKind.ConstructorType) && signature.flags & SignatureFlags.Abstract) { const flags = modifiersToFlags(modifiers); @@ -8572,7 +8563,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return false; } - function serializeReturnTypeForSignature(context: NodeBuilderContext, type: Type, signature: Signature, includePrivateSymbol?: (s: Symbol) => void, bundled?: boolean) { + function serializeReturnTypeForSignature(context: NodeBuilderContext, signature: Signature, includePrivateSymbol?: (s: Symbol) => void, bundled?: boolean) { + const suppressAny = context.flags & NodeBuilderFlags.SuppressAnyReturnType; + const flags = context.flags; + if (suppressAny) context.flags &= ~NodeBuilderFlags.SuppressAnyReturnType; // suppress only toplevel `any`s + let returnTypeNode: TypeNode | undefined; + const returnType = getReturnTypeOfSignature(signature); + if (returnType && !(suppressAny && isTypeAny(returnType))) { + returnTypeNode = serializeReturnTypeForSignatureWorker(context, signature, includePrivateSymbol, bundled); + } + else if (!suppressAny) { + returnTypeNode = factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + context.flags = flags; + return returnTypeNode; + } + + function serializeReturnTypeForSignatureWorker(context: NodeBuilderContext, signature: Signature, includePrivateSymbol?: (s: Symbol) => void, bundled?: boolean) { + const typePredicate = getTypePredicateOfSignature(signature); + const type = getReturnTypeOfSignature(signature); if (!isErrorType(type) && context.enclosingDeclaration) { const annotation = signature.declaration && getEffectiveReturnTypeNode(signature.declaration); const enclosingDeclarationIgnoringFakeScope = getEnclosingDeclarationIgnoringFakeScope(context.enclosingDeclaration); @@ -8585,7 +8594,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } - return typeToTypeNodeHelper(type, context); + if (typePredicate) { + return typePredicateToTypePredicateNodeHelper(typePredicate, context); + } + const expr = signature.declaration && getPossibleTypeNodeReuseExpression(signature.declaration); + return expressionOrTypeToTypeNode(context, expr, type); } function trackExistingEntityName(node: T, context: NodeBuilderContext, includePrivateSymbol?: (s: Symbol) => void) { @@ -8633,7 +8646,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; - function visitExistingNodeTreeSymbols(node: Node): Node { + function visitExistingNodeTreeSymbols(node: Node): Node | undefined { // We don't _actually_ support jsdoc namepath types, emit `any` instead if (isJSDocAllType(node) || node.kind === SyntaxKind.JSDocNamepathType) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); @@ -8642,16 +8655,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword); } if (isJSDocNullableType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)!, factory.createLiteralTypeNode(factory.createNull())]); } if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)!, factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)]); } if (isJSDocNonNullableType(node)) { return visitNode(node.type, visitExistingNodeTreeSymbols); } if (isJSDocVariadicType(node)) { - return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); + return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)!); } if (isJSDocTypeLiteral(node)) { return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, t => { @@ -8743,15 +8756,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { node.isTypeOf, ); } - if (isParameter(node)) { - if (!node.type && !node.initializer) { - return factory.updateParameterDeclaration(node, /*modifiers*/ undefined, node.dotDotDotToken, visitEachChild(node.name, visitExistingNodeTreeSymbols, /*context*/ undefined), node.questionToken, factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), /*initializer*/ undefined); - } + if (isNamedDeclaration(node) && node.name.kind === SyntaxKind.ComputedPropertyName && !isLateBindableName(node.name)) { + return undefined; } - if (isPropertySignature(node)) { - if (!node.type && !node.initializer) { - return factory.updatePropertySignature(node, node.modifiers, node.name, node.questionToken, factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); + if ( + (isFunctionLike(node) && !node.type) + || (isPropertyDeclaration(node) && !node.type && !node.initializer) + || (isPropertySignature(node) && !node.type && !node.initializer) + || (isParameter(node) && !node.type && !node.initializer) + ) { + let visited = visitEachChild(node, visitExistingNodeTreeSymbols, /*context*/ undefined); + if (visited === node) { + visited = setTextRange(factory.cloneNode(node), node); } + (visited as Mutable).type = factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + if (isParameter(node)) { + (visited as Mutable).modifiers = undefined; + } + return visited; } if (isEntityName(node) || isEntityNameExpression(node)) { @@ -48664,6 +48686,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { type DeclarationWithPotentialInnerNodeReuse = | SignatureDeclaration + | JSDocSignature | AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression @@ -48712,13 +48735,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!signatureDeclaration) { return factory.createToken(SyntaxKind.AnyKeyword) as KeywordTypeNode; } - const signature = getSignatureFromDeclaration(signatureDeclaration); - const typePredicate = getTypePredicateOfSignature(signature); - if (typePredicate) { - // Inferred type predicates - return nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); - } - return nodeBuilder.expressionOrTypeToTypeNode(getPossibleTypeNodeReuseExpression(signatureDeclaration), getReturnTypeOfSignature(signature), /*addUndefined*/ undefined, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); + return nodeBuilder.serializeReturnTypeForSignature(getSignatureFromDeclaration(signatureDeclaration), enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); } function createTypeOfExpression(exprIn: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker) { diff --git a/tests/baselines/reference/arrayEvery.types b/tests/baselines/reference/arrayEvery.types index 8d0ccbba9ed0e..44f8fd09168c1 100644 --- a/tests/baselines/reference/arrayEvery.types +++ b/tests/baselines/reference/arrayEvery.types @@ -11,9 +11,9 @@ const foo: (number | string)[] = ['aaa']; const isString = (x: unknown): x is string => typeof x === 'string'; >isString : (x: unknown) => x is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: unknown): x is string => typeof x === 'string' : (x: unknown) => x is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ >typeof x === 'string' : boolean diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types index aa03e898ab56b..bbe5ad0f90055 100644 --- a/tests/baselines/reference/arrayFind.types +++ b/tests/baselines/reference/arrayFind.types @@ -4,7 +4,7 @@ // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { >isNumber : (x: any) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return typeof x === "number"; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types index 0f6a76ba57622..d161de30bc9b1 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody1.ts === var v = a => {} >v : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a => {} : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a : any >{} : any >{} : {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types index c6bd4e735e0d8..3860234fcdaa4 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody2.ts === var v = a => {} >v : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a => {} : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a : any >{} : any >{} : any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types index 4b9beacd860d5..bfafa5ffe1347 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody3.ts === var v = a => {} >v : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a => {} : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a : any >{} : any >{} : {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types index 175cf2d5653b9..dc486c237a35f 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody4.ts === var v = a => {} >v : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a => {} : (a: any) => any -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >a : any >{} : any >{} : any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types index bab10e4c6945f..eaa9c7ceaa3f0 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody5.ts === var a = () => { name: "foo", message: "bar" }; >a : () => Error -> : ^^^^^^^^^^^ +> : ^^^^^^ >() => { name: "foo", message: "bar" } : () => Error -> : ^^^^^^^^^^^ +> : ^^^^^^ >{ name: "foo", message: "bar" } : Error > : ^^^^^ >{ name: "foo", message: "bar" } : { name: string; message: string; } diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types index 5b72d8241e7bc..e12e0f6795508 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types @@ -3,9 +3,9 @@ === arrowFunctionWithObjectLiteralBody6.ts === var a = () => { name: "foo", message: "bar" }; >a : () => Error -> : ^^^^^^^^^^^ +> : ^^^^^^ >() => { name: "foo", message: "bar" } : () => Error -> : ^^^^^^^^^^^ +> : ^^^^^^ >{ name: "foo", message: "bar" } : Error > : ^^^^^ >{ name: "foo", message: "bar" } : { name: string; message: string; } diff --git a/tests/baselines/reference/assertionFunctionWildcardImport1.types b/tests/baselines/reference/assertionFunctionWildcardImport1.types index 1453b475ad6e2..b155ea9617649 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport1.types +++ b/tests/baselines/reference/assertionFunctionWildcardImport1.types @@ -12,7 +12,7 @@ export { Debug }; === src/core/debug.ts === export declare function assert(expression: unknown): asserts expression; >assert : (expression: unknown) => asserts expression -> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ >expression : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/assertionFunctionWildcardImport2.types b/tests/baselines/reference/assertionFunctionWildcardImport2.types index 4cc645774939a..4ee94ca92525c 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport2.types +++ b/tests/baselines/reference/assertionFunctionWildcardImport2.types @@ -3,7 +3,7 @@ === asserts.ts === function isNonNullable(obj: T): asserts obj is NonNullable { >isNonNullable : (obj: T) => asserts obj is NonNullable -> : ^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ ^^^^^ >obj : T > : ^ diff --git a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types index fdb4e87c56006..e4feb930b1b04 100644 --- a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types @@ -31,7 +31,7 @@ type Animal = Cat | Dog; declare function assertEqual(value: any, type: T): asserts value is T; >assertEqual : (value: any, type: T) => asserts value is T -> : ^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : any >type : T > : ^ diff --git a/tests/baselines/reference/assertionTypePredicates1.types b/tests/baselines/reference/assertionTypePredicates1.types index 4db7d3d9d0a93..3bf1e215180d7 100644 --- a/tests/baselines/reference/assertionTypePredicates1.types +++ b/tests/baselines/reference/assertionTypePredicates1.types @@ -3,19 +3,19 @@ === assertionTypePredicates1.ts === declare function isString(value: unknown): value is string; >isString : (value: unknown) => value is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ declare function isArrayOfStrings(value: unknown): value is string[]; >isArrayOfStrings : (value: unknown) => value is string[] -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ const assert: (value: unknown) => asserts value = value => {} >assert : (value: unknown) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ >value => {} : (value: unknown) => void @@ -25,19 +25,19 @@ const assert: (value: unknown) => asserts value = value => {} declare function assertIsString(value: unknown): asserts value is string; >assertIsString : (value: unknown) => asserts value is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ declare function assertIsArrayOfStrings(value: unknown): asserts value is string[]; >assertIsArrayOfStrings : (value: unknown) => asserts value is string[] -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ declare function assertDefined(value: T): asserts value is NonNullable; >assertDefined : (value: T) => asserts value is NonNullable -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ @@ -411,7 +411,7 @@ function f03(x: string | undefined, assert: (value: unknown) => asserts value) { >x : string | undefined > : ^^^^^^^^^^^^^^^^^^ >assert : (value: unknown) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -438,7 +438,7 @@ namespace Debug { export declare function assert(value: unknown, message?: string): asserts value; >assert : (value: unknown, message?: string) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ >message : string | undefined @@ -446,7 +446,7 @@ namespace Debug { export declare function assertDefined(value: T): asserts value is NonNullable; >assertDefined : (value: T) => asserts value is NonNullable -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ } @@ -577,7 +577,7 @@ class Test { assert(value: unknown): asserts value { >assert : (value: unknown) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -593,7 +593,7 @@ class Test { } isTest2(): this is Test2 { >isTest2 : () => this is Test2 -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof Test2; >this instanceof Test2 : boolean @@ -605,7 +605,7 @@ class Test { } assertIsTest2(): asserts this is Test2 { >assertIsTest2 : () => asserts this is Test2 -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ if (this instanceof Test2) return; >this instanceof Test2 : boolean @@ -623,7 +623,7 @@ class Test { } assertThis(): asserts this { >assertThis : () => asserts this -> : ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ if (!this) return; >!this : false @@ -876,19 +876,19 @@ function f11(items: Test[]) { declare let Q1: new (x: unknown) => x is string; >Q1 : new (x: unknown) => x is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >x : unknown > : ^^^^^^^ declare let Q2: new (x: boolean) => asserts x; >Q2 : new (x: boolean) => asserts x -> : ^^^^^^^^ ^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >x : boolean > : ^^^^^^^ declare let Q3: new (x: unknown) => asserts x is string; >Q3 : new (x: unknown) => asserts x is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -925,9 +925,9 @@ function f20(x: unknown) { const assert = (value: unknown): asserts value => {} >assert : (value: unknown) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >(value: unknown): asserts value => {} : (value: unknown) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -1033,7 +1033,7 @@ interface Thing { isGood(): asserts this is GoodThing; >isGood : () => asserts this is GoodThing -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } interface GoodThing { diff --git a/tests/baselines/reference/assertionsAndNonReturningFunctions.types b/tests/baselines/reference/assertionsAndNonReturningFunctions.types index 72549979b5295..f2cf534b84946 100644 --- a/tests/baselines/reference/assertionsAndNonReturningFunctions.types +++ b/tests/baselines/reference/assertionsAndNonReturningFunctions.types @@ -26,7 +26,7 @@ const assert = check => { /** @type {(x: unknown) => asserts x is string } */ function assertIsString(x) { >assertIsString : (x: unknown) => asserts x is string -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -55,7 +55,7 @@ function assertIsString(x) { */ function assert2(check) { >assert2 : (check: boolean) => asserts check -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >check : boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt index 26929c844802c..479bf14f1b10e 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt @@ -6,7 +6,7 @@ baseClassImprovedMismatchErrors.ts(8,5): error TS2416: Property 'n' in type 'Der Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. baseClassImprovedMismatchErrors.ts(9,5): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. - Type '() => string | number' is not assignable to type '() => number'. + Type '() => number | string' is not assignable to type '() => number'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Property 'n' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. @@ -17,7 +17,7 @@ baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Property 'n' in type 'De Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. - Type '() => string | number' is not assignable to type '() => number'. + Type '() => number | string' is not assignable to type '() => number'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. @@ -42,7 +42,7 @@ baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'D fn() { ~~ !!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type '() => string | number' is not assignable to type '() => number'. +!!! error TS2416: Type '() => number | string' is not assignable to type '() => number'. !!! error TS2416: Type 'string | number' is not assignable to type 'number'. !!! error TS2416: Type 'string' is not assignable to type 'number'. return 10 as number | string; @@ -61,7 +61,7 @@ baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'D fn() { ~~ !!! error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type '() => string | number' is not assignable to type '() => number'. +!!! error TS2416: Type '() => number | string' is not assignable to type '() => number'. !!! error TS2416: Type 'string | number' is not assignable to type 'number'. !!! error TS2416: Type 'string' is not assignable to type 'number'. return 10 as number | string; diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.types b/tests/baselines/reference/baseClassImprovedMismatchErrors.types index a217294142c24..47368d01603de 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.types +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.types @@ -29,8 +29,8 @@ class Derived extends Base { > : ^^^^^^^^^^^^^^^^ fn() { ->fn : () => string | number -> : ^^^^^^^^^^^^^^^^^^^^^ +>fn : () => number | string +> : ^^^^^^ return 10 as number | string; >10 as number | string : string | number @@ -48,8 +48,8 @@ class DerivedInterface implements Base { > : ^^^^^^^^^^^^^^^^^^^^^^^^^ fn() { ->fn : () => string | number -> : ^^^^^^^^^^^^^^^^^^^^^ +>fn : () => number | string +> : ^^^^^^ return 10 as number | string; >10 as number | string : string | number diff --git a/tests/baselines/reference/booleanFilterAnyArray.types b/tests/baselines/reference/booleanFilterAnyArray.types index 8c06f9a633ad3..f3e9739a263f8 100644 --- a/tests/baselines/reference/booleanFilterAnyArray.types +++ b/tests/baselines/reference/booleanFilterAnyArray.types @@ -16,7 +16,7 @@ interface Ari { >filter : { (cb1: (value: T) => value is S): T extends any ? Ari : Ari; (cb2: (value: T) => unknown): Ari; } > : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >cb1 : (value: T) => value is S -> : ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : T > : ^ @@ -138,7 +138,7 @@ var foos = [true, true, false, null].filter((thing): thing is boolean => thing ! >filter : { (predicate: (value: boolean, index: number, array: boolean[]) => value is S, thisArg?: any): S[]; (predicate: (value: boolean, index: number, array: boolean[]) => unknown, thisArg?: any): boolean[]; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(thing): thing is boolean => thing !== null : (thing: boolean) => thing is boolean -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ >thing : boolean > : ^^^^^^^ >thing !== null : boolean diff --git a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types index bb36852377353..d22f4877d4b8a 100644 --- a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types +++ b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types @@ -11,7 +11,7 @@ export class Broken { method () { >method : () => TypeB -> : ^^^^^^^^^^^ +> : ^^^^^^ return { } as TypeB; >{ } as TypeB : TypeB diff --git a/tests/baselines/reference/checkTypePredicateForRedundantProperties.types b/tests/baselines/reference/checkTypePredicateForRedundantProperties.types index 37d09d391501f..d5966dea49497 100644 --- a/tests/baselines/reference/checkTypePredicateForRedundantProperties.types +++ b/tests/baselines/reference/checkTypePredicateForRedundantProperties.types @@ -2,8 +2,8 @@ === checkTypePredicateForRedundantProperties.ts === function addProp2(x: any): x is { a: string; a: string; } { ->addProp2 : (x: any) => x is { a: string; } -> : ^^^^ ^^^^^^^^^^^^^^^ ^^^ +>addProp2 : (x: any) => x is { a: string; a: string; } +> : ^^^^ ^^^^^ >x : any > : ^^^ >a : string diff --git a/tests/baselines/reference/coAndContraVariantInferences2.types b/tests/baselines/reference/coAndContraVariantInferences2.types index 0593cf7c49ffb..92e1f8de27e0b 100644 --- a/tests/baselines/reference/coAndContraVariantInferences2.types +++ b/tests/baselines/reference/coAndContraVariantInferences2.types @@ -19,13 +19,13 @@ declare function cast(x: T, test: (x: T) => x is U): U; >x : T > : ^ >test : (x: T) => x is U -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : T > : ^ declare function isC(x: A): x is C; >isC : (x: A) => x is C -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : A > : ^ @@ -139,11 +139,11 @@ function f2(b: B, c: C) { declare function every(array: readonly T[], f: (x: T) => x is U): array is readonly U[]; >every : (array: readonly T[], f: (x: T) => x is U) => array is readonly U[] -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >array : readonly T[] > : ^^^^^^^^^^^^ >f : (x: T) => x is U -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : T > : ^ @@ -241,17 +241,17 @@ type HasLocals = Block | FunctionDeclaration; declare function canHaveLocals(node: Node): node is HasLocals; >canHaveLocals : (node: Node) => node is HasLocals -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function assertNode(node: T | undefined, test: (node: T) => node is U): asserts node is U; >assertNode : { (node: T | undefined, test: (node: T) => node is U): asserts node is U; (node: Node | undefined, test: ((node: Node) => boolean) | undefined): void; } -> : ^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >node : T | undefined > : ^^^^^^^^^^^^^ >test : (node: T) => node is U -> : ^^^^^^^ ^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : T > : ^ @@ -288,7 +288,7 @@ function foo(node: FunctionDeclaration | CaseClause) { declare function isExpression(node: Node): node is Expression; >isExpression : (node: Node) => node is Expression -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ @@ -298,7 +298,7 @@ declare function tryCast(value: TIn | undefined, te >value : TIn | undefined > : ^^^^^^^^^^^^^^^ >test : (value: TIn) => value is TOut -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : TIn > : ^^^ @@ -369,7 +369,7 @@ type ClassLike1 = ClassExpression1 | ClassStatement1; declare function isClassLike(node: Node1): node is ClassLike1; >isClassLike : (node: Node1) => node is ClassLike1 -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node1 > : ^^^^^ @@ -405,7 +405,7 @@ interface NodeArray extends Array { declare function isNodeArray(array: readonly T[]): array is NodeArray; >isNodeArray : (array: readonly T[]) => array is NodeArray -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >array : readonly T[] > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/coAndContraVariantInferences3.types b/tests/baselines/reference/coAndContraVariantInferences3.types index 26eb1d8ec3686..3ff2fa22156e2 100644 --- a/tests/baselines/reference/coAndContraVariantInferences3.types +++ b/tests/baselines/reference/coAndContraVariantInferences3.types @@ -185,31 +185,31 @@ interface AssertClause extends Node { kind: SyntaxKind.AssertClause; } declare function isExpression(node: Node): node is Expression; >isExpression : (node: Node) => node is Expression -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function isAssertClause(node: Node): node is AssertClause; >isAssertClause : (node: Node) => node is AssertClause -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function isImportClause(node: Node): node is ImportClause; >isImportClause : (node: Node) => node is ImportClause -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function isModifier(node: Node): node is Modifier; >isModifier : (node: Node) => node is Modifier -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function isDecorator(node: Node): node is Decorator; >isDecorator : (node: Node) => node is Decorator -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ @@ -246,11 +246,11 @@ declare const updateImportDeclaration: { declare function every(array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; >every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T_1[] | undefined, callback: (element: T_1, index: number) => element is U_1): array is readonly U_1[] | undefined; (array: readonly T_2[] | undefined, callback: (element: T_2, index: number) => boolean): boolean; } -> : ^^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : readonly T[] > : ^^^^^^^^^^^^ >callback : (element: T, index: number) => element is U -> : ^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >element : T > : ^ >index : number @@ -258,11 +258,11 @@ declare function every(array: readonly T[], callback: (element: declare function every(array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; >every : { (array: readonly T_1[], callback: (element: T_1, index: number) => element is U_1): array is readonly U_1[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T_2[] | undefined, callback: (element: T_2, index: number) => boolean): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : readonly T[] | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^ >callback : (element: T, index: number) => element is U -> : ^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >element : T > : ^ >index : number @@ -282,7 +282,7 @@ declare function every(array: readonly T[] | undefined, callback: (element: T declare function isArray(value: any): value is readonly unknown[]; >isArray : (value: any) => value is readonly unknown[] -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : any declare const DISALLOW_DECORATORS: DeprecationOptions; diff --git a/tests/baselines/reference/coAndContraVariantInferences4.types b/tests/baselines/reference/coAndContraVariantInferences4.types index c5e24ba3ce580..8398423cf4801 100644 --- a/tests/baselines/reference/coAndContraVariantInferences4.types +++ b/tests/baselines/reference/coAndContraVariantInferences4.types @@ -34,23 +34,23 @@ interface Decorator extends Node { kind: SyntaxKind.Decorator; } declare function isModifier(node: Node): node is Modifier; >isModifier : (node: Node) => node is Modifier -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function isDecorator(node: Node): node is Decorator; >isDecorator : (node: Node) => node is Decorator -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ declare function every(array: readonly T[], callback: (element: T) => element is U): array is readonly U[]; >every : (array: readonly T[], callback: (element: T) => element is U) => array is readonly U[] -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >array : readonly T[] > : ^^^^^^^^^^^^ >callback : (element: T) => element is U -> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^ >element : T > : ^ diff --git a/tests/baselines/reference/complexRecursiveCollections.types b/tests/baselines/reference/complexRecursiveCollections.types index 1f40108f63cf9..e39686f589414 100644 --- a/tests/baselines/reference/complexRecursiveCollections.types +++ b/tests/baselines/reference/complexRecursiveCollections.types @@ -178,19 +178,19 @@ declare module Immutable { export function isImmutable(maybeImmutable: any): maybeImmutable is Collection; >isImmutable : (maybeImmutable: any) => maybeImmutable is Collection -> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^ >maybeImmutable : any > : ^^^ export function isCollection(maybeCollection: any): maybeCollection is Collection; >isCollection : (maybeCollection: any) => maybeCollection is Collection -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ ^^^^^ >maybeCollection : any > : ^^^ export function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; >isKeyed : (maybeKeyed: any) => maybeKeyed is Collection.Keyed -> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ >maybeKeyed : any > : ^^^ >Collection : any @@ -198,15 +198,15 @@ declare module Immutable { export function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; >isIndexed : (maybeIndexed: any) => maybeIndexed is Collection.Indexed -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^^^ >maybeIndexed : any > : ^^^ >Collection : any > : ^^^ export function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; ->isAssociative : (maybeAssociative: any) => maybeAssociative is Collection.Indexed | Collection.Keyed -> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isAssociative : (maybeAssociative: any) => maybeAssociative is Collection.Keyed | Collection.Indexed +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^ >maybeAssociative : any > : ^^^ >Collection : any @@ -222,7 +222,7 @@ declare module Immutable { export function isValueObject(maybeValue: any): maybeValue is ValueObject; >isValueObject : (maybeValue: any) => maybeValue is ValueObject -> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ >maybeValue : any > : ^^^ @@ -243,7 +243,7 @@ declare module Immutable { function isList(maybeList: any): maybeList is List; >isList : (maybeList: any) => maybeList is List -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >maybeList : any > : ^^^ @@ -523,7 +523,7 @@ declare module Immutable { >filter : { (predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; (predicate: (value: T, index: number, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, index: number, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >index : number @@ -553,7 +553,7 @@ declare module Immutable { function isMap(maybeMap: any): maybeMap is Map; >isMap : (maybeMap: any) => maybeMap is Map -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^ >maybeMap : any > : ^^^ @@ -861,7 +861,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K @@ -891,7 +891,7 @@ declare module Immutable { function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; >isOrderedMap : (maybeOrderedMap: any) => maybeOrderedMap is OrderedMap -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ ^^^^^ >maybeOrderedMap : any > : ^^^ } @@ -999,7 +999,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K @@ -1029,7 +1029,7 @@ declare module Immutable { function isSet(maybeSet: any): maybeSet is Set; >isSet : (maybeSet: any) => maybeSet is Set -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^ >maybeSet : any > : ^^^ @@ -1186,7 +1186,7 @@ declare module Immutable { >filter : { (predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; (predicate: (value: T, key: never, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, key: never, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >key : never @@ -1294,7 +1294,7 @@ declare module Immutable { >filter : { (predicate: (value: T, key: never, iter: this) => value is F, context?: any): OrderedSet; (predicate: (value: T, key: never, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, key: never, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >key : never @@ -1368,7 +1368,7 @@ declare module Immutable { function isStack(maybeStack: any): maybeStack is Stack; >isStack : (maybeStack: any) => maybeStack is Stack -> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^^^^ >maybeStack : any > : ^^^ @@ -1494,7 +1494,7 @@ declare module Immutable { >filter : { (predicate: (value: T, index: number, iter: this) => value is F, context?: any): Set; (predicate: (value: T, index: number, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, index: number, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >index : number @@ -1545,8 +1545,8 @@ declare module Immutable { > : ^^^^^^^^^^^^^ export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; ->isRecord : (maybeRecord: any) => maybeRecord is Instance -> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isRecord : (maybeRecord: any) => maybeRecord is Record.Instance +> : ^^^^^^^^^^^^^^ ^^^^^ >maybeRecord : any > : ^^^ >Record : any @@ -1794,8 +1794,8 @@ declare module Immutable { > : ^^^^^^^^^^ function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; ->isSeq : (maybeSeq: any) => maybeSeq is Indexed | Keyed -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isSeq : (maybeSeq: any) => maybeSeq is Seq.Indexed | Seq.Keyed +> : ^^^^^^^^^^^ ^^^^^ >maybeSeq : any > : ^^^ >Seq : any @@ -1946,7 +1946,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K @@ -2064,7 +2064,7 @@ declare module Immutable { >filter : { (predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; (predicate: (value: T, index: number, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, index: number, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >index : number @@ -2182,7 +2182,7 @@ declare module Immutable { >filter : { (predicate: (value: T, key: never, iter: this) => value is F, context?: any): Seq.Set; (predicate: (value: T, key: never, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, key: never, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >key : never @@ -2310,7 +2310,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K @@ -2339,24 +2339,24 @@ declare module Immutable { > : ^^^^^^^^^^^^^^^^^ function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; ->isKeyed : (maybeKeyed: any) => maybeKeyed is Keyed -> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isKeyed : (maybeKeyed: any) => maybeKeyed is Collection.Keyed +> : ^^^^^^^^^^^^^ ^^^^^ >maybeKeyed : any > : ^^^ >Collection : any > : ^^^ function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; ->isIndexed : (maybeIndexed: any) => maybeIndexed is Indexed -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isIndexed : (maybeIndexed: any) => maybeIndexed is Collection.Indexed +> : ^^^^^^^^^^^^^^^ ^^^^^ >maybeIndexed : any > : ^^^ >Collection : any > : ^^^ function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; ->isAssociative : (maybeAssociative: any) => maybeAssociative is Indexed | Keyed -> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isAssociative : (maybeAssociative: any) => maybeAssociative is Collection.Keyed | Collection.Indexed +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^ >maybeAssociative : any > : ^^^ >Collection : any @@ -2497,7 +2497,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection.Keyed; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K @@ -2740,7 +2740,7 @@ declare module Immutable { >filter : { (predicate: (value: T, index: number, iter: this) => value is F, context?: any): Collection.Indexed; (predicate: (value: T, index: number, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, index: number, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >index : number @@ -2845,7 +2845,7 @@ declare module Immutable { >filter : { (predicate: (value: T, key: never, iter: this) => value is F, context?: any): Collection.Set; (predicate: (value: T, key: never, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: T, key: never, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : T > : ^ >key : never @@ -3105,7 +3105,7 @@ declare module Immutable { >filter : { (predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection; (predicate: (value: V, key: K, iter: this) => any, context?: any): this; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (value: V, key: K, iter: this) => value is F -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^ >value : V > : ^ >key : K diff --git a/tests/baselines/reference/complicatedPrivacy.types b/tests/baselines/reference/complicatedPrivacy.types index f747e8f80d9e2..b423794e3328f 100644 --- a/tests/baselines/reference/complicatedPrivacy.types +++ b/tests/baselines/reference/complicatedPrivacy.types @@ -84,8 +84,8 @@ module m1 { } export function f4(arg1: ->f4 : (arg1: { [number]: C1; }) => void -> : ^^^^^^^ ^^^^^^^^^ +>f4 : (arg1: {}) => void +> : ^^^^^^^ ^^^^^^^^^ >arg1 : {} > : ^^ { diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types index bb400abf3378e..01a59995fff08 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types @@ -68,17 +68,17 @@ export enum PubSubRecordIsStoredInRedisAsA { const buildNameFieldConstructor = (soFar: SO_FAR) => ( >buildNameFieldConstructor : (soFar: SO_FAR) => { name?: undefined; } | { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >(soFar: SO_FAR) => ( "name" in soFar ? {} : { name: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType } ) : (soFar: SO_FAR) => { name?: undefined; } | { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ >( "name" in soFar ? {} : { name: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType } ) : {} | { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ "name" in soFar ? {} : { >"name" in soFar ? {} : { name: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType } : {} | { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >"name" in soFar : boolean > : ^^^^^^^ >"name" : "name" @@ -88,13 +88,13 @@ export enum PubSubRecordIsStoredInRedisAsA { >{} : {} > : ^^ >{ name: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType } : { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ name: (instance: TYPE = undefined) => >name : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >(instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >instance : TYPE > : ^^^^ >undefined : undefined @@ -106,7 +106,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >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; } @@ -163,17 +163,17 @@ export enum PubSubRecordIsStoredInRedisAsA { const buildStoredAsConstructor = (soFar: SO_FAR) => ( >buildStoredAsConstructor : (soFar: SO_FAR) => { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >(soFar: SO_FAR) => ( "storedAs" in soFar ? {} : { storedAsJsonEncodedRedisString: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType, storedAsRedisHash: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType, } ) : (soFar: SO_FAR) => { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ >( "storedAs" in soFar ? {} : { storedAsJsonEncodedRedisString: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType, storedAsRedisHash: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType, } ) : {} | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ "storedAs" in soFar ? {} : { >"storedAs" in soFar ? {} : { storedAsJsonEncodedRedisString: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType, storedAsRedisHash: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType, } : {} | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >"storedAs" in soFar : boolean > : ^^^^^^^ >"storedAs" : "storedAs" @@ -183,13 +183,13 @@ export enum PubSubRecordIsStoredInRedisAsA { >{} : {} > : ^^ >{ storedAsJsonEncodedRedisString: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType, storedAsRedisHash: () => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType, } : { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ storedAsJsonEncodedRedisString: () => >storedAsJsonEncodedRedisString : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ >() => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType : BuildPubSubRecordType @@ -197,7 +197,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { (target: T, source: U): T & U; (target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; (target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -229,9 +229,9 @@ export enum PubSubRecordIsStoredInRedisAsA { storedAsRedisHash: () => >storedAsRedisHash : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ >() => buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType : BuildPubSubRecordType @@ -239,7 +239,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { (target: T, source: U): T & U; (target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; (target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -295,17 +295,17 @@ export enum PubSubRecordIsStoredInRedisAsA { const buildIdentifierFieldConstructor = (soFar: SO_FAR) => ( >buildIdentifierFieldConstructor : (soFar: SO_FAR) => { identifier?: undefined; } | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >(soFar: SO_FAR) => ( "identifier" in soFar || (!("record" in soFar)) ? {} : { identifier: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType } ) : (soFar: SO_FAR) => { identifier?: undefined; } | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ >( "identifier" in soFar || (!("record" in soFar)) ? {} : { identifier: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType } ) : {} | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ "identifier" in soFar || (!("record" in soFar)) ? {} : { >"identifier" in soFar || (!("record" in soFar)) ? {} : { identifier: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType } : {} | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >"identifier" in soFar || (!("record" in soFar)) : boolean > : ^^^^^^^ >"identifier" in soFar : boolean @@ -329,13 +329,13 @@ export enum PubSubRecordIsStoredInRedisAsA { >{} : {} > : ^^ >{ identifier: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType } : { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ identifier: (instance: TYPE = undefined) => >identifier : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >(instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >instance : TYPE > : ^^^^ >undefined : undefined @@ -347,7 +347,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >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; } @@ -396,17 +396,17 @@ export enum PubSubRecordIsStoredInRedisAsA { const buildRecordFieldConstructor = (soFar: SO_FAR) => ( >buildRecordFieldConstructor : (soFar: SO_FAR) => { record?: undefined; } | { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >(soFar: SO_FAR) => ( "record" in soFar ? {} : { record: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType } ) : (soFar: SO_FAR) => { record?: undefined; } | { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >soFar : SO_FAR > : ^^^^^^ >( "record" in soFar ? {} : { record: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType } ) : {} | { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ "record" in soFar ? {} : { >"record" in soFar ? {} : { record: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType } : {} | { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ >"record" in soFar : boolean > : ^^^^^^^ >"record" : "record" @@ -416,13 +416,13 @@ export enum PubSubRecordIsStoredInRedisAsA { >{} : {} > : ^^ >{ record: (instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType } : { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^ record: (instance: TYPE = undefined) => >record : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >(instance: TYPE = undefined) => buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType : (instance?: TYPE) => BuildPubSubRecordType -> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^ >instance : TYPE > : ^^^^ >undefined : undefined @@ -434,7 +434,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >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; } @@ -497,11 +497,11 @@ export enum PubSubRecordIsStoredInRedisAsA { >( "maxMsToWaitBeforePublishing" in soFar ? {} : { maxMsToWaitBeforePublishing: (instance: number = 0) => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, neverDelayPublishing: () => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, } ) as MaxMsToWaitBeforePublishingFieldConstructor : MaxMsToWaitBeforePublishingFieldConstructor > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >( "maxMsToWaitBeforePublishing" in soFar ? {} : { maxMsToWaitBeforePublishing: (instance: number = 0) => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, neverDelayPublishing: () => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, } ) : {} | { maxMsToWaitBeforePublishing: (instance?: number) => BuildPubSubRecordType; neverDelayPublishing: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ "maxMsToWaitBeforePublishing" in soFar ? {} : { >"maxMsToWaitBeforePublishing" in soFar ? {} : { maxMsToWaitBeforePublishing: (instance: number = 0) => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, neverDelayPublishing: () => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, } : {} | { maxMsToWaitBeforePublishing: (instance?: number) => BuildPubSubRecordType; neverDelayPublishing: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >"maxMsToWaitBeforePublishing" in soFar : boolean > : ^^^^^^^ >"maxMsToWaitBeforePublishing" : "maxMsToWaitBeforePublishing" @@ -511,13 +511,13 @@ export enum PubSubRecordIsStoredInRedisAsA { >{} : {} > : ^^ >{ maxMsToWaitBeforePublishing: (instance: number = 0) => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, neverDelayPublishing: () => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, } : { maxMsToWaitBeforePublishing: (instance?: number) => BuildPubSubRecordType; neverDelayPublishing: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ maxMsToWaitBeforePublishing: (instance: number = 0) => >maxMsToWaitBeforePublishing : (instance?: number) => BuildPubSubRecordType -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >(instance: number = 0) => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType : (instance?: number) => BuildPubSubRecordType -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >instance : number > : ^^^^^^ >0 : 0 @@ -529,7 +529,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { (target: T, source: U): T & U; (target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; (target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -553,9 +553,9 @@ export enum PubSubRecordIsStoredInRedisAsA { neverDelayPublishing: () => >neverDelayPublishing : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ >() => buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType : () => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +> : ^^^^^^ buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType : BuildPubSubRecordType @@ -563,7 +563,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) : BuildPubSubRecordType > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : (soFar: SO_FAR_1) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Object.assign : { (target: T, source: U): T & U; (target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; (target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; } @@ -611,7 +611,7 @@ export enum PubSubRecordIsStoredInRedisAsA { hasField: (fieldName: string | number | symbol) => fieldName is keyof SO_FAR >hasField : (fieldName: string | number | symbol) => fieldName is keyof SO_FAR -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >fieldName : string | number | symbol > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -722,9 +722,9 @@ export enum PubSubRecordIsStoredInRedisAsA { const buildPubSubRecordType = (soFar: SO_FAR) => Object.assign( >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >(soFar: SO_FAR) => Object.assign( {}, buildNameFieldConstructor(soFar), buildIdentifierFieldConstructor(soFar), buildRecordFieldConstructor(soFar), buildStoredAsConstructor(soFar), buildMaxMsToWaitBeforePublishingFieldConstructor(soFar), buildType(soFar) ) as BuildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >soFar : SO_FAR > : ^^^^^^ >Object.assign( {}, buildNameFieldConstructor(soFar), buildIdentifierFieldConstructor(soFar), buildRecordFieldConstructor(soFar), buildStoredAsConstructor(soFar), buildMaxMsToWaitBeforePublishingFieldConstructor(soFar), buildType(soFar) ) as BuildPubSubRecordType : BuildPubSubRecordType @@ -746,7 +746,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildNameFieldConstructor(soFar) : { name?: undefined; } | { name: (instance?: TYPE) => BuildPubSubRecordType; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildNameFieldConstructor : (soFar: SO_FAR_1) => { name?: undefined; } | { name: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ @@ -754,7 +754,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildIdentifierFieldConstructor(soFar) : { identifier?: undefined; } | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildIdentifierFieldConstructor : (soFar: SO_FAR_1) => { identifier?: undefined; } | { identifier: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ @@ -762,7 +762,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildRecordFieldConstructor(soFar) : { record?: undefined; } | { record: (instance?: TYPE) => BuildPubSubRecordType; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildRecordFieldConstructor : (soFar: SO_FAR_1) => { record?: undefined; } | { record: (instance?: TYPE) => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ @@ -770,7 +770,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildStoredAsConstructor(soFar) : { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildStoredAsConstructor : (soFar: SO_FAR_1) => { storedAsJsonEncodedRedisString?: undefined; storedAsRedisHash?: undefined; } | { storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; storedAsRedisHash: () => BuildPubSubRecordType; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ @@ -778,7 +778,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildMaxMsToWaitBeforePublishingFieldConstructor(soFar) : MaxMsToWaitBeforePublishingFieldConstructor > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >buildMaxMsToWaitBeforePublishingFieldConstructor : (soFar: SO_FAR_1) => MaxMsToWaitBeforePublishingFieldConstructor -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >soFar : SO_FAR > : ^^^^^^ @@ -797,7 +797,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType({}) : BuildPubSubRecordType<{}> > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^ >{} : {} > : ^^ diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index 9ffd6dd02b01b..f7c65c155abe7 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -623,7 +623,7 @@ type ZeroOf = T extends number ? 0 : T exte function zeroOf(value: T) { >zeroOf : (value: T) => ZeroOf -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >value : T > : ^ @@ -676,7 +676,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(5) : 0 > : ^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >5 : 5 > : ^ @@ -684,7 +684,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf("hello") : "" > : ^^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"hello" : "hello" > : ^^^^^^^ @@ -692,7 +692,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(true) : false > : ^^^^^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >true : true > : ^^^^ @@ -700,7 +700,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(n) : 0 > : ^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ @@ -708,7 +708,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(b) : false > : ^^^^^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b : boolean > : ^^^^^^^ @@ -716,7 +716,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(x) : false | 0 > : ^^^^^^^^^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number | boolean > : ^^^^^^^^^^^^^^^^ @@ -724,7 +724,7 @@ function f20(n: number, b: boolean, x: number | boolean, y: T) >zeroOf(y) : ZeroOf > : ^^^^^^^^^ >zeroOf : (value: T_1) => ZeroOf -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >y : T > : ^ } diff --git a/tests/baselines/reference/conditionalTypes2.types b/tests/baselines/reference/conditionalTypes2.types index 0183aa4d99bd8..e797e4851f3a4 100644 --- a/tests/baselines/reference/conditionalTypes2.types +++ b/tests/baselines/reference/conditionalTypes2.types @@ -97,7 +97,7 @@ function f3(a: Invariant, b: Invariant) { // Extract is a T that is known to be a Function function isFunction(value: T): value is Extract { >isFunction : (value: T) => value is Extract -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ @@ -358,7 +358,7 @@ class Vector implements Seq { >partition2 : { (predicate: (v: T) => v is U): [Vector, Vector>]; (predicate: (x: T) => boolean): [Vector, Vector]; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >predicate : (v: T) => v is U -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : T > : ^ diff --git a/tests/baselines/reference/contextualTyping.types b/tests/baselines/reference/contextualTyping.types index d887109d93cd9..e6632fd555826 100644 --- a/tests/baselines/reference/contextualTyping.types +++ b/tests/baselines/reference/contextualTyping.types @@ -118,7 +118,7 @@ var c3t4: () => IFoo = function() { return ({}) }; >c3t4 : () => IFoo > : ^^^^^^ >function() { return ({}) } : () => IFoo -> : ^^^^^^^^^^ +> : ^^^^^^ >({}) : IFoo > : ^^^^ >({}) : {} @@ -132,7 +132,7 @@ var c3t5: (n: number) => IFoo = function(n) { return ({}) }; >n : number > : ^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -150,7 +150,7 @@ var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; >s : string > : ^^^^^^ >function(n, s) { return ({}) } : (n: number, s: string) => IFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >s : string @@ -384,7 +384,7 @@ c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; >n : number > : ^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -649,7 +649,7 @@ objc8.t3 = []; objc8.t4 = function() { return ({}) }; >objc8.t4 = function() { return ({}) } : () => IFoo -> : ^^^^^^^^^^ +> : ^^^^^^ >objc8.t4 : () => IFoo > : ^^^^^^^^^^ >objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: (n: number, s: string) => number; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: ((n: number, s: string) => string)[]; t12: IBar; t13: IFoo; t14: IFoo; } @@ -657,7 +657,7 @@ objc8.t4 = function() { return ({}) }; >t4 : () => IFoo > : ^^^^^^^^^^ >function() { return ({}) } : () => IFoo -> : ^^^^^^^^^^ +> : ^^^^^^ >({}) : IFoo > : ^^^^ >({}) : {} @@ -667,7 +667,7 @@ objc8.t4 = function() { return ({}) }; objc8.t5 = function(n) { return ({}) }; >objc8.t5 = function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >objc8.t5 : (n: number) => IFoo > : ^^^^^^^^^^^^^^^^^^^ >objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: (n: number, s: string) => number; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: ((n: number, s: string) => string)[]; t12: IBar; t13: IFoo; t14: IFoo; } @@ -675,7 +675,7 @@ objc8.t5 = function(n) { return ({}) }; >t5 : (n: number) => IFoo > : ^^^^^^^^^^^^^^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -687,7 +687,7 @@ objc8.t5 = function(n) { return ({}) }; objc8.t6 = function(n, s) { return ({}) }; >objc8.t6 = function(n, s) { return ({}) } : (n: number, s: string) => IFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >objc8.t6 : (n: number, s: string) => IFoo > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: (n: number, s: string) => number; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: ((n: number, s: string) => string)[]; t12: IBar; t13: IFoo; t14: IFoo; } @@ -695,7 +695,7 @@ objc8.t6 = function(n, s) { return ({}) }; >t6 : (n: number, s: string) => IFoo > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(n, s) { return ({}) } : (n: number, s: string) => IFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >s : string @@ -888,7 +888,7 @@ c9t5(function(n) { >c9t5 : (f: (n: number) => IFoo) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(n) { return ({});} : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ @@ -909,9 +909,9 @@ var c10t5: () => (n: number) => IFoo = function() { return function(n) { return >n : number > : ^^^^^^ >function() { return function(n) { return ({}) } } : () => (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -938,7 +938,7 @@ var i = new C11t5(function(n) { return ({}) }); >C11t5 : typeof C11t5 > : ^^^^^^^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -996,7 +996,7 @@ var c12t4 = <() => IFoo> function() { return ({}) }; ><() => IFoo> function() { return ({}) } : () => IFoo > : ^^^^^^ >function() { return ({}) } : () => IFoo -> : ^^^^^^^^^^ +> : ^^^^^^ >({}) : IFoo > : ^^^^ >({}) : {} @@ -1012,7 +1012,7 @@ var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; >n : number > : ^^^^^^ >function(n) { return ({}) } : (n: number) => IFoo -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >({}) : IFoo @@ -1032,7 +1032,7 @@ var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) >s : string > : ^^^^^^ >function(n, s) { return ({}) } : (n: number, s: string) => IFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >n : number > : ^^^^^^ >s : string diff --git a/tests/baselines/reference/contextualTypingOfOptionalMembers.types b/tests/baselines/reference/contextualTypingOfOptionalMembers.types index 9b302532a9275..8f221f9477323 100644 --- a/tests/baselines/reference/contextualTypingOfOptionalMembers.types +++ b/tests/baselines/reference/contextualTypingOfOptionalMembers.types @@ -39,7 +39,7 @@ app({ >app : >(obj: Options) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ state: 100, actions: { foo: s => s // Should be typed number => number }, view: (s, a) => undefined as any,} : { state: number; actions: { foo: (s: number) => number; }; view: (s: number, a: { foo: (s: number) => number; }) => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ state: 100, >state : number @@ -66,9 +66,9 @@ app({ }, view: (s, a) => undefined as any, >view : (s: number, a: { foo: (s: number) => number; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(s, a) => undefined as any : (s: number, a: { foo: (s: number) => number; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >s : number > : ^^^^^^ >a : { foo: (s: number) => number; } @@ -142,7 +142,7 @@ app2({ >app2 : >(obj: Options2) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ state: 100, actions: { foo: s => s // Should be typed number => number }, view: (s, a) => undefined as any,} : { state: number; actions: { foo: (s: number) => number; }; view: (s: number, a: { foo: (s: number) => number; }) => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ state: 100, >state : number @@ -169,9 +169,9 @@ app2({ }, view: (s, a) => undefined as any, >view : (s: number, a: { foo: (s: number) => number; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(s, a) => undefined as any : (s: number, a: { foo: (s: number) => number; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >s : number > : ^^^^^^ >a : { foo: (s: number) => number; } @@ -201,7 +201,7 @@ app3({ >app3 : >(obj: Options) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ state: 100, actions: [ s => s // Should be typed number => number ], view: (s, a) => undefined as any,} : { state: number; actions: ((s: number) => number)[]; view: (s: number, a: ((s: number) => number)[]) => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ state: 100, >state : number @@ -226,9 +226,9 @@ app3({ ], view: (s, a) => undefined as any, >view : (s: number, a: ((s: number) => number)[]) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(s, a) => undefined as any : (s: number, a: ((s: number) => number)[]) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >s : number > : ^^^^^^ >a : ((s: number) => number)[] diff --git a/tests/baselines/reference/contextualTypingReturnStatementWithReturnTypeAnnotation.types b/tests/baselines/reference/contextualTypingReturnStatementWithReturnTypeAnnotation.types index 45fe5dd7d539b..902c434892d5e 100644 --- a/tests/baselines/reference/contextualTypingReturnStatementWithReturnTypeAnnotation.types +++ b/tests/baselines/reference/contextualTypingReturnStatementWithReturnTypeAnnotation.types @@ -7,7 +7,7 @@ type PropOfRaw = readonly T[] | "not-array" | "no-prop"; declare function isString(text: unknown): text is string; >isString : (text: unknown) => text is string -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >text : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/contravariantInferenceAndTypeGuard.types b/tests/baselines/reference/contravariantInferenceAndTypeGuard.types index e3a9d8fbdb232..319fafb558924 100644 --- a/tests/baselines/reference/contravariantInferenceAndTypeGuard.types +++ b/tests/baselines/reference/contravariantInferenceAndTypeGuard.types @@ -95,7 +95,7 @@ const filter1 = list2.filter(function(item, node, list): item is Test { >filter : { (fn: FilterFn, context: TContext): List; (fn: FilterFn>): List; (fn: IteratorFn, context: TContext_1): List; (fn: IteratorFn>): List; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(item, node, list): item is Test { this.b; // $ExpectType string item; // $ExpectType Test | null node; // $ExpectType ListItem list; // $ExpectType List return !!item;} : (this: { b: string; }, item: Test | null, node: ListItem, list: List) => item is Test -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >item : Test | null > : ^^^^^^^^^^^ >node : ListItem diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index 4b993dabd8f85..e15a3526dca6d 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -1462,7 +1462,7 @@ class Utils { static isDefined(value: T): value is NonNullable { >isDefined : (value: T) => value is NonNullable -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ diff --git a/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types b/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types index 5044ec36323e0..739a74a16097c 100644 --- a/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types +++ b/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types @@ -3,7 +3,7 @@ === controlFlowAnalysisOnBareThisKeyword.ts === declare function isBig(x: any): x is { big: true }; >isBig : (x: any) => x is { big: true; } -> : ^^^^ ^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^^ ^^^^^ >x : any >big : true > : ^^^^ diff --git a/tests/baselines/reference/controlFlowBinaryOrExpression.types b/tests/baselines/reference/controlFlowBinaryOrExpression.types index 82a8c84c8d22f..d072598861183 100644 --- a/tests/baselines/reference/controlFlowBinaryOrExpression.types +++ b/tests/baselines/reference/controlFlowBinaryOrExpression.types @@ -73,12 +73,12 @@ export interface HTMLCollection { declare function isNodeList(sourceObj: any): sourceObj is NodeList; >isNodeList : (sourceObj: any) => sourceObj is NodeList -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >sourceObj : any declare function isHTMLCollection(sourceObj: any): sourceObj is HTMLCollection; >isHTMLCollection : (sourceObj: any) => sourceObj is HTMLCollection -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >sourceObj : any type EventTargetLike = {a: string} | HTMLCollection | NodeList; diff --git a/tests/baselines/reference/controlFlowCommaExpressionAssertionMultiple.types b/tests/baselines/reference/controlFlowCommaExpressionAssertionMultiple.types index 874348e7d0338..5ef027837d5f3 100644 --- a/tests/baselines/reference/controlFlowCommaExpressionAssertionMultiple.types +++ b/tests/baselines/reference/controlFlowCommaExpressionAssertionMultiple.types @@ -3,7 +3,7 @@ === controlFlowCommaExpressionAssertionMultiple.ts === function Narrow(value: any): asserts value is T {} >Narrow : (value: any) => asserts value is T -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : any function func(foo: any, bar: any) { diff --git a/tests/baselines/reference/controlFlowCommaExpressionAssertionWithinTernary.types b/tests/baselines/reference/controlFlowCommaExpressionAssertionWithinTernary.types index de825523535b2..ec10232ed68e2 100644 --- a/tests/baselines/reference/controlFlowCommaExpressionAssertionWithinTernary.types +++ b/tests/baselines/reference/controlFlowCommaExpressionAssertionWithinTernary.types @@ -3,7 +3,7 @@ === controlFlowCommaExpressionAssertionWithinTernary.ts === declare function assert(value: any): asserts value; >assert : (value: any) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : any function foo2(param: number | null | undefined): number | null { diff --git a/tests/baselines/reference/controlFlowCommaExpressionFunctionCall.types b/tests/baselines/reference/controlFlowCommaExpressionFunctionCall.types index 11b0718d5719b..a17022ea2b037 100644 --- a/tests/baselines/reference/controlFlowCommaExpressionFunctionCall.types +++ b/tests/baselines/reference/controlFlowCommaExpressionFunctionCall.types @@ -16,7 +16,7 @@ const value : number | string = null as any; function isNumber(obj: any): obj is number { >isNumber : (obj: any) => obj is number -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any return true; // method implementation irrelevant diff --git a/tests/baselines/reference/controlFlowDestructuringLoop.types b/tests/baselines/reference/controlFlowDestructuringLoop.types index 586cba88d839a..64f6d046be6f7 100644 --- a/tests/baselines/reference/controlFlowDestructuringLoop.types +++ b/tests/baselines/reference/controlFlowDestructuringLoop.types @@ -17,7 +17,7 @@ type Val = NumVal | StrVal; function isNumVal(x: Val): x is NumVal { >isNumVal : (x: Val) => x is NumVal -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : Val > : ^^^ diff --git a/tests/baselines/reference/controlFlowFavorAssertedTypeThroughTypePredicate.types b/tests/baselines/reference/controlFlowFavorAssertedTypeThroughTypePredicate.types index 67a3e71f16762..3c8ac73a3f39a 100644 --- a/tests/baselines/reference/controlFlowFavorAssertedTypeThroughTypePredicate.types +++ b/tests/baselines/reference/controlFlowFavorAssertedTypeThroughTypePredicate.types @@ -5,7 +5,7 @@ declare function isObject1(value: unknown): value is Record; >isObject1 : (value: unknown) => value is Record -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -69,7 +69,7 @@ obj2; declare function isObject2(value: unknown): value is {}; >isObject2 : (value: unknown) => value is {} -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index 1a364d9893ba8..3e4072d648a61 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -133,13 +133,13 @@ interface Box { declare function isBox(x: any): x is Box; >isBox : (x: any) => x is Box -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ declare function isUndefined(x: unknown): x is undefined; >isUndefined : (x: unknown) => x is undefined -> : ^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/controlFlowInstanceofWithSymbolHasInstance.types b/tests/baselines/reference/controlFlowInstanceofWithSymbolHasInstance.types index dee2eb8c8dbe7..cee6b5b4e91c7 100644 --- a/tests/baselines/reference/controlFlowInstanceofWithSymbolHasInstance.types +++ b/tests/baselines/reference/controlFlowInstanceofWithSymbolHasInstance.types @@ -4,7 +4,7 @@ interface PromiseConstructor { [Symbol.hasInstance](value: any): value is Promise; >[Symbol.hasInstance] : (value: any) => value is Promise -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -17,7 +17,7 @@ interface PromiseConstructor { interface SetConstructor { [Symbol.hasInstance](value: any): value is Set; >[Symbol.hasInstance] : (value: any) => value is Set -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index ac8283a1d327f..6c4d504a539fa 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -135,7 +135,7 @@ d.toString(); // type predicates declare const f: undefined | ((x: any) => x is number); >f : ((x: any) => x is number) | undefined -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ ^^^^^^^^^^^^^ >x : any > : ^^^ @@ -202,9 +202,9 @@ f(x); declare const o2: { f(x: any): x is number; } | undefined; >o2 : { f(x: any): x is number; } | undefined -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^ ^^^^^^^^^^^^^^^ >f : (x: any) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ @@ -831,7 +831,7 @@ o5.x.y.z.w; interface Base { f(): this is Derived; >f : () => this is Derived -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } interface Derived extends Base { @@ -910,19 +910,19 @@ o6.f; // asserts declare const isDefined: (value: T) => asserts value is NonNullable; >isDefined : (value: T) => asserts value is NonNullable -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ declare const isString: (value: unknown) => asserts value is string; >isString : (value: unknown) => asserts value is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ declare const maybeIsString: undefined | ((value: unknown) => asserts value is string); >maybeIsString : ((value: unknown) => asserts value is string) | undefined -> : ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^ >value : unknown > : ^^^^^^^ @@ -2726,13 +2726,13 @@ function f23(o: Thing | undefined) { declare function assert(x: unknown): asserts x; >assert : (x: unknown) => asserts x -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ declare function assertNonNull(x: T): asserts x is NonNullable; >assertNonNull : (x: T) => asserts x is NonNullable -> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/controlFlowSelfReferentialLoop.types b/tests/baselines/reference/controlFlowSelfReferentialLoop.types index a79547f02fa7b..03b3116c32641 100644 --- a/tests/baselines/reference/controlFlowSelfReferentialLoop.types +++ b/tests/baselines/reference/controlFlowSelfReferentialLoop.types @@ -2356,7 +2356,7 @@ interface DataShape { function getObject(id: string | number) { >getObject : (id: string | number) => any -> : ^^^^^ ^^^^^^^^ +> : ^^^^^ ^^^^^ >id : string | number > : ^^^^^^^^^^^^^^^ @@ -2393,7 +2393,7 @@ function getObject(id: string | number) { >getObject(id) : any > : ^^^ >getObject : (id: string | number) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >id : string > : ^^^^^^ diff --git a/tests/baselines/reference/declFileFunctions.types b/tests/baselines/reference/declFileFunctions.types index d24832dbc2e73..61611fed95f17 100644 --- a/tests/baselines/reference/declFileFunctions.types +++ b/tests/baselines/reference/declFileFunctions.types @@ -87,7 +87,7 @@ export function fooWithSingleOverload(a: any) { export function fooWithTypePredicate(a: any): a is number { >fooWithTypePredicate : (a: any) => a is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : any return true; @@ -96,7 +96,7 @@ export function fooWithTypePredicate(a: any): a is number { } export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a is number { >fooWithTypePredicateAndMulitpleParams : (a: any, b: any, c: any) => a is number -> : ^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ ^^^^^ >a : any >b : any >c : any @@ -107,7 +107,7 @@ export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a } export function fooWithTypeTypePredicateAndGeneric(a: any): a is T { >fooWithTypeTypePredicateAndGeneric : (a: any) => a is T -> : ^^^^^^^ ^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >a : any return true; @@ -116,7 +116,7 @@ export function fooWithTypeTypePredicateAndGeneric(a: any): a is T { } export function fooWithTypeTypePredicateAndRestParam(a: any, ...rest): a is number { >fooWithTypeTypePredicateAndRestParam : (a: any, ...rest: any[]) => a is number -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^ >a : any >rest : any[] > : ^^^^^ diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicates01.types b/tests/baselines/reference/declarationEmitIdentifierPredicates01.types index fefab4ac89531..afff19db61d61 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicates01.types +++ b/tests/baselines/reference/declarationEmitIdentifierPredicates01.types @@ -3,7 +3,7 @@ === declarationEmitIdentifierPredicates01.ts === export function f(x: any): x is number { >f : (x: any) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return typeof x === "number"; diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types index 9380a8cd1175d..81db14d32a7d9 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types +++ b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types @@ -9,7 +9,7 @@ interface I { export function f(x: any): x is I { >f : (x: any) => x is I -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return typeof x.a === "number"; diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.types b/tests/baselines/reference/declarationEmitThisPredicates01.types index 9fdb10d65859d..3456aaf59ac92 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.types +++ b/tests/baselines/reference/declarationEmitThisPredicates01.types @@ -7,7 +7,7 @@ export class C { m(): this is D { >m : () => this is D -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof D; >this instanceof D : boolean diff --git a/tests/baselines/reference/declarationEmitThisPredicates02.types b/tests/baselines/reference/declarationEmitThisPredicates02.types index c7cffab65ef82..790e599a60486 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates02.types +++ b/tests/baselines/reference/declarationEmitThisPredicates02.types @@ -17,13 +17,13 @@ export interface Foo { export const obj = { >obj : { m(): this is Foo; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^ >{ m(): this is Foo { let dis = this as {} as Foo; return dis.a != null && dis.b != null && dis.c != null; }} : { m(): this is Foo; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^ m(): this is Foo { >m : () => this is Foo -> : ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ let dis = this as {} as Foo; >dis : Foo diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types index 103c628a60ff9..85b0180a490d9 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types @@ -7,7 +7,7 @@ export class C { m(): this is D { >m : () => this is D -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof D; >this instanceof D : boolean diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types index f355327ef8874..6927ce897786a 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types @@ -17,13 +17,13 @@ interface Foo { export const obj = { >obj : { m(): this is Foo; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^ >{ m(): this is Foo { let dis = this as {} as Foo; return dis.a != null && dis.b != null && dis.c != null; }} : { m(): this is Foo; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^ m(): this is Foo { >m : () => this is Foo -> : ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ let dis = this as {} as Foo; >dis : Foo diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters3.types b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters3.types index b788604cf45a7..9e0ee28bf3cba 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters3.types +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters3.types @@ -12,7 +12,7 @@ type Foo = { }; function bar() { >bar : () => Foo -> : ^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return {} as Foo; >{} as Foo : Foo diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters4.types b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters4.types index 5dfe8e9976b3b..d2a40d01284a6 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters4.types +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters4.types @@ -16,7 +16,7 @@ type SubFoo = Foo; function foo() { >foo : () => SubFoo -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return {} as SubFoo; >{} as SubFoo : SubFoo diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.types b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.types index cda2cd1b45f84..13c57118b2bc2 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.types +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.types @@ -16,7 +16,7 @@ export type SubFoo = Foo; function foo() { >foo : () => SubFoo -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return {} as SubFoo; >{} as SubFoo : SubFoo diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters6.types b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters6.types index 858fd6e6cfb1d..9a7ad32ebb953 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters6.types +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters6.types @@ -16,7 +16,7 @@ type SubFoo = Foo; function foo() { >foo : () => SubFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return {} as SubFoo; >{} as SubFoo : SubFoo diff --git a/tests/baselines/reference/declarationFiles.types b/tests/baselines/reference/declarationFiles.types index eca28ca039a36..9ae2f986943f3 100644 --- a/tests/baselines/reference/declarationFiles.types +++ b/tests/baselines/reference/declarationFiles.types @@ -87,7 +87,7 @@ class C3 { j: (x: any) => x is this; >j : (x: any) => x is this -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ } diff --git a/tests/baselines/reference/deepComparisons.types b/tests/baselines/reference/deepComparisons.types index 2e6ee1f008f2c..d62ade196c0e4 100644 --- a/tests/baselines/reference/deepComparisons.types +++ b/tests/baselines/reference/deepComparisons.types @@ -123,7 +123,7 @@ declare function f(): F; function g() { >g : () => F -> : ^^^^^^^^^^^^ +> : ^^^^^^ return f() as F; >f() as F : F diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.types b/tests/baselines/reference/defaultArgsInFunctionExpressions.types index 2f0534b38392e..b9990cdd0beb6 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.types +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.types @@ -109,7 +109,7 @@ var f3 = function (a: (s: string) => any = (s) => s) { }; >s : string > : ^^^^^^ >(s) => s : (s: string) => number -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >s : string > : ^^^^^^ >s : number @@ -143,7 +143,7 @@ var f5: (a: (s: string) => any) => void = function (a = s => s) { }; >a : (s: string) => any > : ^^^^^^^^^^^^^^^^^^ >s => s : (s: string) => number -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >s : string > : ^^^^^^ >s : number diff --git a/tests/baselines/reference/discriminantNarrowingCouldBeCircular.types b/tests/baselines/reference/discriminantNarrowingCouldBeCircular.types index 5b9550c615bda..1ffba70cc7ceb 100644 --- a/tests/baselines/reference/discriminantNarrowingCouldBeCircular.types +++ b/tests/baselines/reference/discriminantNarrowingCouldBeCircular.types @@ -4,7 +4,7 @@ // #57705, 57690 declare function is(v: T): v is T; >is : (v: T) => v is T -> : ^ ^^^^^ ^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >v : T > : ^ @@ -146,7 +146,7 @@ function getImplicitAriaRole(element: SomeRecord) { declare function isPlainObject2( >isPlainObject2 : (data: unknown) => data is Record -> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^ data: unknown, >data : unknown diff --git a/tests/baselines/reference/discriminantPropertyCheck.types b/tests/baselines/reference/discriminantPropertyCheck.types index b584576b273e8..0018eee6d4c91 100644 --- a/tests/baselines/reference/discriminantPropertyCheck.types +++ b/tests/baselines/reference/discriminantPropertyCheck.types @@ -807,7 +807,7 @@ type Type = TypeA | TypeB; declare function isType(x: unknown): x is Type; >isType : (x: unknown) => x is Type -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/discriminantsAndTypePredicates.types b/tests/baselines/reference/discriminantsAndTypePredicates.types index c9884d04e13d2..9ef6ca21e5710 100644 --- a/tests/baselines/reference/discriminantsAndTypePredicates.types +++ b/tests/baselines/reference/discriminantsAndTypePredicates.types @@ -13,7 +13,7 @@ interface B { type: 'B' } function isA(x: A | B): x is A { return x.type === 'A'; } >isA : (x: A | B) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : A | B > : ^^^^^ >x.type === 'A' : boolean @@ -29,7 +29,7 @@ function isA(x: A | B): x is A { return x.type === 'A'; } function isB(x: A | B): x is B { return x.type === 'B'; } >isB : (x: A | B) => x is B -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : A | B > : ^^^^^ >x.type === 'B' : boolean diff --git a/tests/baselines/reference/divideAndConquerIntersections.types b/tests/baselines/reference/divideAndConquerIntersections.types index 0cb9eaa981d66..57bbc0221e84f 100644 --- a/tests/baselines/reference/divideAndConquerIntersections.types +++ b/tests/baselines/reference/divideAndConquerIntersections.types @@ -179,8 +179,8 @@ export function matchFilter( > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return (up: U): up is Filter => !!up; ->(up: U): up is Filter => !!up : (up: U) => up is PerformQuery, Q>> -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(up: U): up is Filter => !!up : (up: U) => up is Filter +> : ^^^^^ ^^^^^ >up : U > : ^ >!!up : true diff --git a/tests/baselines/reference/evolvingArrayTypeInAssert.types b/tests/baselines/reference/evolvingArrayTypeInAssert.types index 1175233210da7..045516daac010 100644 --- a/tests/baselines/reference/evolvingArrayTypeInAssert.types +++ b/tests/baselines/reference/evolvingArrayTypeInAssert.types @@ -3,7 +3,7 @@ === evolvingArrayTypeInAssert.ts === export function unsafeCast(_value: unknown): asserts _value is T { } >unsafeCast : (_value: unknown) => asserts _value is T -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^ ^^^^^ >_value : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/expandoFunctionContextualTypes.types b/tests/baselines/reference/expandoFunctionContextualTypes.types index cf50cbe7ea223..e1129825f3065 100644 --- a/tests/baselines/reference/expandoFunctionContextualTypes.types +++ b/tests/baselines/reference/expandoFunctionContextualTypes.types @@ -18,7 +18,7 @@ const MyComponent: StatelessComponent = () => null as any; >MyComponent : StatelessComponent > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >() => null as any : { (): any; defaultProps: Partial; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >null as any : any MyComponent.defaultProps = { diff --git a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types index ed0cc9fc9182f..180fd27986dbc 100644 --- a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types +++ b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types @@ -25,7 +25,7 @@ const bar = foo.flatMap(bar => bar as Foo); >flatMap : (callback: (this: This, value: unknown, index: number, array: unknown[]) => U | readonly U[], thisArg?: This | undefined) => U[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >bar => bar as Foo : (this: undefined, bar: unknown) => Foo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >bar : unknown > : ^^^^^^^ >bar as Foo : Foo diff --git a/tests/baselines/reference/flowControlTypeGuardThenSwitch.types b/tests/baselines/reference/flowControlTypeGuardThenSwitch.types index 149b405c6d469..da8ec9e9e483c 100644 --- a/tests/baselines/reference/flowControlTypeGuardThenSwitch.types +++ b/tests/baselines/reference/flowControlTypeGuardThenSwitch.types @@ -48,7 +48,7 @@ type Both = A | B; function isBoth(x: Base): x is Both { >isBoth : (x: Base) => x is Both -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : Base > : ^^^^ diff --git a/tests/baselines/reference/generatorYieldContextualType.types b/tests/baselines/reference/generatorYieldContextualType.types index 375464fc4d62a..a3895ce690fe0 100644 --- a/tests/baselines/reference/generatorYieldContextualType.types +++ b/tests/baselines/reference/generatorYieldContextualType.types @@ -85,7 +85,7 @@ namespace Directive { export function is(value: Directive | T): value is Directive { >is : (value: Directive | T) => value is Directive -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T | Directive > : ^^^^^^^^^^^^^ @@ -259,7 +259,7 @@ type StepState> = T & { function canPickStepContinue( >canPickStepContinue : >(_step: T, _state: PartialStepState, _selection: StepItemType | Directive) => _selection is StepItemType -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^ _step: T, >_step : T diff --git a/tests/baselines/reference/genericCapturingFunctionNarrowing.types b/tests/baselines/reference/genericCapturingFunctionNarrowing.types index 18ceb2a948528..ad69353df0478 100644 --- a/tests/baselines/reference/genericCapturingFunctionNarrowing.types +++ b/tests/baselines/reference/genericCapturingFunctionNarrowing.types @@ -58,7 +58,7 @@ function needsToNarrowTheTypehasAFoo : (value: First | Second) => value is First -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : First | Second > : ^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/genericConditionalConstrainedToUnknownNotAssignableToConcreteObject.types b/tests/baselines/reference/genericConditionalConstrainedToUnknownNotAssignableToConcreteObject.types index c943cc47eab6e..affe6e52f8123 100644 --- a/tests/baselines/reference/genericConditionalConstrainedToUnknownNotAssignableToConcreteObject.types +++ b/tests/baselines/reference/genericConditionalConstrainedToUnknownNotAssignableToConcreteObject.types @@ -7,7 +7,7 @@ interface A { x: number } declare function isA(a: unknown): a is A; >isA : (a: unknown) => a is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/identityRelationNeverTypes.types b/tests/baselines/reference/identityRelationNeverTypes.types index 8519db7860eb7..dacd5e9755fc1 100644 --- a/tests/baselines/reference/identityRelationNeverTypes.types +++ b/tests/baselines/reference/identityRelationNeverTypes.types @@ -25,7 +25,7 @@ declare class State { matches(stateValue: TSV): this is State & { value: TSV }; >matches : (stateValue: TSV) => this is State & { value: TSV; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >stateValue : TSV > : ^^^ >value : TSV diff --git a/tests/baselines/reference/implicitAnyAnyReturningFunction.types b/tests/baselines/reference/implicitAnyAnyReturningFunction.types index 8e794214d64aa..3b0793aa2b4d2 100644 --- a/tests/baselines/reference/implicitAnyAnyReturningFunction.types +++ b/tests/baselines/reference/implicitAnyAnyReturningFunction.types @@ -3,7 +3,7 @@ === implicitAnyAnyReturningFunction.ts === function A() { >A : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return ""; >"" : any @@ -30,7 +30,7 @@ class C { public A() { >A : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return ""; >"" : any diff --git a/tests/baselines/reference/implicitAnyCastedValue.types b/tests/baselines/reference/implicitAnyCastedValue.types index 0eb01489c77f6..1e54487971ef9 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.types +++ b/tests/baselines/reference/implicitAnyCastedValue.types @@ -3,9 +3,9 @@ === implicitAnyCastedValue.ts === var x = function () { >x : () => any -> : ^^^^^^^^^ +> : ^^^^^^ >function () { return 0; // this should not be an error} : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return 0; // this should not be an error >0 : any @@ -16,7 +16,7 @@ var x = function () { function foo() { >foo : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return "hello world"; // this should not be an error >"hello world" : any @@ -52,7 +52,7 @@ class C { public returnBarWithCase() { // this should not be an error >returnBarWithCase : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return this.bar; >this.bar : any @@ -67,7 +67,7 @@ class C { public returnFooWithCase() { >returnFooWithCase : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return this.foo; // this should not be an error >this.foo : any @@ -120,7 +120,7 @@ class C1 { function castedNull() { >castedNull : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return null; // this should not be an error >null : any @@ -143,7 +143,7 @@ function returnTypeBar(): any { function undefinedBar() { >undefinedBar : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return undefined; // this should not be an error >undefined : any diff --git a/tests/baselines/reference/inKeywordNarrowingWithNoUncheckedIndexedAccess.types b/tests/baselines/reference/inKeywordNarrowingWithNoUncheckedIndexedAccess.types index 4c641b8cd2de9..8173f4c2e5364 100644 --- a/tests/baselines/reference/inKeywordNarrowingWithNoUncheckedIndexedAccess.types +++ b/tests/baselines/reference/inKeywordNarrowingWithNoUncheckedIndexedAccess.types @@ -3,7 +3,7 @@ === inKeywordNarrowingWithNoUncheckedIndexedAccess.ts === declare function invariant(condition: boolean): asserts condition; >invariant : (condition: boolean) => asserts condition -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >condition : boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/inKeywordTypeguard(strict=false).types b/tests/baselines/reference/inKeywordTypeguard(strict=false).types index 66e9029f13236..a6a973060b135 100644 --- a/tests/baselines/reference/inKeywordTypeguard(strict=false).types +++ b/tests/baselines/reference/inKeywordTypeguard(strict=false).types @@ -601,7 +601,7 @@ type AOrB = { aProp: number } | { bProp: number }; declare function isAOrB(x: unknown): x is AOrB; >isAOrB : (x: unknown) => x is AOrB -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/inKeywordTypeguard(strict=true).types b/tests/baselines/reference/inKeywordTypeguard(strict=true).types index e1c8d2a7df95c..0d6a17cecbe0a 100644 --- a/tests/baselines/reference/inKeywordTypeguard(strict=true).types +++ b/tests/baselines/reference/inKeywordTypeguard(strict=true).types @@ -606,7 +606,7 @@ type AOrB = { aProp: number } | { bProp: number }; declare function isAOrB(x: unknown): x is AOrB; >isAOrB : (x: unknown) => x is AOrB -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/indexedAccessAndNullableNarrowing.types b/tests/baselines/reference/indexedAccessAndNullableNarrowing.types index 64907a14b89f8..9121f1aa7aeb4 100644 --- a/tests/baselines/reference/indexedAccessAndNullableNarrowing.types +++ b/tests/baselines/reference/indexedAccessAndNullableNarrowing.types @@ -98,7 +98,7 @@ type State = AnyObject; declare function hasOwnProperty( >hasOwnProperty : (object: T, prop: PropertyKey) => prop is keyof T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ object: T, >object : T diff --git a/tests/baselines/reference/inferTypePredicates.types b/tests/baselines/reference/inferTypePredicates.types index bbc77cdec6e50..e27436d8a0266 100644 --- a/tests/baselines/reference/inferTypePredicates.types +++ b/tests/baselines/reference/inferTypePredicates.types @@ -304,9 +304,9 @@ function isNonNullGeneric(x: T) { // Type guards can flow between functions const myGuard = (o: string | undefined): o is string => !!o; >myGuard : (o: string | undefined) => o is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(o: string | undefined): o is string => !!o : (o: string | undefined) => o is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >o : string | undefined > : ^^^^^^^^^^^^^^^^^^ >!!o : boolean @@ -738,7 +738,7 @@ a.push(10); // Defer to explicit type guards, even when they're incorrect. function backwardsGuard(x: number|string): x is number { >backwardsGuard : (x: number | string) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : string | number > : ^^^^^^^^^^^^^^^ @@ -1158,7 +1158,7 @@ const numOrBoolean = (x: number | boolean) => typeof x === 'number' || x; interface NumberInferrer { isNumber(x: number | string): x is number; >isNumber : (x: number | string) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : string | number > : ^^^^^^^^^^^^^^^ } diff --git a/tests/baselines/reference/inferingFromAny.types b/tests/baselines/reference/inferingFromAny.types index 20f32a29b72a2..c44ebc945417a 100644 --- a/tests/baselines/reference/inferingFromAny.types +++ b/tests/baselines/reference/inferingFromAny.types @@ -56,7 +56,7 @@ declare function f7(x: (a: any) => a is T): T; >f7 : (x: (a: any) => a is T) => T > : ^ ^^^^^ ^^^^^ >x : (a: any) => a is T -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : any declare function f8(x: () => T): T; diff --git a/tests/baselines/reference/instanceofOperatorWithRHSHasSymbolHasInstance.types b/tests/baselines/reference/instanceofOperatorWithRHSHasSymbolHasInstance.types index 0dc858ac6bcba..b6ee9a70e45b3 100644 --- a/tests/baselines/reference/instanceofOperatorWithRHSHasSymbolHasInstance.types +++ b/tests/baselines/reference/instanceofOperatorWithRHSHasSymbolHasInstance.types @@ -54,9 +54,9 @@ declare var rhs1: { [Symbol.hasInstance](value: any): boolean; }; declare var rhs2: { [Symbol.hasInstance](value: any): value is Point; }; >rhs2 : { [Symbol.hasInstance](value: any): value is Point; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >[Symbol.hasInstance] : (value: any) => value is Point -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -67,9 +67,9 @@ declare var rhs2: { [Symbol.hasInstance](value: any): value is Point; }; declare var rhs3: { [Symbol.hasInstance](value: Point | Line): value is Point; }; >rhs3 : { [Symbol.hasInstance](value: Point | Line): value is Point; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >[Symbol.hasInstance] : (value: Point | Line) => value is Point -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -81,9 +81,9 @@ declare var rhs3: { [Symbol.hasInstance](value: Point | Line): value is Point; } declare var rhs4: { [Symbol.hasInstance](value: Point | Line): value is Line; }; >rhs4 : { [Symbol.hasInstance](value: Point | Line): value is Line; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >[Symbol.hasInstance] : (value: Point | Line) => value is Line -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -95,9 +95,9 @@ declare var rhs4: { [Symbol.hasInstance](value: Point | Line): value is Line; }; declare var rhs5: { [Symbol.hasInstance](value: Point | Point3D | Line): value is Point3D; }; >rhs5 : { [Symbol.hasInstance](value: Point | Point3D | Line): value is Point3D; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >[Symbol.hasInstance] : (value: Point | Point3D | Line) => value is Point3D -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -109,9 +109,9 @@ declare var rhs5: { [Symbol.hasInstance](value: Point | Point3D | Line): value i declare var rhs6: { [Symbol.hasInstance](value: Point3D | Line): value is Point3D; }; >rhs6 : { [Symbol.hasInstance](value: Point3D | Line): value is Point3D; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ >[Symbol.hasInstance] : (value: Point3D | Line) => value is Point3D -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -152,7 +152,7 @@ declare class Rhs9 { static [Symbol.hasInstance](value: any): value is Point; } >Rhs9 : Rhs9 > : ^^^^ >[Symbol.hasInstance] : (value: any) => value is Point -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -165,7 +165,7 @@ declare class Rhs10 { static [Symbol.hasInstance](value: Point | Line): value is >Rhs10 : Rhs10 > : ^^^^^ >[Symbol.hasInstance] : (value: Point | Line) => value is Point -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -179,7 +179,7 @@ declare class Rhs11 { static [Symbol.hasInstance](value: Point | Line): value is >Rhs11 : Rhs11 > : ^^^^^ >[Symbol.hasInstance] : (value: Point | Line) => value is Line -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -193,7 +193,7 @@ declare class Rhs12 { static [Symbol.hasInstance](value: Point | Point3D | Line) >Rhs12 : Rhs12 > : ^^^^^ >[Symbol.hasInstance] : (value: Point | Point3D | Line) => value is Point3D -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -207,7 +207,7 @@ declare class Rhs13 { static [Symbol.hasInstance](value: Point3D | Line): value >Rhs13 : Rhs13 > : ^^^^^ >[Symbol.hasInstance] : (value: Point3D | Line) => value is Point3D -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -1034,7 +1034,7 @@ lhs0 instanceof rhs14 && lhs0; interface HasInstanceOf1 { [Symbol.hasInstance](x: unknown): x is Point } >[Symbol.hasInstance] : (x: unknown) => x is Point -> : ^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -1046,7 +1046,7 @@ interface HasInstanceOf1 { [Symbol.hasInstance](x: unknown): x is Point } interface HasInstanceOf2 { [Symbol.hasInstance](x: unknown): x is Line } >[Symbol.hasInstance] : (x: unknown) => x is Line -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.types b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.types index fd229a7941d1b..74d4aba8b53b1 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.types +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.types @@ -86,7 +86,7 @@ function foo1(x: C1 | C2 | C3): string { function isC1(c: C1 | C2 | C3): c is C1 { return c instanceof C1 } >isC1 : (c: C1 | C2 | C3) => c is C1 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >c : C1 | C2 | C3 > : ^^^^^^^^^^^^ >c instanceof C1 : boolean @@ -98,7 +98,7 @@ function isC1(c: C1 | C2 | C3): c is C1 { return c instanceof C1 } function isC2(c: C1 | C2 | C3): c is C2 { return c instanceof C2 } >isC2 : (c: C1 | C2 | C3) => c is C2 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >c : C1 | C2 | C3 > : ^^^^^^^^^^^^ >c instanceof C2 : boolean @@ -110,7 +110,7 @@ function isC2(c: C1 | C2 | C3): c is C2 { return c instanceof C2 } function isC3(c: C1 | C2 | C3): c is C3 { return c instanceof C3 } >isC3 : (c: C1 | C2 | C3) => c is C3 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >c : C1 | C2 | C3 > : ^^^^^^^^^^^^ >c instanceof C3 : boolean diff --git a/tests/baselines/reference/intersectionsOfLargeUnions.types b/tests/baselines/reference/intersectionsOfLargeUnions.types index 9b724d70d8182..9769defd77842 100644 --- a/tests/baselines/reference/intersectionsOfLargeUnions.types +++ b/tests/baselines/reference/intersectionsOfLargeUnions.types @@ -13,7 +13,7 @@ Symbol count: 27,000 / 27,000 (nearest 500) export function assertIsElement(node: Node | null): node is Element { >assertIsElement : (node: Node | null) => node is Element -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node | null > : ^^^^^^^^^^^ @@ -44,7 +44,7 @@ export function assertIsElement(node: Node | null): node is Element { export function assertNodeTagName< >assertNodeTagName : (node: Node | null, tagName: T) => node is U -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^ T extends keyof ElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T): node is U { diff --git a/tests/baselines/reference/intersectionsOfLargeUnions2.types b/tests/baselines/reference/intersectionsOfLargeUnions2.types index 5dad666263536..2176de1a6ae35 100644 --- a/tests/baselines/reference/intersectionsOfLargeUnions2.types +++ b/tests/baselines/reference/intersectionsOfLargeUnions2.types @@ -30,7 +30,7 @@ declare global { export function assertIsElement(node: Node | null): node is Element { >assertIsElement : (node: Node | null) => node is Element -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node | null > : ^^^^^^^^^^^ @@ -61,7 +61,7 @@ export function assertIsElement(node: Node | null): node is Element { export function assertNodeTagName< >assertNodeTagName : (node: Node | null, tagName: T) => node is U -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^ T extends keyof ElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T): node is U { diff --git a/tests/baselines/reference/intraExpressionInferences.types b/tests/baselines/reference/intraExpressionInferences.types index 2120153029548..4402d130bd4d0 100644 --- a/tests/baselines/reference/intraExpressionInferences.types +++ b/tests/baselines/reference/intraExpressionInferences.types @@ -985,7 +985,7 @@ declare const branch: >test : T > : ^ >if : (t: T) => t is U -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >t : T > : ^ >then : (u: U) => void @@ -1003,7 +1003,7 @@ branch({ >branch : (_: { test: T; if: (t: T) => t is U; then: (u: U) => void; }) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: x, if: (t): t is "a" => t === "a", then: u => { let test1: "a" = u }} : { test: "a" | "b"; if: (t: "a" | "b") => t is "a"; then: (u: "a") => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ test: x, >test : "a" | "b" @@ -1013,9 +1013,9 @@ branch({ if: (t): t is "a" => t === "a", >if : (t: "a" | "b") => t is "a" -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ >(t): t is "a" => t === "a" : (t: "a" | "b") => t is "a" -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ >t : "a" | "b" > : ^^^^^^^^^ >t === "a" : boolean diff --git a/tests/baselines/reference/jsxEmitWithAttributes.types b/tests/baselines/reference/jsxEmitWithAttributes.types index ac1ba4de80ef4..8da17521fcd87 100644 --- a/tests/baselines/reference/jsxEmitWithAttributes.types +++ b/tests/baselines/reference/jsxEmitWithAttributes.types @@ -47,7 +47,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any >JSX : any > : ^^^ diff --git a/tests/baselines/reference/jsxFactoryAndReactNamespace.types b/tests/baselines/reference/jsxFactoryAndReactNamespace.types index 83aa9a7cb0784..36a465b46dcd6 100644 --- a/tests/baselines/reference/jsxFactoryAndReactNamespace.types +++ b/tests/baselines/reference/jsxFactoryAndReactNamespace.types @@ -48,7 +48,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any > : ^^^ >JSX : any diff --git a/tests/baselines/reference/jsxFactoryIdentifier.types b/tests/baselines/reference/jsxFactoryIdentifier.types index ec7faf17b12bc..502cbf18397fc 100644 --- a/tests/baselines/reference/jsxFactoryIdentifier.types +++ b/tests/baselines/reference/jsxFactoryIdentifier.types @@ -47,7 +47,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any >JSX : any > : ^^^ diff --git a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types index 577fe09dc7595..85e3a19ff6f23 100644 --- a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types +++ b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types @@ -48,7 +48,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any > : ^^^ >JSX : any diff --git a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types index 2ad7ea6ef57d5..edafb88003842 100644 --- a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types +++ b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types @@ -48,7 +48,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any > : ^^^ >JSX : any diff --git a/tests/baselines/reference/jsxFactoryQualifiedName.types b/tests/baselines/reference/jsxFactoryQualifiedName.types index 51223e22485b2..bcbffdc9383c8 100644 --- a/tests/baselines/reference/jsxFactoryQualifiedName.types +++ b/tests/baselines/reference/jsxFactoryQualifiedName.types @@ -47,7 +47,7 @@ export namespace Element { export function isElement(el: any): el is JSX.Element { >isElement : (el: any) => el is JSX.Element -> : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >el : any >JSX : any > : ^^^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index cd6be2b7899cf..9f169026217b9 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1679,8 +1679,8 @@ function f80(obj: T) { } function f81(obj: T) { ->f81 : (obj: T) => T["a"]["x"] -> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>f81 : (obj: T) => T['a']['x'] +> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^ >a : { x: any; } > : ^^^^^ ^^^ >x : any @@ -1712,8 +1712,8 @@ function f82() { > : ^^^^^^ >f81({ a: { x: "hello" } }) : string > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f81 : (obj: T) => T['a']['x'] +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ a: { x: "hello" } } : { a: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ >a : { x: string; } @@ -1730,8 +1730,8 @@ function f82() { > : ^^^^^^ >f81({ a: { x: 42 } }) : number > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f81 : (obj: T) => T['a']['x'] +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ a: { x: 42 } } : { a: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ >a : { x: number; } @@ -1745,8 +1745,8 @@ function f82() { } function f83(obj: T, key: K) { ->f83 : (obj: T, key: K) => T[K]["x"] -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ +>f83 : (obj: T, key: K) => T[K]['x'] +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^ >x : string > : ^^^^^^ >x : any @@ -1780,8 +1780,8 @@ function f84() { > : ^^^^^^ >f83({ foo: { x: "hello" } }, "foo") : string > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f83 : (obj: T, key: K) => T[K]['x'] +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ foo: { x: "hello" } } : { foo: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ >foo : { x: string; } @@ -1800,8 +1800,8 @@ function f84() { > : ^^^^^^ >f83({ bar: { x: 42 } }, "bar") : number > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f83 : (obj: T, key: K) => T[K]['x'] +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ bar: { x: 42 } } : { bar: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ >bar : { x: number; } diff --git a/tests/baselines/reference/literalTypeWidening.types b/tests/baselines/reference/literalTypeWidening.types index 87048d8081f63..819d9bb8d02dd 100644 --- a/tests/baselines/reference/literalTypeWidening.types +++ b/tests/baselines/reference/literalTypeWidening.types @@ -454,7 +454,7 @@ function doWork(): Result { function isSuccess(result: Result): result is T { >isSuccess : (result: Result) => result is T -> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^ ^^^^^ >result : Result > : ^^^^^^^^^ @@ -470,8 +470,8 @@ function isSuccess(result: Result): result is T { } function isFailure(result: Result): result is FAILURE { ->isFailure : (result: Result) => result is "FAILURE" -> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +>isFailure : (result: Result) => result is FAILURE +> : ^ ^^^^^^^^^^ ^^^^^ >result : Result > : ^^^^^^^^^ @@ -650,7 +650,7 @@ export const langCodes = keys(langCodeSet) >keys(langCodeSet) : ("fr" | "en" | "es" | "it" | "nl")[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >keys : (obj: Record) => K[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >langCodeSet : Record<"fr" | "en" | "es" | "it" | "nl", true> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/narrowByBooleanComparison.types b/tests/baselines/reference/narrowByBooleanComparison.types index 1b1c967c31f5f..fb60020eb7d2b 100644 --- a/tests/baselines/reference/narrowByBooleanComparison.types +++ b/tests/baselines/reference/narrowByBooleanComparison.types @@ -25,9 +25,9 @@ type MyUnion = A | B | C; const isA = (x: MyUnion): x is A => x.type === "A"; >isA : (x: MyUnion) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: MyUnion): x is A => x.type === "A" : (x: MyUnion) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : MyUnion > : ^^^^^^^ >x.type === "A" : boolean @@ -337,7 +337,7 @@ interface Actor extends Entity { } function isActor(entity: Entity): entity is Actor { >isActor : (entity: Entity) => entity is Actor -> : ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^ >entity : Entity > : ^^^^^^ @@ -413,7 +413,7 @@ function test6(bin: Entity) { // https://github.com/microsoft/TypeScript/issues/53005 function isFunction(x: unknown): x is Function { >isFunction : (x: unknown) => x is Function -> : ^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/narrowByClauseExpressionInSwitchTrue1.types b/tests/baselines/reference/narrowByClauseExpressionInSwitchTrue1.types index 34087660d2927..903c6bb813d8a 100644 --- a/tests/baselines/reference/narrowByClauseExpressionInSwitchTrue1.types +++ b/tests/baselines/reference/narrowByClauseExpressionInSwitchTrue1.types @@ -21,9 +21,9 @@ type AorB = A | B; const isA = (x: AorB): x is A => x.type === "A"; >isA : (x: AorB) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: AorB): x is A => x.type === "A" : (x: AorB) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : AorB > : ^^^^ >x.type === "A" : boolean @@ -39,9 +39,9 @@ const isA = (x: AorB): x is A => x.type === "A"; const isB = (x: AorB): x is B => x.type === "B"; >isB : (x: AorB) => x is B -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: AorB): x is B => x.type === "B" : (x: AorB) => x is B -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : AorB > : ^^^^ >x.type === "B" : boolean @@ -170,7 +170,7 @@ type SomeType = { type: "SomeType" }; declare function isSomeType(x: unknown): x is SomeType; >isSomeType : (x: unknown) => x is SomeType -> : ^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/narrowCommaOperatorNestedWithinLHS.types b/tests/baselines/reference/narrowCommaOperatorNestedWithinLHS.types index 9e90a5f92a1f0..f4fabd708651e 100644 --- a/tests/baselines/reference/narrowCommaOperatorNestedWithinLHS.types +++ b/tests/baselines/reference/narrowCommaOperatorNestedWithinLHS.types @@ -18,7 +18,7 @@ const value: { inner: number | string } = null as any; function isNumber(obj: any): obj is number { >isNumber : (obj: any) => obj is number -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any return true; // method implementation irrelevant diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types index 179fdfc7d2cf3..83ad62b696a64 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types @@ -3,7 +3,7 @@ === narrowExceptionVariableInCatchClause.ts === declare function isFooError(x: any): x is { type: 'foo'; dontPanic(); }; >isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^ >x : any > : ^^^ >type : "foo" diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.types b/tests/baselines/reference/narrowFromAnyWithTypePredicate.types index 492be616e89ed..2538024d8bcc4 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.types +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.types @@ -7,31 +7,31 @@ declare var x: any; declare function isFunction(x): x is Function; >isFunction : (x: any) => x is Function -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ declare function isObject(x): x is Object; >isObject : (x: any) => x is Object -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ declare function isAnything(x): x is {}; >isAnything : (x: any) => x is {} -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ declare function isError(x): x is Error; >isError : (x: any) => x is Error -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ declare function isDate(x): x is Date; >isDate : (x: any) => x is Date -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ diff --git a/tests/baselines/reference/narrowingConstrainedTypeParameter.types b/tests/baselines/reference/narrowingConstrainedTypeParameter.types index 9bdd472b1bf34..94ad69c50d884 100644 --- a/tests/baselines/reference/narrowingConstrainedTypeParameter.types +++ b/tests/baselines/reference/narrowingConstrainedTypeParameter.types @@ -11,7 +11,7 @@ interface Pet { function isPet(pet: any): pet is Pet { >isPet : (pet: any) => pet is Pet -> : ^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >pet : any return typeof pet.name === "string"; diff --git a/tests/baselines/reference/narrowingMutualSubtypes.types b/tests/baselines/reference/narrowingMutualSubtypes.types index 719b0e8f78008..228f24f9f37c9 100644 --- a/tests/baselines/reference/narrowingMutualSubtypes.types +++ b/tests/baselines/reference/narrowingMutualSubtypes.types @@ -137,7 +137,7 @@ const a4b = [r4, c4]; // {}[] declare function isObject1(value: unknown): value is Record; >isObject1 : (value: unknown) => value is Record -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -171,7 +171,7 @@ function gg1(x: {}) { declare function isObject2(value: unknown): value is {}; >isObject2 : (value: unknown) => value is {} -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -207,7 +207,7 @@ function gg2(x: Record) { declare function isObject3(value: unknown): value is Record; >isObject3 : (value: unknown) => value is Record -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -241,7 +241,7 @@ function gg3(x: {}) { declare function isObject4(value: unknown): value is {}; >isObject4 : (value: unknown) => value is {} -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -285,7 +285,7 @@ type Self = T extends unknown ? Identity : never; function is(value: T): value is Self { >is : (value: T) => value is Self -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T > : ^ diff --git a/tests/baselines/reference/narrowingOfDottedNames.types b/tests/baselines/reference/narrowingOfDottedNames.types index 565d3229219d3..eb736ae76b8c9 100644 --- a/tests/baselines/reference/narrowingOfDottedNames.types +++ b/tests/baselines/reference/narrowingOfDottedNames.types @@ -27,7 +27,7 @@ class B { function isA(x: any): x is A { >isA : (x: any) => x is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ @@ -42,7 +42,7 @@ function isA(x: any): x is A { function isB(x: any): x is B { >isB : (x: any) => x is B -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ diff --git a/tests/baselines/reference/narrowingUnionToUnion.types b/tests/baselines/reference/narrowingUnionToUnion.types index b7ca181a12ea5..421d54e4a2409 100644 --- a/tests/baselines/reference/narrowingUnionToUnion.types +++ b/tests/baselines/reference/narrowingUnionToUnion.types @@ -9,7 +9,7 @@ type Falsy = false | 0 | 0n | '' | null | undefined; declare function isFalsy(value: unknown): value is Falsy; >isFalsy : (value: unknown) => value is Falsy -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ @@ -75,7 +75,7 @@ function fx3(x: T) { declare function isA(obj: unknown): obj is { a: false } | { b: 0 }; >isA : (obj: unknown) => obj is { a: false; } | { b: 0; } -> : ^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ +> : ^^^^^^ ^^^^^ >obj : unknown > : ^^^^^^^ >a : false @@ -137,7 +137,7 @@ declare class YS extends Y { ys: string } declare function isXSorY(obj: unknown): obj is XS | Y; >isXSorY : (obj: unknown) => obj is XS | Y -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : unknown > : ^^^^^^^ @@ -183,7 +183,7 @@ function fx5(obj: X | YS, c: typeof XS | typeof Y) { declare function isEmptyStrOrUndefined(mixed: any): mixed is "" | undefined; >isEmptyStrOrUndefined : (mixed: any) => mixed is "" | undefined -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >mixed : any function fx10(s: string | undefined) { @@ -228,7 +228,7 @@ function fx10(s: string | undefined) { function f1(x: any): asserts x is number | undefined { } >f1 : (x: any) => asserts x is number | undefined -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any let v1: number | string | undefined; @@ -249,7 +249,7 @@ v1; // number | undefined function f2(x: any): asserts x is 6 | undefined { } >f2 : (x: any) => asserts x is 6 | undefined -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any let v2: number | string | undefined; @@ -271,38 +271,38 @@ v2; // 6 | undefined // #39105 declare function isEmptyString(value: string): value is ''; ->isEmptyString : (value: string) => value is "" -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +>isEmptyString : (value: string) => value is '' +> : ^^^^^^^^ ^^^^^ >value : string > : ^^^^^^ declare function isMaybeEmptyString(value: string | null | undefined): value is '' | null | undefined; ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined +> : ^^^^^^^^ ^^^^^ >value : string | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ declare function isZero(value: number): value is 0; >isZero : (value: number) => value is 0 -> : ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : number > : ^^^^^^ declare function isMaybeZero(value: number | null | undefined): value is 0 | null | undefined; >isMaybeZero : (value: number | null | undefined) => value is 0 | null | undefined -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : number | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ declare function isEmptyArray(value: T[]): value is []; >isEmptyArray : (value: T[]) => value is [] -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T[] > : ^^^ declare function isMaybeEmptyArray(value: T[] | null | undefined): value is [] | null | undefined; >isMaybeEmptyArray : (value: T[] | null | undefined) => value is [] | null | undefined -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T[] | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -517,7 +517,7 @@ type EmptyString = '' | null | undefined; function isEmpty(value: string | EmptyString): value is EmptyString { >isEmpty : (value: string | EmptyString) => value is EmptyString -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : string | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -565,7 +565,7 @@ if (isEmpty(test)) { declare function assert(value: any): asserts value is T >assert : (value: any) => asserts value is T -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : any function test1(foo: number | string | boolean) { @@ -590,8 +590,8 @@ function test1(foo: number | string | boolean) { // Repro from #46909 function check1(x: unknown): x is (string | 0) { ->check1 : (x: unknown) => x is string | 0 -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^ +>check1 : (x: unknown) => x is (string | 0) +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -615,8 +615,8 @@ function check1(x: unknown): x is (string | 0) { } function check2(x: unknown): x is ("hello" | 0) { ->check2 : (x: unknown) => x is 0 | "hello" -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^ +>check2 : (x: unknown) => x is ("hello" | 0) +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -717,7 +717,7 @@ function test3(x: unknown) { function assertRelationIsNullOrStringArray(v: (string | number)[] | null): asserts v is string[] | null {} >assertRelationIsNullOrStringArray : (v: (string | number)[] | null) => asserts v is string[] | null -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : (string | number)[] | null > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -756,7 +756,7 @@ type MyDiscriminatedUnion = { type: 'A', aProp: number } | { type: 'B', bProp: s declare function isMyDiscriminatedUnion(item: unknown): item is MyDiscriminatedUnion; >isMyDiscriminatedUnion : (item: unknown) => item is MyDiscriminatedUnion -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >item : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types index b2ff013ef250b..b8fa3c6b32595 100644 --- a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types +++ b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types @@ -27,9 +27,9 @@ const fB = () => { }; const fC = () => { >fC : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^ >() => { return {} as any as { v: T };} : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^ return {} as any as { v: T }; >{} as any as { v: T } : { v: T; } @@ -57,9 +57,9 @@ type TB = typeof fB; type TC = typeof fC; >TC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ >fC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ type TL = () => { v: T }; >TL : TL @@ -83,7 +83,7 @@ declare function accC(x: TC): void; >accC : (x: TC) => void > : ^^^^ ^^^^^ >x : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ declare function accL(x: TL): void; >accL : (x: TL) => void @@ -110,7 +110,7 @@ accA(fA); accA(fB); accA(fC); >accA : (x: () => { v: T; }) => void > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >fC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ // ~~ previously an error accB(fA); accB(fB); accB(fC); @@ -131,28 +131,28 @@ accB(fA); accB(fB); accB(fC); >accB : (x: () => { v: T; }) => void > : ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^ >fC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ // OK accC(fA); accC(fB); accC(fC); >accC(fA) : void > : ^^^^ >accC : (x: () => { v: T; }) => void -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^^^ ^^^^^^^^^ >fA : () => { v: T; } > : ^^^^^^^^^^^^^^^^^^ >accC(fB) : void > : ^^^^ >accC : (x: () => { v: T; }) => void -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^^^ ^^^^^^^^^ >fB : () => { v: T; } > : ^ ^^^^^^^^^^^^ ^^^ >accC(fC) : void > : ^^^^ >accC : (x: () => { v: T; }) => void -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^ ^^^^^^^ ^^^^^^^^^ >fC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ // ~~ previously an error accL(fA); accL(fB); accL(fC); @@ -173,6 +173,6 @@ accL(fA); accL(fB); accL(fC); >accL : (x: TL) => void > : ^^^^^^^^^^^^^^^ >fC : () => { v: T; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^ // ~~ previously an error diff --git a/tests/baselines/reference/noImplicitReturnsExclusions.types b/tests/baselines/reference/noImplicitReturnsExclusions.types index 0cc7dece6e0ee..08810a326a32c 100644 --- a/tests/baselines/reference/noImplicitReturnsExclusions.types +++ b/tests/baselines/reference/noImplicitReturnsExclusions.types @@ -108,7 +108,7 @@ function f11(b: boolean) { function f12(b: boolean) { >f12 : (b: boolean) => any -> : ^^^^ ^^^^^^^^ +> : ^^^^ ^^^^^ >b : boolean > : ^^^^^^^ @@ -123,7 +123,7 @@ function f12(b: boolean) { function f13(b: boolean) { // Error >f13 : (b: boolean) => unknown -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >b : boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types index 869e53a7d3505..ff52c1dedd1b3 100644 --- a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types +++ b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types @@ -4,9 +4,9 @@ // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -20,15 +20,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -42,15 +42,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -64,15 +64,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.ts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -86,15 +86,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -108,15 +108,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -130,15 +130,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.ts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -152,15 +152,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -174,15 +174,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -196,15 +196,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -218,15 +218,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -240,15 +240,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.ts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -262,5 +262,5 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=nodenext).types b/tests/baselines/reference/nodeModulesForbidenSyntax(module=nodenext).types index 869e53a7d3505..ff52c1dedd1b3 100644 --- a/tests/baselines/reference/nodeModulesForbidenSyntax(module=nodenext).types +++ b/tests/baselines/reference/nodeModulesForbidenSyntax(module=nodenext).types @@ -4,9 +4,9 @@ // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -20,15 +20,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -42,15 +42,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -64,15 +64,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.ts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -86,15 +86,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -108,15 +108,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -130,15 +130,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.ts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -152,15 +152,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -174,15 +174,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === subfolder2/another/index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -196,15 +196,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.mts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -218,15 +218,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.cts === // cjs format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -240,15 +240,15 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ === index.ts === // esm format file const x = () => (void 0); >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >() => (void 0) : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ >(void 0) : T > : ^ >(void 0) : any @@ -262,5 +262,5 @@ const x = () => (void 0); export {x}; >x : () => T -> : ^^^^^^^^^^ +> : ^ ^^^^^^^ diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types index 239aa50a68740..91b28294762cc 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types @@ -128,13 +128,13 @@ var a: { var b = { >b : { foo(x: any): any; } -> : ^^^^^^^^^ ^^^^^^^^^ +> : ^^^^^^^^^ ^^^ ^^^ >{ foo(x: any) { return ''; }} : { foo(x: any): any; } -> : ^^^^^^^^^ ^^^^^^^^^ +> : ^^^^^^^^^ ^^^ ^^^ foo(x: any) { return ''; } >foo : (x: any) => any -> : ^^^^ ^^^^^^^^ +> : ^^^^ ^^^^^ >x : any >'' : any >'' : "" @@ -233,23 +233,23 @@ function foo3(x: any) { } function foo4(x: typeof b); >foo4 : { (x: typeof b): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ >b : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ function foo4(x: typeof b); // error >foo4 : { (x: { foo(x: any): any; }): any; (x: typeof b): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^ >x : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ >b : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ function foo4(x: any) { } >foo4 : { (x: { foo(x: any): any; }): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : any function foo5(x: A); @@ -377,7 +377,7 @@ function foo10(x: any) { } function foo11(x: B); >foo11 : { (x: B): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : B > : ^ @@ -385,13 +385,13 @@ function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } > : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ >x : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ >b : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ function foo11(x: any) { } >foo11 : { (x: B): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : any function foo12(x: I); @@ -449,7 +449,7 @@ function foo13(x: any) { } function foo14(x: I); >foo14 : { (x: I): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : I > : ^ @@ -457,13 +457,13 @@ function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } > : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ >x : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ >b : { foo(x: any): any; } -> : ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^ function foo14(x: any) { } >foo14 : { (x: I): any; (x: { foo(x: any): any; }): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >x : any function foo15(x: I2); diff --git a/tests/baselines/reference/operatorsAndIntersectionTypes.types b/tests/baselines/reference/operatorsAndIntersectionTypes.types index f619168e66083..06dd22279857c 100644 --- a/tests/baselines/reference/operatorsAndIntersectionTypes.types +++ b/tests/baselines/reference/operatorsAndIntersectionTypes.types @@ -13,7 +13,7 @@ type SerialNo = number & { $SerialNo }; // Tagged number type function createGuid() { >createGuid : () => Guid -> : ^^^^^^^^^^ +> : ^^^^^^ return "21EC2020-3AEA-4069-A2DD-08002B30309D" as Guid; >"21EC2020-3AEA-4069-A2DD-08002B30309D" as Guid : Guid @@ -24,7 +24,7 @@ function createGuid() { function createSerialNo() { >createSerialNo : () => SerialNo -> : ^^^^^^^^^^^^^^ +> : ^^^^^^ return 12345 as SerialNo; >12345 as SerialNo : SerialNo @@ -47,7 +47,7 @@ let guid = createGuid(); >createGuid() : Guid > : ^^^^ >createGuid : () => Guid -> : ^^^^^^^^^^ +> : ^^^^^^ map1[guid] = 123; // Can with tagged string >map1[guid] = 123 : 123 @@ -75,7 +75,7 @@ let serialNo = createSerialNo(); >createSerialNo() : SerialNo > : ^^^^^^^^ >createSerialNo : () => SerialNo -> : ^^^^^^^^^^^^^^ +> : ^^^^^^ map2[serialNo] = "hello"; // Can index with tagged number >map2[serialNo] = "hello" : "hello" diff --git a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types index 02c58a71078a7..9371453cb6b48 100644 --- a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types +++ b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types @@ -63,7 +63,7 @@ new AsyncLoader({ >AsyncLoader : typeof AsyncLoader > : ^^^^^^^^^^^^^^^^^^ >{ asyncLoad: load, children: result => result.success as any,} : { asyncLoad: () => Box; children: (result: { success: true; }) => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ asyncLoad: load, >asyncLoad : () => Box @@ -73,9 +73,9 @@ new AsyncLoader({ children: result => result.success as any, >children : (result: { success: true; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result => result.success as any : (result: { success: true; }) => any -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result : { success: true; } > : ^^^^^^^^^^^^^^^^^^ >result.success as any : any diff --git a/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types b/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types index 3b5c9bbc4d375..991580733b9a0 100644 --- a/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types +++ b/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types @@ -24,7 +24,7 @@ const getStringGetter = (key) => { return () => { >() => { return /** @type {string} */ (cache.get(key)) } : () => string -> : ^^^^^^^^^^^^ +> : ^^^^^^ return /** @type {string} */ (cache.get(key)) >(cache.get(key)) : string diff --git a/tests/baselines/reference/parseInvalidNonNullableTypes.types b/tests/baselines/reference/parseInvalidNonNullableTypes.types index 2bff571d30e34..f98461c2ef903 100644 --- a/tests/baselines/reference/parseInvalidNonNullableTypes.types +++ b/tests/baselines/reference/parseInvalidNonNullableTypes.types @@ -3,7 +3,7 @@ === parseInvalidNonNullableTypes.ts === function f1(a: string): a is string! { >f1 : (a: string) => a is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : string > : ^^^^^^ @@ -14,7 +14,7 @@ function f1(a: string): a is string! { function f2(a: string): a is !string { >f2 : (a: string) => a is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/parseInvalidNullableTypes.types b/tests/baselines/reference/parseInvalidNullableTypes.types index 31e22f35a232f..e1c58a95cb590 100644 --- a/tests/baselines/reference/parseInvalidNullableTypes.types +++ b/tests/baselines/reference/parseInvalidNullableTypes.types @@ -3,7 +3,7 @@ === parseInvalidNullableTypes.ts === function f1(a: string): a is ?string { >f1 : (a: string) => a is string | null -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/parserRealSource14.types b/tests/baselines/reference/parserRealSource14.types index dc52a1569d974..756abe4162754 100644 --- a/tests/baselines/reference/parserRealSource14.types +++ b/tests/baselines/reference/parserRealSource14.types @@ -245,11 +245,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ this.up(); >this.up() : void @@ -438,11 +438,11 @@ module TypeScript { >this.ast.length : number > : ^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >length : number > : ^^^^^^ >1 : 1 @@ -479,11 +479,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return TypeScript.NodeType.None; >TypeScript.NodeType.None : any @@ -503,18 +503,18 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ } public ast() { >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); >AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)) : TypeScript.AST @@ -563,7 +563,7 @@ module TypeScript { public parent() { >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); >AstPath.reverseIndexOf(this.asts, this.asts.length - this.top) : TypeScript.AST @@ -654,21 +654,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -688,11 +688,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -716,11 +716,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.ClassDeclaration : any @@ -750,21 +750,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >name : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isNameOfInterface(): boolean { @@ -779,21 +779,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -813,11 +813,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -841,11 +841,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.InterfaceDeclaration : any @@ -875,21 +875,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >name : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isNameOfArgument(): boolean { @@ -904,21 +904,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -938,11 +938,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -966,11 +966,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.ArgDecl : any @@ -1000,21 +1000,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >id : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isNameOfVariable(): boolean { @@ -1029,21 +1029,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -1063,11 +1063,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -1091,11 +1091,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.VarDecl : any @@ -1125,21 +1125,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >id : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isNameOfModule(): boolean { @@ -1154,21 +1154,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -1188,11 +1188,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -1216,11 +1216,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.ModuleDeclaration : any @@ -1250,21 +1250,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >name : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isNameOfFunction(): boolean { @@ -1279,21 +1279,21 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this.parent() === null : boolean > : ^^^^^^^ >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return false; >false : false @@ -1313,11 +1313,11 @@ module TypeScript { >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.Name : any @@ -1341,11 +1341,11 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >nodeType : any > : ^^^ >TypeScript.NodeType.FuncDecl : any @@ -1375,21 +1375,21 @@ module TypeScript { >this.parent() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >parent : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >name : any > : ^^^ >this.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >this.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this : this > : ^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } public isChildOfScript(): boolean { @@ -7240,7 +7240,7 @@ module TypeScript { >ctx.path.ast() : TypeScript.AST > : ^^^^^^^^^^^^^^ >ctx.path.ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >ctx.path : AstPath > : ^^^^^^^ >ctx : AstPathContext @@ -7248,7 +7248,7 @@ module TypeScript { >path : AstPath > : ^^^^^^^ >ast : () => TypeScript.AST -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { >previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar) : boolean diff --git a/tests/baselines/reference/partialTypeNarrowedToByTypeGuard.types b/tests/baselines/reference/partialTypeNarrowedToByTypeGuard.types index 97997bc3a9645..81abe3d6e288f 100644 --- a/tests/baselines/reference/partialTypeNarrowedToByTypeGuard.types +++ b/tests/baselines/reference/partialTypeNarrowedToByTypeGuard.types @@ -29,8 +29,8 @@ type PartialUser = Partial; // }; function isUser(obj: Obj): obj is PartialUser { ->isUser : (obj: Obj) => obj is Partial -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +>isUser : (obj: Obj) => obj is PartialUser +> : ^^^^^^ ^^^^^ >obj : Obj > : ^^^ diff --git a/tests/baselines/reference/partiallyDiscriminantedUnions.types b/tests/baselines/reference/partiallyDiscriminantedUnions.types index b2d9cf053a1ef..a8b1a91a95c8c 100644 --- a/tests/baselines/reference/partiallyDiscriminantedUnions.types +++ b/tests/baselines/reference/partiallyDiscriminantedUnions.types @@ -103,7 +103,7 @@ type Shapes = Shape | Array; function isShape(s : Shapes): s is Shape { >isShape : (s: Shapes) => s is Shape -> : ^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >s : Shapes > : ^^^^^^ diff --git a/tests/baselines/reference/privateNameInInExpressionUnused(target=es2022).types b/tests/baselines/reference/privateNameInInExpressionUnused(target=es2022).types index 90132b0ba9f9a..3f37dc18eb2a3 100644 --- a/tests/baselines/reference/privateNameInInExpressionUnused(target=es2022).types +++ b/tests/baselines/reference/privateNameInInExpressionUnused(target=es2022).types @@ -15,7 +15,7 @@ class Foo { isFoo(v: any): v is Foo { >isFoo : (v: any) => v is Foo -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any > : ^^^ diff --git a/tests/baselines/reference/privateNameInInExpressionUnused(target=esnext).types b/tests/baselines/reference/privateNameInInExpressionUnused(target=esnext).types index 90132b0ba9f9a..3f37dc18eb2a3 100644 --- a/tests/baselines/reference/privateNameInInExpressionUnused(target=esnext).types +++ b/tests/baselines/reference/privateNameInInExpressionUnused(target=esnext).types @@ -15,7 +15,7 @@ class Foo { isFoo(v: any): v is Foo { >isFoo : (v: any) => v is Foo -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any > : ^^^ diff --git a/tests/baselines/reference/privateNamesAssertion(target=es2022).types b/tests/baselines/reference/privateNamesAssertion(target=es2022).types index 122e17022a9e2..d1d022de93ff1 100644 --- a/tests/baselines/reference/privateNamesAssertion(target=es2022).types +++ b/tests/baselines/reference/privateNamesAssertion(target=es2022).types @@ -7,7 +7,7 @@ class Foo { #p1: (v: any) => asserts v is string = (v) => { >#p1 : (v: any) => asserts v is string -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any >(v) => { if (typeof v !== "string") { throw new Error(); } } : (v: any) => void > : ^^^^^^^^^^^^^^^^ @@ -57,7 +57,7 @@ class Foo2 { #p1(v: any): asserts v is string { >#p1 : (v: any) => asserts v is string -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any if (typeof v !== "string") { diff --git a/tests/baselines/reference/privateNamesAssertion(target=esnext).types b/tests/baselines/reference/privateNamesAssertion(target=esnext).types index 122e17022a9e2..d1d022de93ff1 100644 --- a/tests/baselines/reference/privateNamesAssertion(target=esnext).types +++ b/tests/baselines/reference/privateNamesAssertion(target=esnext).types @@ -7,7 +7,7 @@ class Foo { #p1: (v: any) => asserts v is string = (v) => { >#p1 : (v: any) => asserts v is string -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any >(v) => { if (typeof v !== "string") { throw new Error(); } } : (v: any) => void > : ^^^^^^^^^^^^^^^^ @@ -57,7 +57,7 @@ class Foo2 { #p1(v: any): asserts v is string { >#p1 : (v: any) => asserts v is string -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >v : any if (typeof v !== "string") { diff --git a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types index 293f1bbdb1109..d873b9d8ee7e0 100644 --- a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types +++ b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types @@ -53,9 +53,9 @@ class StrClass { const isNumClass = | StrClass> ( >isNumClass : | StrClass>(item: Item) => item is Extract> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ > | StrClass> ( item: Item ): item is Extract> => { return (item instanceof NumClass); } : | StrClass>(item: Item) => item is Extract> -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ item: Item >item : Item @@ -319,7 +319,7 @@ interface Program { } declare function isBuilderProgram(program: Program | T): program is T; >isBuilderProgram : (program: Program | T) => program is T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >program : Program | T > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/recursiveClassBaseType.types b/tests/baselines/reference/recursiveClassBaseType.types index ffdcc71e58cb6..84f8f7ae342c9 100644 --- a/tests/baselines/reference/recursiveClassBaseType.types +++ b/tests/baselines/reference/recursiveClassBaseType.types @@ -56,7 +56,7 @@ class Derived1 extends class extends Base1 { root() { >root : () => any -> : ^^^^^^^^^ +> : ^^^^^^ return undefined as any; >undefined as any : any diff --git a/tests/baselines/reference/requireAssertsFromTypescript.types b/tests/baselines/reference/requireAssertsFromTypescript.types index 3c112fe753455..4d8f75fc6f42c 100644 --- a/tests/baselines/reference/requireAssertsFromTypescript.types +++ b/tests/baselines/reference/requireAssertsFromTypescript.types @@ -51,7 +51,7 @@ artoo(y) // based on assert in @types/node export function art(value: any, message?: string | Error): asserts value; >art : (value: any, message?: string | Error) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >value : any >message : string | Error > : ^^^^^^^^^^^^^^ @@ -59,7 +59,7 @@ export function art(value: any, message?: string | Error): asserts value; === ex2.d.ts === declare function art(value: any, message?: string | Error): asserts value; >art : (value: any, message?: string | Error) => asserts value -> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >value : any >message : string | Error > : ^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/returnTagTypeGuard.types b/tests/baselines/reference/returnTagTypeGuard.types index ef0b3aa55e92b..2892efc5f3edb 100644 --- a/tests/baselines/reference/returnTagTypeGuard.types +++ b/tests/baselines/reference/returnTagTypeGuard.types @@ -23,7 +23,7 @@ class Entry { */ isInit(x) { >isInit : (x: any) => this is Entry -> : ^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true @@ -107,7 +107,7 @@ function f(chunk) { */ function isBoolean(value) { >isBoolean : (value: any) => value is boolean -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : any return typeof value === "boolean"; @@ -150,7 +150,7 @@ function foo(val) { /** @type {Cb} */ function isNumber(x) { return typeof x === "number" } >isNumber : (x: unknown) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ >typeof x === "number" : boolean diff --git a/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.types b/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.types index 6e8335084f30a..4d40cc0f6a3ac 100644 --- a/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.types +++ b/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.types @@ -16,13 +16,13 @@ class TestComponent extends React.Component<{ isAny: (obj: any) => obj is T } >TestComponent : TestComponent > : ^^^^^^^^^^^^^ >React.Component : React.Component<{ isAny: (obj: any) => obj is T; }, {}, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^ ^^^^^^^^^^^^^ >React : typeof React > : ^^^^^^^^^^^^ >Component : typeof React.Component > : ^^^^^^^^^^^^^^^^^^^^^^ >isAny : (obj: any) => obj is T -> : ^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^ ^^^^^^^ ^^^^^ >obj : any static defaultProps = { @@ -45,7 +45,7 @@ class TestComponent extends React.Component<{ isAny: (obj: any) => obj is T } // Type guard is defined as a static class property static isAny(obj: any): obj is T { >isAny : (obj: any) => obj is T -> : ^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^ ^^^^^^^ ^^^^^ >obj : any return true; diff --git a/tests/baselines/reference/reverseMappedUnionInference.types b/tests/baselines/reference/reverseMappedUnionInference.types index 2f9a8f876b2b8..50563f71a0a9c 100644 --- a/tests/baselines/reference/reverseMappedUnionInference.types +++ b/tests/baselines/reference/reverseMappedUnionInference.types @@ -16,7 +16,7 @@ interface AnyExtractor { interface Extractor { matches: (node: unknown) => node is T; >matches : (node: unknown) => node is T -> : ^^^^^^^ ^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : unknown > : ^^^^^^^ @@ -35,7 +35,7 @@ declare function createExtractor(params: { matcher: (node: unknown) => node is T; >matcher : (node: unknown) => node is T -> : ^^^^^^^ ^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : unknown > : ^^^^^^^ @@ -59,7 +59,7 @@ interface Identifier { declare function isIdentifier(node: unknown): node is Identifier; >isIdentifier : (node: unknown) => node is Identifier -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : unknown > : ^^^^^^^ @@ -129,7 +129,7 @@ interface StringLiteral { declare function isStringLiteral(node: unknown): node is StringLiteral; >isStringLiteral : (node: unknown) => node is StringLiteral -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/spreadObjectOrFalsy.types b/tests/baselines/reference/spreadObjectOrFalsy.types index 4660bf9fd3efb..f1eb48dba7684 100644 --- a/tests/baselines/reference/spreadObjectOrFalsy.types +++ b/tests/baselines/reference/spreadObjectOrFalsy.types @@ -153,7 +153,7 @@ class Foo { } hasData(): this is DatafulFoo { >hasData : () => this is DatafulFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return true; >true : true diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index 44737de6b0c22..b022017ec2bb9 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -149,7 +149,7 @@ const a42 = [x41, x42]; declare function isFunction(x: unknown): x is T; >isFunction : (x: unknown) => x is T -> : ^^^^^^^ ^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -497,7 +497,7 @@ function fx11(): { x?: number } { declare function isArrayLike(value: any): value is { length: number }; >isArrayLike : (value: any) => value is { length: number; } -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^ >value : any > : ^^^ >length : number @@ -634,7 +634,7 @@ type NarrowByDeepValue = DeepPathT extends readonly [ declare function doesValueAtDeepPathSatisfy< >doesValueAtDeepPathSatisfy : (obj: ObjT, deepPath: DeepPathT, predicate: (arg: unknown) => arg is ValueT) => obj is NarrowByDeepValue -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ObjT extends object, const DeepPathT extends ReadonlyArray, @@ -650,7 +650,7 @@ declare function doesValueAtDeepPathSatisfy< predicate: (arg: unknown) => arg is ValueT, >predicate : (arg: unknown) => arg is ValueT -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >arg : unknown > : ^^^^^^^ @@ -674,20 +674,20 @@ type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; > : ^^^^^^^^^^^^^^^^^^ declare function isA(arg: unknown): arg is 'A'; ->isA : (arg: unknown) => arg is "A" -> : ^^^^^^ ^^^^^^^^^^^^^^^ +>isA : (arg: unknown) => arg is 'A' +> : ^^^^^^ ^^^^^ >arg : unknown > : ^^^^^^^ declare function isB(arg: unknown): arg is 'B'; ->isB : (arg: unknown) => arg is "B" -> : ^^^^^^ ^^^^^^^^^^^^^^^ +>isB : (arg: unknown) => arg is 'B' +> : ^^^^^^ ^^^^^ >arg : unknown > : ^^^^^^^ declare function assert(condition: boolean): asserts condition; >assert : (condition: boolean) => asserts condition -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >condition : boolean > : ^^^^^^^ @@ -798,8 +798,8 @@ type Union = { premium: false } | { premium: true }; > : ^^^^ declare const checkIsPremium: (a: Union) => a is Union & Premium; ->checkIsPremium : (a: Union) => a is { premium: true; } & Premium -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>checkIsPremium : (a: Union) => a is Union & Premium +> : ^^^^ ^^^^^ >a : Union > : ^^^^^ diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.types b/tests/baselines/reference/stringLiteralCheckedInIf02.types index c53cbbeea8cee..e225191e62d3e 100644 --- a/tests/baselines/reference/stringLiteralCheckedInIf02.types +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.types @@ -11,7 +11,7 @@ type T = S[] | S; function isS(t: T): t is S { >isS : (t: T) => t is S -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >t : T > : ^ diff --git a/tests/baselines/reference/stringLiteralTypesAsTags01.types b/tests/baselines/reference/stringLiteralTypesAsTags01.types index 9ddde2cbfef18..970971208ef54 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags01.types +++ b/tests/baselines/reference/stringLiteralTypesAsTags01.types @@ -33,7 +33,7 @@ interface B extends Entity { function hasKind(entity: Entity, kind: "A"): entity is A; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; (entity: Entity, kind: Kind): entity is Entity; } -> : ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >entity : Entity > : ^^^^^^ >kind : "A" @@ -41,7 +41,7 @@ function hasKind(entity: Entity, kind: "A"): entity is A; function hasKind(entity: Entity, kind: "B"): entity is B; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; (entity: Entity, kind: Kind): entity is Entity; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >entity : Entity > : ^^^^^^ >kind : "B" @@ -49,7 +49,7 @@ function hasKind(entity: Entity, kind: "B"): entity is B; function hasKind(entity: Entity, kind: Kind): entity is Entity; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; (entity: Entity, kind: Kind): entity is Entity; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^ >entity : Entity > : ^^^^^^ >kind : Kind diff --git a/tests/baselines/reference/stringLiteralTypesAsTags02.types b/tests/baselines/reference/stringLiteralTypesAsTags02.types index c09c8570721c9..12e9aceeb244c 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags02.types +++ b/tests/baselines/reference/stringLiteralTypesAsTags02.types @@ -33,7 +33,7 @@ interface B extends Entity { function hasKind(entity: Entity, kind: "A"): entity is A; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } -> : ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >entity : Entity > : ^^^^^^ >kind : "A" @@ -41,7 +41,7 @@ function hasKind(entity: Entity, kind: "A"): entity is A; function hasKind(entity: Entity, kind: "B"): entity is B; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^ >entity : Entity > : ^^^^^^ >kind : "B" diff --git a/tests/baselines/reference/stringLiteralTypesAsTags03.types b/tests/baselines/reference/stringLiteralTypesAsTags03.types index 1e757a749df55..bfbfb25c3f214 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags03.types +++ b/tests/baselines/reference/stringLiteralTypesAsTags03.types @@ -37,7 +37,7 @@ interface B extends Entity { // signature and simply check compatibility with the implementation. function hasKind(entity: Entity, kind: "A" | "A"): entity is A; >hasKind : { (entity: Entity, kind: "A" | "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } -> : ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >entity : Entity > : ^^^^^^ >kind : "A" @@ -45,7 +45,7 @@ function hasKind(entity: Entity, kind: "A" | "A"): entity is A; function hasKind(entity: Entity, kind: "B" | "B"): entity is B; >hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B" | "B"): entity is B; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^ >entity : Entity > : ^^^^^^ >kind : "B" diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.types b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types index 5f440d34b062c..92879bbb68caf 100644 --- a/tests/baselines/reference/stringLiteralTypesTypePredicates01.types +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types @@ -7,7 +7,7 @@ type Kind = "A" | "B" function kindIs(kind: Kind, is: "A"): kind is "A"; >kindIs : { (kind: Kind, is: "A"): kind is "A"; (kind: Kind, is: "B"): kind is "B"; } -> : ^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >kind : Kind > : ^^^^ >is : "A" @@ -15,7 +15,7 @@ function kindIs(kind: Kind, is: "A"): kind is "A"; function kindIs(kind: Kind, is: "B"): kind is "B"; >kindIs : { (kind: Kind, is: "A"): kind is "A"; (kind: Kind, is: "B"): kind is "B"; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^ ^^^ >kind : Kind > : ^^^^ >is : "B" diff --git a/tests/baselines/reference/substitutionTypeNoMergeOfAssignableType.types b/tests/baselines/reference/substitutionTypeNoMergeOfAssignableType.types index 1611da6a7dc24..3d0bf896ef050 100644 --- a/tests/baselines/reference/substitutionTypeNoMergeOfAssignableType.types +++ b/tests/baselines/reference/substitutionTypeNoMergeOfAssignableType.types @@ -50,7 +50,7 @@ interface Entry { >makeEntityStore({ test: { fields: { id: {} } } }) : Nodes<{ test: { fields: { id: {}; }; }; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >makeEntityStore : >(config: T) => Nodes -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: { fields: { id: {} } } } : { test: { fields: { id: {}; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >test : { fields: { id: {}; }; } diff --git a/tests/baselines/reference/subtypeReductionUnionConstraints.types b/tests/baselines/reference/subtypeReductionUnionConstraints.types index 934f3d2cc46fe..1bfa2aad65123 100644 --- a/tests/baselines/reference/subtypeReductionUnionConstraints.types +++ b/tests/baselines/reference/subtypeReductionUnionConstraints.types @@ -46,13 +46,13 @@ type Document = { declare function isNode(node: unknown): node is Node; >isNode : (node: unknown) => node is Node -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : unknown > : ^^^^^^^ declare function isBar(node: Node): node is BarNode; >isBar : (node: Node) => node is BarNode -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >node : Node > : ^^^^ @@ -62,7 +62,7 @@ export function visitNodes(node: Document | Node, predicate: (te >node : Node | Document > : ^^^^^^^^^^^^^^^ >predicate : (testNode: Node) => testNode is T -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ ^^^^^ >testNode : Node > : ^^^^ diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types index ecfa4ca9204f7..3cae00365c08d 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.types +++ b/tests/baselines/reference/subtypingWithCallSignatures2.types @@ -611,9 +611,9 @@ var r4b = [r4arg2, r4arg1]; var r5arg1 = (x: (arg: T) => U) => null; >r5arg1 : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >(x: (arg: T) => U) => null : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -641,7 +641,7 @@ var r5 = foo5(r5arg1); // any >foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ var r5a = [r5arg1, r5arg2]; >r5a : ((x: (arg: string) => number) => string)[] @@ -649,7 +649,7 @@ var r5a = [r5arg1, r5arg2]; >[r5arg1, r5arg2] : ((x: (arg: string) => number) => string)[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg2 : (x: (arg: string) => number) => string > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -661,13 +661,13 @@ var r5b = [r5arg2, r5arg1]; >r5arg2 : (x: (arg: string) => number) => string > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6arg1 = (x: (arg: T) => U) => null; >r6arg1 : (x: (arg: T) => U) => T -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >(x: (arg: T) => U) => null : (x: (arg: T) => U) => T -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -677,9 +677,9 @@ var r6arg1 = (x: (arg: T) => U) => null; var r6arg2 = (x: (arg: Base) => Derived) => null; >r6arg2 : (x: (arg: Base) => Derived) => Base -> : ^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: (arg: Base) => Derived) => null : (x: (arg: Base) => Derived) => Base -> : ^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base @@ -695,39 +695,39 @@ var r6 = foo6(r6arg1); // any >foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6a = [r6arg1, r6arg2]; >r6a : ((x: (arg: Base) => Derived) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r6arg1, r6arg2] : ((x: (arg: Base) => Derived) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r6arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg2 : (x: (arg: Base) => Derived) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6b = [r6arg2, r6arg1]; >r6b : ((x: (arg: Base) => Derived) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r6arg2, r6arg1] : ((x: (arg: Base) => Derived) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r6arg2 : (x: (arg: Base) => Derived) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg1 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r7arg1 = (x: (arg: T) => U) => (r: T) => null; >r7arg1 : (x: (arg: T) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: T) => U) => (r: T) => null : (x: (arg: T) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T > : ^ >(r: T) => null : (r: T) => U -> : ^^^^ ^^^^^^ +> : ^^^^ ^^^^^ >r : T > : ^ >null : U @@ -735,15 +735,15 @@ var r7arg1 = (x: (arg: T) => U) => (r: T) => var r7arg2 = (x: (arg: Base) => Derived) => (r: Base) => null; >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base > : ^^^^ >(r: Base) => null : (r: Base) => Derived -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >r : Base > : ^^^^ >null : Derived @@ -757,33 +757,33 @@ var r7 = foo7(r7arg1); // any >foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg1 : (x: (arg: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r7a = [r7arg1, r7arg2]; >r7a : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r7arg1, r7arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r7arg1 : (x: (arg: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r7b = [r7arg2, r7arg1]; >r7b : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r7arg2, r7arg1] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg1 : (x: (arg: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r8arg1 = (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => null; >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -793,7 +793,7 @@ var r8arg1 = (x: (arg: T) => U, y: (arg2: T) >arg2 : T > : ^ >(r: T) => null : (r: T) => U -> : ^^^^ ^^^^^^ +> : ^^^^ ^^^^^ >r : T > : ^ >null : U @@ -801,9 +801,9 @@ var r8arg1 = (x: (arg: T) => U, y: (arg2: T) var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null; >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base @@ -813,7 +813,7 @@ var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base >arg2 : Base > : ^^^^ >(r: Base) => null : (r: Base) => Derived -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >r : Base > : ^^^^ >null : Derived @@ -827,33 +827,33 @@ var r8 = foo8(r8arg1); // any >foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r8a = [r8arg1, r8arg2]; >r8a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r8arg1, r8arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r8b = [r8arg2, r8arg1]; >r8b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r8arg2, r8arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r9arg1 = (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null; >r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -867,7 +867,7 @@ var r9arg1 = (x: (arg: T) => U, y: (arg2: { f >bing : number > : ^^^^^^ >(r: T) => null : (r: T) => U -> : ^^^^ ^^^^^^ +> : ^^^^ ^^^^^ >r : T > : ^ >null : U @@ -875,9 +875,9 @@ var r9arg1 = (x: (arg: T) => U, y: (arg2: { f var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null; >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base @@ -887,7 +887,7 @@ var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base >arg2 : Base > : ^^^^ >(r: Base) => null : (r: Base) => Derived -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >r : Base > : ^^^^ >null : Derived @@ -901,27 +901,27 @@ var r9 = foo9(r9arg1); // any >foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r9a = [r9arg1, r9arg2]; >r9a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r9arg1, r9arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r9b = [r9arg2, r9arg1]; >r9b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r9arg2, r9arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r10arg1 = (...x: T[]) => x[0]; >r10arg1 : (...x: T[]) => T @@ -939,9 +939,9 @@ var r10arg1 = (...x: T[]) => x[0]; var r10arg2 = (...x: Derived[]) => null; >r10arg2 : (...x: Derived[]) => Derived -> : ^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >(...x: Derived[]) => null : (...x: Derived[]) => Derived -> : ^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >x : Derived[] > : ^^^^^^^^^ >null : Derived @@ -959,21 +959,21 @@ var r10 = foo10(r10arg1); // any var r10a = [r10arg1, r10arg2]; >r10a : ((...x: Derived[]) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r10arg1, r10arg2] : ((...x: Derived[]) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r10arg1 : (...x: T[]) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r10arg2 : (...x: Derived[]) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^ var r10b = [r10arg2, r10arg1]; >r10b : ((...x: Derived[]) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r10arg2, r10arg1] : ((...x: Derived[]) => Derived)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r10arg2 : (...x: Derived[]) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^ >r10arg1 : (...x: T[]) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -991,9 +991,9 @@ var r11arg1 = (x: T, y: T) => x; var r11arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null; >r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >x : { foo: string; } > : ^^^^^^^ ^^^ >foo : string @@ -1019,29 +1019,29 @@ var r11 = foo11(r11arg1); // any var r11a = [r11arg1, r11arg2]; >r11a : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r11arg1, r11arg2] : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r11arg1 : (x: T, y: T) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r11b = [r11arg2, r11arg1]; >r11b : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r11arg2, r11arg1] : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r11arg1 : (x: T, y: T) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r12arg1 = >(x: Array, y: T) => >null; ->r12arg1 : (x: Array, y: T) => Derived[] -> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^ ->>(x: Array, y: T) => >null : (x: Array, y: T) => Derived[] -> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^ +>r12arg1 : (x: Array, y: T) => Array +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ +>>(x: Array, y: T) => >null : (x: Array, y: T) => Array +> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >y : T @@ -1050,10 +1050,10 @@ var r12arg1 = >(x: Array, y: T) => >n > : ^^^^^^^^^ var r12arg2 = (x: Array, y: Array) => >null; ->r12arg2 : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ ->(x: Array, y: Array) => >null : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ +>r12arg2 : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ +>(x: Array, y: Array) => >null : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >y : Derived2[] @@ -1068,28 +1068,28 @@ var r12 = foo12(r12arg1); // any > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r12arg1 : (x: Base[], y: T) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r12arg1 : (x: Base[], y: T) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r12a = [r12arg1, r12arg2]; ->r12a : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r12arg1, r12arg2] : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r12arg1 : (x: Base[], y: T) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r12arg2 : (x: Base[], y: Derived2[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r12a : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r12arg1, r12arg2] : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>r12arg1 : (x: Base[], y: T) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r12arg2 : (x: Base[], y: Derived2[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r12b = [r12arg2, r12arg1]; ->r12b : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r12arg2, r12arg1] : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r12arg2 : (x: Base[], y: Derived2[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r12arg1 : (x: Base[], y: T) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r12b : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r12arg2, r12arg1] : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>r12arg2 : (x: Base[], y: Derived2[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r12arg1 : (x: Base[], y: T) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r13arg1 = >(x: Array, y: T) => y; >r13arg1 : (x: Array, y: T) => T @@ -1104,10 +1104,10 @@ var r13arg1 = >(x: Array, y: T) => y; > : ^ var r13arg2 = (x: Array, y: Array) => >null; ->r13arg2 : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ ->(x: Array, y: Array) => >null : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ +>r13arg2 : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ +>(x: Array, y: Array) => >null : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >y : Derived[] @@ -1126,22 +1126,22 @@ var r13 = foo13(r13arg1); // any > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r13a = [r13arg1, r13arg2]; ->r13a : ((x: Base[], y: Derived[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r13arg1, r13arg2] : ((x: Base[], y: Derived[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r13a : ((x: Base[], y: Derived[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r13arg1, r13arg2] : ((x: Base[], y: Derived[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r13arg1 : (x: Base[], y: T) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r13arg2 : (x: Base[], y: Derived[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r13arg2 : (x: Base[], y: Derived[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r13b = [r13arg2, r13arg1]; ->r13b : ((x: Base[], y: Derived[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r13arg2, r13arg1] : ((x: Base[], y: Derived[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r13arg2 : (x: Base[], y: Derived[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r13b : ((x: Base[], y: Derived[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r13arg2, r13arg1] : ((x: Base[], y: Derived[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>r13arg2 : (x: Base[], y: Derived[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r13arg1 : (x: Base[], y: T) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1165,9 +1165,9 @@ var r14arg1 = (x: { a: T; b: T }) => x.a; var r14arg2 = (x: { a: string; b: number }) => null; >r14arg2 : (x: { a: string; b: number; }) => Object -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >(x: { a: string; b: number }) => null : (x: { a: string; b: number; }) => Object -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : { a: string; b: number; } > : ^^^^^ ^^^^^ ^^^ >a : string @@ -1187,29 +1187,29 @@ var r14 = foo14(r14arg1); // any var r14a = [r14arg1, r14arg2]; >r14a : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >[r14arg1, r14arg2] : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >r14arg1 : (x: { a: T; b: T; }) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r14arg2 : (x: { a: string; b: number; }) => Object -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r14b = [r14arg2, r14arg1]; >r14b : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >[r14arg2, r14arg1] : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >r14arg2 : (x: { a: string; b: number; }) => Object -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r14arg1 : (x: { a: T; b: T; }) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r15arg1 = (x: T) => null >r15arg1 : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: T) => null : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >null : T[] @@ -1221,7 +1221,7 @@ var r15 = foo15(r15arg1); // any >foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r15arg1 : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r16arg1 = (x: T) => [1]; >r16arg1 : (x: T) => number[] @@ -1247,9 +1247,9 @@ var r16 = foo16(r16arg1); var r17arg1 = (x: (a: T) => T) => null; >r17arg1 : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^^^^ ^^^^^ >a : T @@ -1263,13 +1263,13 @@ var r17 = foo17(r17arg1); // any >foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r17arg1 : (x: (a: T) => T) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ var r18arg1 = (x: (a: T) => T) => null; >r18arg1 : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^^^^ ^^^^^ >a : T @@ -1285,5 +1285,5 @@ var r18 = foo18(r18arg1); >foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r18arg1 : (x: (a: T) => T) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index d062d277da94f..6412ed0b7e7d4 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -260,7 +260,7 @@ module Errors { >foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(x: T) => null : (x: T) => U[] -> : ^ ^^^^^^^^ ^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : T > : ^ >null : U[] @@ -280,7 +280,7 @@ module Errors { >'' : "" > : ^^ >(x: T) => null : (x: T) => U[] -> : ^ ^^^^^^^^ ^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : T > : ^ >null : U[] @@ -292,7 +292,7 @@ module Errors { >[(x: T) => null, (x: number) => ['']] : ((x: number) => string[])[] > : ^^^^^ ^^^^^^^^^^^^^^^^ >(x: T) => null : (x: T) => U[] -> : ^ ^^^^^^^^ ^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : T > : ^ >null : U[] @@ -308,15 +308,15 @@ module Errors { var r2arg = (x: (arg: T) => U) => (r: T) => null; >r2arg : (x: (arg: T) => U) => (r: T) => V -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: T) => U) => (r: T) => null : (x: (arg: T) => U) => (r: T) => V -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T > : ^ >(r: T) => null : (r: T) => V -> : ^^^^ ^^^^^^ +> : ^^^^ ^^^^^ >r : T > : ^ >null : V @@ -324,15 +324,15 @@ module Errors { var r2arg2 = (x: (arg: Base) => Derived) => (r: Base) => null; >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 -> : ^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived) => (r: Base) => Derived2 -> : ^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base > : ^^^^ >(r: Base) => null : (r: Base) => Derived2 -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >r : Base > : ^^^^ >null : Derived2 @@ -346,33 +346,33 @@ module Errors { >foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r2arg : (x: (arg: T) => U) => (r: T) => V -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r2a = [r2arg2, r2arg]; >r2a : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r2arg2, r2arg] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r2arg : (x: (arg: T) => U) => (r: T) => V -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r2b = [r2arg, r2arg2]; >r2b : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r2arg, r2arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r2arg : (x: (arg: T) => U) => (r: T) => V -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r3arg = (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null; >r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -384,7 +384,7 @@ module Errors { >foo : number > : ^^^^^^ >(r: T) => null : (r: T) => U -> : ^^^^ ^^^^^^ +> : ^^^^ ^^^^^ >r : T > : ^ >null : U @@ -392,9 +392,9 @@ module Errors { var r3arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null; >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^^^^^ ^^^^^ >x : (arg: Base) => Derived > : ^^^^^^ ^^^^^ >arg : Base @@ -404,7 +404,7 @@ module Errors { >arg2 : Base > : ^^^^ >(r: Base) => null : (r: Base) => Derived -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >r : Base > : ^^^^ >null : Derived @@ -416,33 +416,33 @@ module Errors { >foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r3a = [r3arg2, r3arg]; >r3a : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >[r3arg2, r3arg] : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r3b = [r3arg, r3arg2]; >r3b : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >[r3arg, r3arg2] : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ >r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r4arg = (...x: T[]) => null; >r4arg : (...x: T[]) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >(...x: T[]) => null : (...x: T[]) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >x : T[] > : ^^^ >null : T @@ -450,9 +450,9 @@ module Errors { var r4arg2 = (...x: Base[]) => null; >r4arg2 : (...x: Base[]) => Base -> : ^^^^^^^ ^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >(...x: Base[]) => null : (...x: Base[]) => Base -> : ^^^^^^^ ^^^^^^^^^ +> : ^^^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >null : Base @@ -466,33 +466,33 @@ module Errors { >foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r4arg : (...x: T[]) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r4a = [r4arg2, r4arg]; >r4a : ((...x: Base[]) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^ >[r4arg2, r4arg] : ((...x: Base[]) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^ >r4arg2 : (...x: Base[]) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ >r4arg : (...x: T[]) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r4b = [r4arg, r4arg2]; >r4b : ((...x: Base[]) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^ >[r4arg, r4arg2] : ((...x: Base[]) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^ >r4arg : (...x: T[]) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r4arg2 : (...x: Base[]) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^ var r5arg = (x: T, y: T) => null; >r5arg : (x: T, y: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >(x: T, y: T) => null : (x: T, y: T) => T -> : ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >x : T > : ^ >y : T @@ -502,9 +502,9 @@ module Errors { var r5arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null; >r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^ ^^^^^ ^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >x : { foo: string; } > : ^^^^^^^ ^^^ >foo : string @@ -526,33 +526,33 @@ module Errors { >foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg : (x: T, y: T) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r5a = [r5arg2, r5arg]; >r5a : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r5arg2, r5arg] : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg : (x: T, y: T) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r5b = [r5arg, r5arg2]; >r5b : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r5arg, r5arg2] : ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r5arg : (x: T, y: T) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6arg = (x: Array, y: Array) => >null; ->r6arg : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ ->(x: Array, y: Array) => >null : (x: Array, y: Array) => Derived[] -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^ +>r6arg : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ +>(x: Array, y: Array) => >null : (x: Array, y: Array) => Array +> : ^^^^ ^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >y : Derived2[] @@ -562,9 +562,9 @@ module Errors { var r6arg2 = >(x: Array, y: Array) => null; >r6arg2 : (x: Array, y: Array) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >>(x: Array, y: Array) => null : (x: Array, y: Array) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ >x : Base[] > : ^^^^^^ >y : Base[] @@ -579,34 +579,34 @@ module Errors { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r6arg : (x: Base[], y: Derived2[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r6arg : (x: Base[], y: Derived2[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6a = [r6arg2, r6arg]; ->r6a : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r6arg2, r6arg] : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r6a : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r6arg2, r6arg] : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r6arg2 : (x: Base[], y: Base[]) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r6arg : (x: Base[], y: Derived2[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r6arg : (x: Base[], y: Derived2[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6b = [r6arg, r6arg2]; ->r6b : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[r6arg, r6arg2] : ((x: Base[], y: Derived2[]) => Derived[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->r6arg : (x: Base[], y: Derived2[]) => Derived[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>r6b : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>[r6arg, r6arg2] : ((x: Base[], y: Derived2[]) => Array)[] +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>r6arg : (x: Base[], y: Derived2[]) => Array +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg2 : (x: Base[], y: Base[]) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r7arg = (x: { a: T; b: T }) => null; >r7arg : (x: { a: T; b: T; }) => T -> : ^ ^^^^^ ^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T -> : ^ ^^^^^ ^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : { a: T; b: T; } > : ^^^^^ ^^^^^ ^^^ >a : T @@ -636,25 +636,25 @@ module Errors { >foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg : (x: { a: T; b: T; }) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ var r7a = [r7arg2, r7arg]; >r7a : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[r7arg2, r7arg] : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg2 : (x: { a: string; b: number; }) => number > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg : (x: { a: T; b: T; }) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ var r7b = [r7arg, r7arg2]; >r7b : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[r7arg, r7arg2] : (((x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg : (x: { a: T; b: T; }) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ >r7arg2 : (x: { a: string; b: number; }) => number > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -702,9 +702,9 @@ module Errors { var r8arg = (x: (a: T) => T) => null; >r8arg : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^^^^ ^^^^^ >a : T @@ -718,13 +718,13 @@ module Errors { >foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r8arg : (x: (a: T) => T) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ var r9arg = (x: (a: T) => T) => null; >r9arg : (x: (a: T) => T) => any[] -> : ^ ^^^^^ ^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => any[] -> : ^ ^^^^^ ^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^^^^ ^^^^^ >a : T @@ -740,7 +740,7 @@ module Errors { >foo17 : { (a2: { (x: { (a: T): T; (a: T_1): T_1; }): any[]; (x: { (a: T_2): T_2; (a: T_3): T_3; }): any[]; }): { (x: { (a: T): T; (a: T_1): T_1; }): any[]; (x: { (a: T_2): T_2; (a: T_3): T_3; }): any[]; }; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r9arg : (x: (a: T) => T) => any[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^ } module WithGenericSignaturesInBaseType { @@ -799,9 +799,9 @@ module WithGenericSignaturesInBaseType { var r3arg2 = (x: T) => null; >r3arg2 : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: T) => null : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >null : T[] @@ -813,5 +813,5 @@ module WithGenericSignaturesInBaseType { >foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r3arg2 : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ } diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.types b/tests/baselines/reference/subtypingWithCallSignatures4.types index 078a5b107087d..31c0647bbff6c 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.types +++ b/tests/baselines/reference/subtypingWithCallSignatures4.types @@ -236,9 +236,9 @@ declare function foo18(a: any): any; var r1arg = (x: T) => null; >r1arg : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: T) => null : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >null : T[] @@ -246,9 +246,9 @@ var r1arg = (x: T) => null; var r1arg2 = (x: T) => null; >r1arg2 : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: T) => null : (x: T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >null : T[] @@ -260,27 +260,27 @@ var r1 = foo1(r1arg); >foo1 : { (a: (x: T) => T[]): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r1arg : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r1a = [r1arg, r1arg2]; >r1a : ((x: T) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^ ^^^ >[r1arg, r1arg2] : ((x: T) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^ ^^^ >r1arg : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ >r1arg2 : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r1b = [r1arg2, r1arg]; >r1b : ((x: T) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^ ^^^ >[r1arg2, r1arg] : ((x: T) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^ ^^^ >r1arg2 : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ >r1arg : (x: T) => T[] -> : ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r2arg = (x: T) => ['']; >r2arg : (x: T) => string[] @@ -336,9 +336,9 @@ var r2b = [r2arg2, r2arg]; var r3arg = (x: T) => null; >r3arg : (x: T) => T -> : ^ ^^^^^ ^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: T) => null : (x: T) => T -> : ^ ^^^^^ ^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : T > : ^ >null : T @@ -358,7 +358,7 @@ var r3 = foo3(r3arg); >foo3 : { (a3: (x: T) => void): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r3arg : (x: T) => T -> : ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r3a = [r3arg, r3arg2]; >r3a : ((x: T) => void)[] @@ -366,7 +366,7 @@ var r3a = [r3arg, r3arg2]; >[r3arg, r3arg2] : ((x: T) => void)[] > : ^^^^^^^^^^^^^^^^^^^^^ >r3arg : (x: T) => T -> : ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ >r3arg2 : (x: T) => void > : ^^^^^^^^^^^^^^^^^ @@ -378,7 +378,7 @@ var r3b = [r3arg2, r3arg]; >r3arg2 : (x: T) => void > : ^^^^^^^^^^^^^^^^^ >r3arg : (x: T) => T -> : ^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ var r4arg = (x: T, y: U) => ''; >r4arg : (x: T, y: U) => string @@ -434,9 +434,9 @@ var r4b = [r4arg2, r4arg]; var r5arg = (x: (arg: T) => U) => null; >r5arg : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >(x: (arg: T) => U) => null : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -446,9 +446,9 @@ var r5arg = (x: (arg: T) => U) => null; var r5arg2 = (x: (arg: T) => U) => null; >r5arg2 : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >(x: (arg: T) => U) => null : (x: (arg: T) => U) => T -> : ^ ^^ ^^^^^ ^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -462,33 +462,33 @@ var r5 = foo5(r5arg); >foo5 : { (a5: (x: (arg: T) => U) => T): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ var r5a = [r5arg, r5arg2]; >r5a : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r5arg, r5arg2] : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r5arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg2 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ var r5b = [r5arg2, r5arg]; >r5b : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r5arg2, r5arg] : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r5arg2 : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >r5arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6arg = (x: (arg: T) => U) => null; >r6arg : (x: (arg: T) => U) => T -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >(x: (arg: T) => U) => null : (x: (arg: T) => U) => T -> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >x : (arg: T) => U > : ^^^^^^ ^^^^^ >arg : T @@ -498,9 +498,9 @@ var r6arg = (x: (arg: T) => U) => null; var r6arg2 = (x: (arg: T) => Derived) => null; >r6arg2 : (x: (arg: T) => Derived) => T -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >(x: (arg: T) => Derived) => null : (x: (arg: T) => Derived) => T -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >x : (arg: T) => Derived > : ^^^^^^ ^^^^^ >arg : T @@ -514,33 +514,33 @@ var r6 = foo6(r6arg); >foo6 : { (a6: (x: (arg: T) => Derived) => T): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6a = [r6arg, r6arg2]; >r6a : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r6arg, r6arg2] : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r6arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg2 : (x: (arg: T) => Derived) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r6b = [r6arg2, r6arg]; >r6b : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r6arg2, r6arg] : ((x: (arg: T) => U) => T)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r6arg2 : (x: (arg: T) => Derived) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r6arg : (x: (arg: T) => U) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r11arg = (x: { foo: T }, y: { foo: U; bar: U }) => null; >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base -> : ^ ^^ ^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ ^^^^^ >(x: { foo: T }, y: { foo: U; bar: U }) => null : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base -> : ^ ^^ ^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ ^^^^^ >x : { foo: T; } > : ^^^^^^^ ^^^ >foo : T @@ -556,9 +556,9 @@ var r11arg = (x: { foo: T }, y: { foo: U; bar: U }) => null; var r11arg2 = (x: { foo: T }, y: { foo: T; bar: T }) => null; >r11arg2 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base -> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^ >(x: { foo: T }, y: { foo: T; bar: T }) => null : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base -> : ^ ^^^^^ ^^^^^ ^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ ^^^^^ >x : { foo: T; } > : ^^^^^^^ ^^^ >foo : T @@ -578,33 +578,33 @@ var r11 = foo11(r11arg); >foo11 : { (a11: (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r11a = [r11arg, r11arg2]; >r11a : ((x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r11arg, r11arg2] : ((x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r11arg2 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r11b = [r11arg2, r11arg]; >r11b : ((x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r11arg2, r11arg] : ((x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r11arg2 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r15arg = (x: { a: U; b: V; }) => null; >r15arg : (x: { a: U; b: V; }) => U[] -> : ^ ^^ ^^^^^ ^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >(x: { a: U; b: V; }) => null : (x: { a: U; b: V; }) => U[] -> : ^ ^^ ^^^^^ ^^^^^^^^ +> : ^ ^^ ^^^^^ ^^^^^ >x : { a: U; b: V; } > : ^^^^^ ^^^^^ ^^^ >a : U @@ -616,9 +616,9 @@ var r15arg = (x: { a: U; b: V; }) => null; var r15arg2 = (x: { a: T; b: T }) => null; >r15arg2 : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : { a: T; b: T; } > : ^^^^^ ^^^^^ ^^^ >a : T @@ -634,33 +634,33 @@ var r15 = foo15(r15arg); >foo15 : { (a15: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r15arg : (x: { a: U; b: V; }) => U[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r15a = [r15arg, r15arg2]; >r15a : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r15arg, r15arg2] : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r15arg : (x: { a: U; b: V; }) => U[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r15arg2 : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ var r15b = [r15arg2, r15arg]; >r15b : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r15arg2, r15arg] : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r15arg2 : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ >r15arg : (x: { a: U; b: V; }) => U[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r16arg = (x: { a: T; b: T }) => null; >r16arg : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >x : { a: T; b: T; } > : ^^^^^ ^^^^^ ^^^ >a : T @@ -672,9 +672,9 @@ var r16arg = (x: { a: T; b: T }) => null; var r16arg2 = (x: { a: T; b: T }) => null; >r16arg2 : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >x : { a: T; b: T; } > : ^^^^^ ^^^^^ ^^^ >a : T @@ -690,33 +690,33 @@ var r16 = foo16(r16arg); >foo16 : { (a16: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r16arg : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r16a = [r16arg, r16arg2]; >r16a : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r16arg, r16arg2] : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r16arg : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r16arg2 : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r16b = [r16arg2, r16arg]; >r16b : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >[r16arg2, r16arg] : ((x: { a: T; b: T; }) => T[])[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ >r16arg2 : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r16arg : (x: { a: T; b: T; }) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ var r17arg = (x: (a: T) => T) => null; >r17arg : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => T[] -> : ^ ^^^^^ ^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^^^^ ^^^^^ >a : T @@ -730,13 +730,13 @@ var r17 = foo17(r17arg); >foo17 : { (a17: { (x: (a: T) => T): T[]; (x: (a: T_1) => T_1): T_1[]; }): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r17arg : (x: (a: T) => T) => T[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^ var r18arg = (x: (a: T) => T) => null; >r18arg : (x: (a: T) => T) => any[] -> : ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^ +> : ^^^^^ ^^^^^ ^^^^^ ^^^^^ >(x: (a: T) => T) => null : (x: (a: T) => T) => any[] -> : ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^ +> : ^^^^^ ^^^^^ ^^^^^ ^^^^^ >x : (a: T) => T > : ^ ^^^^^ ^^^^^ >a : T @@ -750,5 +750,5 @@ var r18 = foo18(r18arg); >foo18 : { (a18: { (x: { (a: T): T; (a: T_1): T_1; }): any[]; (x: { (a: T_2): T_2; (a: T_3): T_3; }): any[]; }): any; (a: any): any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >r18arg : (x: (a: T) => T) => any[] -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index b10398a81a873..c32b4e09351ae 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -11,13 +11,13 @@ Symbol count: 27,000 / 27,500 (nearest 500) const createScopedActionType = (scope: S) => (type: T) => `${scope}/${type}` as `${S}/${T}`; >createScopedActionType : (scope: S) => (type: T) => `${S}/${T}` -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >(scope: S) => (type: T) => `${scope}/${type}` as `${S}/${T}` : (scope: S) => (type: T) => `${S}/${T}` -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >scope : S > : ^ >(type: T) => `${scope}/${type}` as `${S}/${T}` : (type: T) => `${S}/${T}` -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >type : T > : ^ >`${scope}/${type}` as `${S}/${T}` : `${S}/${T}` @@ -35,7 +35,7 @@ const createActionInMyScope = createScopedActionType("MyScope"); // createScopedActionType("MyScope") : (type: T) => `MyScope/${T}` > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >createScopedActionType : (scope: S) => (type: T) => `${S}/${T}` -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"MyScope" : "MyScope" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/templateLiteralsInTypes.types b/tests/baselines/reference/templateLiteralsInTypes.types index d31ab763be643..0b526fef0106f 100644 --- a/tests/baselines/reference/templateLiteralsInTypes.types +++ b/tests/baselines/reference/templateLiteralsInTypes.types @@ -3,9 +3,9 @@ === templateLiteralsInTypes.ts === const f = (hdr: string, val: number) => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n`; >f : (hdr: string, val: number) => `${string}:\t${number}\r\n` -> : ^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^ ^^^^^ >(hdr: string, val: number) => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n` : (hdr: string, val: number) => `${string}:\t${number}\r\n` -> : ^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^^^ ^^^^^ >hdr : string > : ^^^^^^ >val : number @@ -25,7 +25,7 @@ f("x").foo; >f("x") : `${string}:\t${number}\r\n` > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >f : (hdr: string, val: number) => `${string}:\t${number}\r\n` -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"x" : "x" > : ^^^ >foo : any diff --git a/tests/baselines/reference/thisInTypeQuery.types b/tests/baselines/reference/thisInTypeQuery.types index 6486b0a878e4b..f2d456d53c526 100644 --- a/tests/baselines/reference/thisInTypeQuery.types +++ b/tests/baselines/reference/thisInTypeQuery.types @@ -5,7 +5,7 @@ function assert(condition: unknown): asserts condition { >assert : (condition: unknown) => asserts condition -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^ >condition : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/thisTypeInClasses.types b/tests/baselines/reference/thisTypeInClasses.types index 53e182dd7cc27..a4b6abbbad261 100644 --- a/tests/baselines/reference/thisTypeInClasses.types +++ b/tests/baselines/reference/thisTypeInClasses.types @@ -83,7 +83,7 @@ class C3 { j: (x: any) => x is this; >j : (x: any) => x is this -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any } diff --git a/tests/baselines/reference/thisTypeInFunctions4.types b/tests/baselines/reference/thisTypeInFunctions4.types index 8e90af656cc07..484e74bdfa7a3 100644 --- a/tests/baselines/reference/thisTypeInFunctions4.types +++ b/tests/baselines/reference/thisTypeInFunctions4.types @@ -15,7 +15,7 @@ type CorrectObject = {name: string}; declare function isCorrect(obj: any): obj is CorrectObject >isCorrect : (obj: any) => obj is CorrectObject -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any declare function callsCallback(cb: (name: string)=>void) diff --git a/tests/baselines/reference/thisTypeInInterfaces.types b/tests/baselines/reference/thisTypeInInterfaces.types index fe3baccec88ac..633be7fe21968 100644 --- a/tests/baselines/reference/thisTypeInInterfaces.types +++ b/tests/baselines/reference/thisTypeInInterfaces.types @@ -80,7 +80,7 @@ interface I3 { j: (x: any) => x is this; >j : (x: any) => x is this -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any } diff --git a/tests/baselines/reference/thisTypeInTypePredicate.types b/tests/baselines/reference/thisTypeInTypePredicate.types index 4f261958dbac7..bb17a2e8c8e29 100644 --- a/tests/baselines/reference/thisTypeInTypePredicate.types +++ b/tests/baselines/reference/thisTypeInTypePredicate.types @@ -5,7 +5,7 @@ declare function filter(f: (this: void, x: any) => x is S): S[]; >filter : (f: (this: void, x: any) => x is S) => S[] > : ^ ^^^^^ ^^^^^ >f : (this: void, x: any) => x is S -> : ^^^^^^^ ^^^^^ ^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^ ^^^^^ >this : void > : ^^^^ >x : any @@ -18,7 +18,7 @@ const numbers = filter((x): x is number => 'number' == typeof x) >filter : (f: (this: void, x: any) => x is S) => S[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(x): x is number => 'number' == typeof x : (this: void, x: any) => x is number -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ >x : any >'number' == typeof x : boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/trackedSymbolsNoCrash.js b/tests/baselines/reference/trackedSymbolsNoCrash.js index 56a94d76230e6..2f13e56c15ae3 100644 --- a/tests/baselines/reference/trackedSymbolsNoCrash.js +++ b/tests/baselines/reference/trackedSymbolsNoCrash.js @@ -743,204 +743,6 @@ export interface Node99 { export type Node = Node0 | Node1 | Node2 | Node3 | Node4 | Node5 | Node6 | Node7 | Node8 | Node9 | Node10 | Node11 | Node12 | Node13 | Node14 | Node15 | Node16 | Node17 | Node18 | Node19 | Node20 | Node21 | Node22 | Node23 | Node24 | Node25 | Node26 | Node27 | Node28 | Node29 | Node30 | Node31 | Node32 | Node33 | Node34 | Node35 | Node36 | Node37 | Node38 | Node39 | Node40 | Node41 | Node42 | Node43 | Node44 | Node45 | Node46 | Node47 | Node48 | Node49 | Node50 | Node51 | Node52 | Node53 | Node54 | Node55 | Node56 | Node57 | Node58 | Node59 | Node60 | Node61 | Node62 | Node63 | Node64 | Node65 | Node66 | Node67 | Node68 | Node69 | Node70 | Node71 | Node72 | Node73 | Node74 | Node75 | Node76 | Node77 | Node78 | Node79 | Node80 | Node81 | Node82 | Node83 | Node84 | Node85 | Node86 | Node87 | Node88 | Node89 | Node90 | Node91 | Node92 | Node93 | Node94 | Node95 | Node96 | Node97 | Node98 | Node99; //// [index.d.ts] import * as ast from "./ast"; -export declare const isNodeOfType: (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract(nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract; diff --git a/tests/baselines/reference/trackedSymbolsNoCrash.types b/tests/baselines/reference/trackedSymbolsNoCrash.types index e0aba4b4adb23..ff6effda35075 100644 --- a/tests/baselines/reference/trackedSymbolsNoCrash.types +++ b/tests/baselines/reference/trackedSymbolsNoCrash.types @@ -1022,20 +1022,20 @@ import * as ast from "./ast"; > : ^^^^^^^^^^ export const isNodeOfType = ->isNodeOfType : (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>isNodeOfType : (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ (nodeType: NodeType) => ->(nodeType: NodeType) => ( node: ast.Node | null | undefined, ): node is Extract => node?.kind === nodeType : (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>(nodeType: NodeType) => ( node: ast.Node | null | undefined, ): node is Extract => node?.kind === nodeType : (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >ast : any > : ^^^ >nodeType : NodeType > : ^^^^^^^^ ( ->( node: ast.Node | null | undefined, ): node is Extract => node?.kind === nodeType : (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>( node: ast.Node | null | undefined, ): node is Extract => node?.kind === nodeType : (node: ast.Node | null | undefined) => node is Extract +> : ^^^^^^^ ^^^^^ node: ast.Node | null | undefined, >node : ast.Node | null | undefined diff --git a/tests/baselines/reference/typeGuardFunction.types b/tests/baselines/reference/typeGuardFunction.types index fedd9eef0388a..fc99a8d37d2f1 100644 --- a/tests/baselines/reference/typeGuardFunction.types +++ b/tests/baselines/reference/typeGuardFunction.types @@ -32,17 +32,17 @@ class C extends A { declare function isA(p1: any): p1 is A; >isA : (p1: any) => p1 is A -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : any declare function isB(p1: any): p1 is B; >isB : (p1: any) => p1 is B -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : any declare function isC(p1: any): p1 is C; >isC : (p1: any) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : any declare function retC(): C; @@ -130,7 +130,7 @@ interface I1 { // The type predicate type is assignable to the parameter type. declare function isC_multipleParams(p1, p2): p1 is C; >isC_multipleParams : (p1: any, p2: any) => p1 is C -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >p1 : any >p2 : any @@ -156,11 +156,11 @@ if (isC_multipleParams(a, 0)) { // Methods var obj: { >obj : { func1(p1: A): p1 is C; } -> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^ ^^^ func1(p1: A): p1 is C; >func1 : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : A > : ^ } @@ -170,7 +170,7 @@ class D { method1(p1: A): p1 is C { >method1 : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : A > : ^ @@ -183,9 +183,9 @@ class D { // Arrow function let f1 = (p1: A): p1 is C => false; >f1 : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >(p1: A): p1 is C => false : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : A > : ^ >false : false @@ -196,7 +196,7 @@ declare function f2(p1: (p1: A) => p1 is C); >f2 : (p1: (p1: A) => p1 is C) => any > : ^^^^^ ^^^^^^^^ >p1 : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : A > : ^ @@ -206,7 +206,7 @@ f2(function(p1: A): p1 is C { >f2 : (p1: (p1: A) => p1 is C) => any > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(p1: A): p1 is C { return true;} : (p1: A) => p1 is C -> : ^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^ >p1 : A > : ^ @@ -239,7 +239,7 @@ declare function acceptingTypeGuardFunction(p1: (item) => item is A); >acceptingTypeGuardFunction : (p1: (item: any) => item is A) => any > : ^^^^^ ^^^ ^^^^^^^^ >p1 : (item: any) => item is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ >item : any acceptingTypeGuardFunction(isA); diff --git a/tests/baselines/reference/typeGuardFunctionErrors.types b/tests/baselines/reference/typeGuardFunctionErrors.types index 553e86bf5abfc..039306c389f29 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.types +++ b/tests/baselines/reference/typeGuardFunctionErrors.types @@ -32,7 +32,7 @@ class C extends A { function hasANonBooleanReturnStatement(x): x is A { >hasANonBooleanReturnStatement : (x: any) => x is A -> : ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ @@ -43,7 +43,7 @@ function hasANonBooleanReturnStatement(x): x is A { function hasTypeGuardTypeInsideTypeGuardType(x): x is x is A { >hasTypeGuardTypeInsideTypeGuardType : (x: any) => x is x -> : ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ >is : any @@ -67,7 +67,7 @@ function hasMissingIsKeyword(): x { function hasMissingParameter(): x is A { >hasMissingParameter : () => x is A -> : ^^^^^^^^^^^^ +> : ^^^^^^ return true; >true : true @@ -76,7 +76,7 @@ function hasMissingParameter(): x is A { function hasMissingTypeInTypeGuardType(x): x is { >hasMissingTypeInTypeGuardType : (x: any) => x is {} -> : ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >x : any > : ^^^ @@ -87,7 +87,7 @@ function hasMissingTypeInTypeGuardType(x): x is { function hasNonMatchingParameter(y): x is A { >hasNonMatchingParameter : (y: any) => x is A -> : ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ >y : any > : ^^^ @@ -98,7 +98,7 @@ function hasNonMatchingParameter(y): x is A { function hasNonMatchingParameterType1(x: A): x is B { >hasNonMatchingParameterType1 : (x: A) => x is B -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : A > : ^ @@ -109,7 +109,7 @@ function hasNonMatchingParameterType1(x: A): x is B { function hasNonMatchingParameterType2(x: string): x is number { >hasNonMatchingParameterType2 : (x: string) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : string > : ^^^^^^ @@ -120,7 +120,7 @@ function hasNonMatchingParameterType2(x: string): x is number { function hasNonMathcingGenericType(a: string): a is T[] { >hasNonMathcingGenericType : (a: string) => a is T[] -> : ^^^^^^^ ^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >a : string > : ^^^^^^ @@ -139,19 +139,19 @@ let b: B; declare function isB(p1): p1 is B; >isB : (p1: any) => p1 is B -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any > : ^^^ declare function isC(p1): p1 is C; >isC : (p1: any) => p1 is C -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any > : ^^^ declare function funA(p1: any, p2: any): p1 is B; >funA : (p1: any, p2: any) => p1 is B -> : ^^^^^ ^^^^^^ ^^^^^^^^^^^^ +> : ^^^^^ ^^^^^^ ^^^^^ >p1 : any > : ^^^ >p2 : any @@ -224,7 +224,7 @@ declare function acceptingDifferentSignatureTypeGuardFunction(p1: (p1) => p1 is >acceptingDifferentSignatureTypeGuardFunction : (p1: (p1: any) => p1 is B) => any > : ^^^^^ ^^^ ^^^^^^^^ >p1 : (p1: any) => p1 is B -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any > : ^^^ @@ -239,7 +239,7 @@ acceptingDifferentSignatureTypeGuardFunction(isC); // Boolean not assignable to type guard var assign1: (p1, p2) => p1 is A; >assign1 : (p1: any, p2: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >p1 : any > : ^^^ >p2 : any @@ -266,7 +266,7 @@ assign1 = function(p1, p2): boolean { // Must have matching parameter index var assign2: (p1, p2) => p1 is A; >assign2 : (p1: any, p2: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >p1 : any > : ^^^ >p2 : any @@ -274,11 +274,11 @@ var assign2: (p1, p2) => p1 is A; assign2 = function(p1, p2): p2 is A { >assign2 = function(p1, p2): p2 is A { return true;} : (p1: any, p2: any) => p2 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >assign2 : (p1: any, p2: any) => p1 is A > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(p1, p2): p2 is A { return true;} : (p1: any, p2: any) => p2 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >p1 : any > : ^^^ >p2 : any @@ -293,7 +293,7 @@ assign2 = function(p1, p2): p2 is A { // No matching signature var assign3: (p1, p2) => p1 is A; >assign3 : (p1: any, p2: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^ >p1 : any > : ^^^ >p2 : any @@ -301,11 +301,11 @@ var assign3: (p1, p2) => p1 is A; assign3 = function(p1, p2, p3): p1 is A { >assign3 = function(p1, p2, p3): p1 is A { return true;} : (p1: any, p2: any, p3: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >assign3 : (p1: any, p2: any) => p1 is A > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >function(p1, p2, p3): p1 is A { return true;} : (p1: any, p2: any, p3: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >p1 : any > : ^^^ >p2 : any @@ -406,7 +406,7 @@ interface I2 { // Reference to rest parameter function b4(...a): a is A { >b4 : (...a: any[]) => a is A -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ >a : any[] > : ^^^^^ @@ -418,7 +418,7 @@ function b4(...a): a is A { // Reference to binding pattern function b5({a, b, p1}, p2, p3): p1 is A { >b5 : ({ a, b, p1 }: { a: any; b: any; p1: any; }, p2: any, p3: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : any > : ^^^ >b : any @@ -437,7 +437,7 @@ function b5({a, b, p1}, p2, p3): p1 is A { function b6([a, b, p1], p2, p3): p1 is A { >b6 : ([a, b, p1]: [any, any, any], p2: any, p3: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : any > : ^^^ >b : any @@ -456,7 +456,7 @@ function b6([a, b, p1], p2, p3): p1 is A { function b7({a, b, c: {p1}}, p2, p3): p1 is A { >b7 : ({ a, b, c: { p1 } }: { a: any; b: any; c: { p1: any; }; }, p2: any, p3: any) => p1 is A -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : any > : ^^^ >b : any @@ -509,8 +509,8 @@ type KeySet = { [k in T]: true } // expected an error, since Keys doesn't have a 'd' declare function hasKey(x: KeySet): x is KeySet; ->hasKey : (x: KeySet) => x is KeySet -> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +>hasKey : (x: KeySet) => x is KeySet +> : ^ ^^^^^^^^^^^^^^^^^^ ^^^^^ >x : KeySet > : ^^^^^^^^^ @@ -533,7 +533,7 @@ interface NeedsFoo { isFoo(): this is NeedsFoo; // should error >isFoo : () => this is NeedsFoo -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ }; @@ -547,19 +547,19 @@ declare var alsoAnError: NeedsFoo; // also error, as expected declare function newError1(x: any): x is NeedsFoo; // should error >newError1 : (x: any) => x is NeedsFoo -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ declare function newError2(x: any): x is NeedsFoo; // should error >newError2 : (x: any) => x is NeedsFoo -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any > : ^^^ declare function newError3(x: number): x is NeedsFoo; // should error >newError3 : (x: number) => x is NeedsFoo -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : number > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.types b/tests/baselines/reference/typeGuardFunctionGenerics.types index 37f33c4c7753d..91188bfda9beb 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.types +++ b/tests/baselines/reference/typeGuardFunctionGenerics.types @@ -32,12 +32,12 @@ class C extends A { declare function isB(p1): p1 is B; >isB : (p1: any) => p1 is B -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any declare function isC(p1): p1 is C; >isC : (p1: any) => p1 is C -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any declare function retC(x): C; @@ -54,7 +54,7 @@ declare function funA(p1: (p1) => T): T; declare function funB(p1: (p1) => T, p2: any): p2 is T; >funB : (p1: (p1: any) => T, p2: any) => p2 is T -> : ^ ^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^^^^ +> : ^ ^^^^^^ ^^^ ^^^^^^ ^^^^^ >p1 : (p1: any) => T > : ^^^^^^^^^^^^^ >p1 : any @@ -64,14 +64,14 @@ declare function funC(p1: (p1) => p1 is T): T; >funC : (p1: (p1: any) => p1 is T) => T > : ^ ^^^^^^ ^^^ ^^^^^ >p1 : (p1: any) => p1 is T -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any declare function funD(p1: (p1) => p1 is T, p2: any): p2 is T; >funD : (p1: (p1: any) => p1 is T, p2: any) => p2 is T -> : ^ ^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^^^^ +> : ^ ^^^^^^ ^^^ ^^^^^^ ^^^^^ >p1 : (p1: any) => p1 is T -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any >p2 : any @@ -79,7 +79,7 @@ declare function funE(p1: (p1) => p1 is T, p2: U): T; >funE : (p1: (p1: any) => p1 is T, p2: U) => T > : ^ ^^ ^^^^^^ ^^^ ^^^^^^ ^^^^^ >p1 : (p1: any) => p1 is T -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ >p1 : any >p2 : U > : ^ diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.types b/tests/baselines/reference/typeGuardFunctionOfFormThis.types index 9b16b5517b83d..723daf5873345 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.types @@ -7,7 +7,7 @@ class RoyalGuard { isLeader(): this is LeadGuard { >isLeader : () => this is LeadGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof LeadGuard; >this instanceof LeadGuard : boolean @@ -19,7 +19,7 @@ class RoyalGuard { } isFollower(): this is FollowerGuard { >isFollower : () => this is FollowerGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof FollowerGuard; >this instanceof FollowerGuard : boolean @@ -209,9 +209,9 @@ class ArrowGuard { isElite = (): this is ArrowElite => { >isElite : () => this is ArrowElite -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >(): this is ArrowElite => { return this instanceof ArrowElite; } : () => this is ArrowElite -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof ArrowElite; >this instanceof ArrowElite : boolean @@ -223,9 +223,9 @@ class ArrowGuard { } isMedic = (): this is ArrowMedic => { >isMedic : () => this is ArrowMedic -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >(): this is ArrowMedic => { return this instanceof ArrowMedic; } : () => this is ArrowMedic -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof ArrowMedic; >this instanceof ArrowMedic : boolean @@ -331,11 +331,11 @@ interface Crate { isSupplies(): this is Crate; >isSupplies : () => this is Crate -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ isSundries(): this is Crate; >isSundries : () => this is Crate -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } let crate: Crate<{}>; @@ -435,7 +435,7 @@ class MimicGuard { isLeader(): this is MimicLeader { return this instanceof MimicLeader; }; >isLeader : () => this is MimicLeader -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this instanceof MimicLeader : boolean > : ^^^^^^^ >this : this @@ -445,7 +445,7 @@ class MimicGuard { isFollower(): this is MimicFollower { return this instanceof MimicFollower; }; >isFollower : () => this is MimicFollower -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ >this instanceof MimicFollower : boolean > : ^^^^^^^ >this : this @@ -557,10 +557,10 @@ if (mimic.isFollower()) { interface MimicGuardInterface { isLeader(): this is LeadGuard; >isLeader : () => this is LeadGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ isFollower(): this is FollowerGuard; >isFollower : () => this is FollowerGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types index 64d6a4227f689..ab0b86cc9c530 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types @@ -7,7 +7,7 @@ class RoyalGuard { isLeader(): this is LeadGuard { >isLeader : () => this is LeadGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof LeadGuard; >this instanceof LeadGuard : boolean @@ -19,7 +19,7 @@ class RoyalGuard { } isFollower(): this is FollowerGuard { >isFollower : () => this is FollowerGuard -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return this instanceof FollowerGuard; >this instanceof FollowerGuard : boolean @@ -137,7 +137,7 @@ a.isLeader = a.isFollower; function invalidGuard(c: any): this is number { >invalidGuard : (c: any) => this is number -> : ^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >c : any > : ^^^ diff --git a/tests/baselines/reference/typeGuardIntersectionTypes.types b/tests/baselines/reference/typeGuardIntersectionTypes.types index 6c89e6edba7d5..e6ec6b38bc0b1 100644 --- a/tests/baselines/reference/typeGuardIntersectionTypes.types +++ b/tests/baselines/reference/typeGuardIntersectionTypes.types @@ -21,17 +21,17 @@ interface Z { declare function isX(obj: any): obj is X; >isX : (obj: any) => obj is X -> : ^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any declare function isY(obj: any): obj is Y; >isY : (obj: any) => obj is Y -> : ^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any declare function isZ(obj: any): obj is Z; >isZ : (obj: any) => obj is Z -> : ^^^^^^ ^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >obj : any function f1(obj: Object) { @@ -116,7 +116,7 @@ interface B { // a type guard for B function isB(toTest: any): toTest is B { >isB : (toTest: any) => toTest is B -> : ^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^ >toTest : any return toTest && toTest.b; @@ -179,7 +179,7 @@ interface Winged { wings: boolean; } // Beast feature detection via user-defined type guards function hasLegs(x: Beast): x is Legged { return x && typeof x.legs === 'number'; } >hasLegs : (x: Beast) => x is Legged -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : Beast > : ^^^^^ >x && typeof x.legs === 'number' : boolean @@ -201,7 +201,7 @@ function hasLegs(x: Beast): x is Legged { return x && typeof x.legs === 'number' function hasWings(x: Beast): x is Winged { return x && !!x.wings; } >hasWings : (x: Beast) => x is Winged -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : Beast > : ^^^^^ >x && !!x.wings : boolean diff --git a/tests/baselines/reference/typeGuardNarrowByMutableUntypedField.types b/tests/baselines/reference/typeGuardNarrowByMutableUntypedField.types index 1e6b06ad520fe..4bbfbe291ae0d 100644 --- a/tests/baselines/reference/typeGuardNarrowByMutableUntypedField.types +++ b/tests/baselines/reference/typeGuardNarrowByMutableUntypedField.types @@ -3,7 +3,7 @@ === typeGuardNarrowByMutableUntypedField.ts === declare function hasOwnProperty

(target: {}, property: P): target is { [K in P]: unknown }; >hasOwnProperty :

(target: {}, property: P) => target is { [K in P]: unknown; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >target : {} > : ^^ >property : P diff --git a/tests/baselines/reference/typeGuardNarrowByUntypedField.types b/tests/baselines/reference/typeGuardNarrowByUntypedField.types index bc9a0f96558e5..650ca4d6aef15 100644 --- a/tests/baselines/reference/typeGuardNarrowByUntypedField.types +++ b/tests/baselines/reference/typeGuardNarrowByUntypedField.types @@ -3,7 +3,7 @@ === typeGuardNarrowByUntypedField.ts === declare function hasOwnProperty

(target: {}, property: P): target is { readonly [K in P]: unknown }; >hasOwnProperty :

(target: {}, property: P) => target is { readonly [K in P]: unknown; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^ >target : {} > : ^^ >property : P diff --git a/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types b/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types index 485b020dacdd3..c017ea85f6e28 100644 --- a/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types +++ b/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types @@ -7,8 +7,8 @@ type Tag = {__tag: any}; >__tag : any declare function isNonBlank(value: string) : value is (string & Tag); ->isNonBlank : (value: string) => value is string & Tag -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isNonBlank : (value: string) => value is (string & Tag) +> : ^^^^^^^^ ^^^^^ >value : string > : ^^^^^^ @@ -60,8 +60,8 @@ const enum Tag2 {} > : ^^^^ declare function isNonBlank2(value: string) : value is (string & Tag2); ->isNonBlank2 : (value: string) => value is never -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +>isNonBlank2 : (value: string) => value is (string & Tag2) +> : ^^^^^^^^ ^^^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardNarrowsToLiteralType.types b/tests/baselines/reference/typeGuardNarrowsToLiteralType.types index 95e3d402d6559..c8861032ce20a 100644 --- a/tests/baselines/reference/typeGuardNarrowsToLiteralType.types +++ b/tests/baselines/reference/typeGuardNarrowsToLiteralType.types @@ -3,7 +3,7 @@ === typeGuardNarrowsToLiteralType.ts === declare function isFoo(value: string) : value is "foo"; >isFoo : (value: string) => value is "foo" -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardNarrowsToLiteralTypeUnion.types b/tests/baselines/reference/typeGuardNarrowsToLiteralTypeUnion.types index 785664d05b01c..57d957d5242fa 100644 --- a/tests/baselines/reference/typeGuardNarrowsToLiteralTypeUnion.types +++ b/tests/baselines/reference/typeGuardNarrowsToLiteralTypeUnion.types @@ -2,8 +2,8 @@ === typeGuardNarrowsToLiteralTypeUnion.ts === declare function isFoo(value: string) : value is ("foo" | "bar"); ->isFoo : (value: string) => value is "foo" | "bar" -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isFoo : (value: string) => value is ("foo" | "bar") +> : ^^^^^^^^ ^^^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardOfFormFunctionEquality.types b/tests/baselines/reference/typeGuardOfFormFunctionEquality.types index 160f86e1c5807..3510ea897c136 100644 --- a/tests/baselines/reference/typeGuardOfFormFunctionEquality.types +++ b/tests/baselines/reference/typeGuardOfFormFunctionEquality.types @@ -3,7 +3,7 @@ === typeGuardOfFormFunctionEquality.ts === declare function isString1(a: number, b: Object): b is string; >isString1 : (a: number, b: Object) => b is string -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >a : number > : ^^^^^^ >b : Object @@ -11,7 +11,7 @@ declare function isString1(a: number, b: Object): b is string; declare function isString2(a: Object): a is string; >isString2 : (a: Object) => a is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : Object > : ^^^^^^ @@ -58,7 +58,7 @@ var x = isString1(0, "") === isString2(""); function isString3(a: number, b: number, c: Object): c is string { >isString3 : (a: number, b: number, c: Object) => c is string -> : ^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ ^^^^^ >a : number > : ^^^^^^ >b : number diff --git a/tests/baselines/reference/typeGuardOfFormIsType.types b/tests/baselines/reference/typeGuardOfFormIsType.types index 08ebf579a84a2..41b8978be7b85 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.types +++ b/tests/baselines/reference/typeGuardOfFormIsType.types @@ -41,7 +41,7 @@ var strOrNum: string | number; function isC1(x: any): x is C1 { >isC1 : (x: any) => x is C1 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; @@ -51,7 +51,7 @@ function isC1(x: any): x is C1 { function isC2(x: any): x is C2 { >isC2 : (x: any) => x is C2 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; @@ -61,7 +61,7 @@ function isC2(x: any): x is C2 { function isD1(x: any): x is D1 { >isD1 : (x: any) => x is D1 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; diff --git a/tests/baselines/reference/typeGuardOfFormIsTypeOnInterfaces.types b/tests/baselines/reference/typeGuardOfFormIsTypeOnInterfaces.types index 51dc58e2e71ce..40f0c9b966590 100644 --- a/tests/baselines/reference/typeGuardOfFormIsTypeOnInterfaces.types +++ b/tests/baselines/reference/typeGuardOfFormIsTypeOnInterfaces.types @@ -45,7 +45,7 @@ var strOrNum: string | number; function isC1(x: any): x is C1 { >isC1 : (x: any) => x is C1 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; @@ -55,7 +55,7 @@ function isC1(x: any): x is C1 { function isC2(x: any): x is C2 { >isC2 : (x: any) => x is C2 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; @@ -65,7 +65,7 @@ function isC2(x: any): x is C2 { function isD1(x: any): x is D1 { >isD1 : (x: any) => x is D1 -> : ^^^^ ^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any return true; diff --git a/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types b/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types index edd568084acad..e5af38e18b0ed 100644 --- a/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types +++ b/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types @@ -7,7 +7,7 @@ export namespace TypeGuards { export function IsObject(value: any) : value is {[index:string]:any} { >IsObject : (value: any) => value is { [index: string]: any; } -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : any >index : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardsAsAssertions.types b/tests/baselines/reference/typeGuardsAsAssertions.types index be20d093507f9..0b6797964c3c3 100644 --- a/tests/baselines/reference/typeGuardsAsAssertions.types +++ b/tests/baselines/reference/typeGuardsAsAssertions.types @@ -31,7 +31,7 @@ export const none : None = { none: '' }; export function isSome(value: Optional): value is Some { >isSome : (value: Optional) => value is Some -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : Optional > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types index 4c52293c595e8..a7083fc41e4c6 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types +++ b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types @@ -5,7 +5,7 @@ interface AConstructor { new (): A; [Symbol.hasInstance](value: unknown): value is A; >[Symbol.hasInstance] : (value: unknown) => value is A -> : ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -87,7 +87,7 @@ interface BConstructor { new (): B; [Symbol.hasInstance](value: unknown): value is B; >[Symbol.hasInstance] : (value: unknown) => value is B -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -216,7 +216,7 @@ interface CConstructor { [Symbol.hasInstance](value: unknown): value is C1 | C2; >[Symbol.hasInstance] : (value: unknown) => value is C1 | C2 -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -346,12 +346,12 @@ interface D { } declare var D: { >D : { new (): D; [Symbol.hasInstance](value: unknown): value is D; } -> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ new (): D; [Symbol.hasInstance](value: unknown): value is D; >[Symbol.hasInstance] : (value: unknown) => value is D -> : ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -426,7 +426,7 @@ interface EConstructor { new (): E1 | E2; [Symbol.hasInstance](value: unknown): value is E1 | E2; >[Symbol.hasInstance] : (value: unknown) => value is E1 | E2 -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -537,7 +537,7 @@ interface FConstructor { new (): any; [Symbol.hasInstance](value: unknown): value is any; >[Symbol.hasInstance] : (value: unknown) => value is any -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -627,7 +627,7 @@ interface GConstructor { new (): G2; // low priority [Symbol.hasInstance](value: unknown): value is G1; // overrides priority >[Symbol.hasInstance] : (value: unknown) => value is G1 -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -718,7 +718,7 @@ interface HConstructor { new (): H; // low priority [Symbol.hasInstance](value: unknown): value is H; // overrides priority >[Symbol.hasInstance] : (value: unknown) => value is H -> : ^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >Symbol.hasInstance : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/typeInferenceTypePredicate.types b/tests/baselines/reference/typeInferenceTypePredicate.types index 52cc535fbd153..ef68b13a84900 100644 --- a/tests/baselines/reference/typeInferenceTypePredicate.types +++ b/tests/baselines/reference/typeInferenceTypePredicate.types @@ -5,7 +5,7 @@ declare function f(predicate: (x: {}) => x is T): T; >f : (predicate: (x: {}) => x is T) => T > : ^ ^^^^^^^^^^^^^ ^^^^^ >predicate : (x: {}) => x is T -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : {} > : ^^ @@ -18,7 +18,7 @@ const res = f((n): n is number => true); >f : (predicate: (x: {}) => x is T) => T > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(n): n is number => true : (n: {}) => n is number -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^ >n : {} > : ^^ >true : true diff --git a/tests/baselines/reference/typeInferenceTypePredicate2.types b/tests/baselines/reference/typeInferenceTypePredicate2.types index ab6f30c031089..8b259d745b326 100644 --- a/tests/baselines/reference/typeInferenceTypePredicate2.types +++ b/tests/baselines/reference/typeInferenceTypePredicate2.types @@ -23,7 +23,7 @@ >filter : { (predicate: (value: boolean, index: number, array: boolean[]) => value is S, thisArg?: any): S[]; (predicate: (value: boolean, index: number, array: boolean[]) => unknown, thisArg?: any): boolean[]; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(thing): thing is boolean => thing !== null : (thing: boolean) => thing is boolean -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ >thing : boolean > : ^^^^^^^ >thing !== null : boolean diff --git a/tests/baselines/reference/typeParameterConstModifiers.types b/tests/baselines/reference/typeParameterConstModifiers.types index c76d067edaf84..45eea17ed8719 100644 --- a/tests/baselines/reference/typeParameterConstModifiers.types +++ b/tests/baselines/reference/typeParameterConstModifiers.types @@ -700,7 +700,7 @@ const tMapped = thingMapped({ foo: '' }); // { foo: "" } function factory_55033_minimal(cb: (...args: T) => void) { >factory_55033_minimal : (cb: (...args: T) => void) => T -> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >cb : (...args: T) => void > : ^^^^^^^^^^ ^^^^^ >args : T @@ -719,7 +719,7 @@ const test_55033_minimal = factory_55033_minimal((b: string) => {}) >factory_55033_minimal((b: string) => {}) : readonly [b: string] > : ^^^^^^^^^^^^^^^^^^^^ >factory_55033_minimal : (cb: (...args: T) => void) => T -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(b: string) => {} : (b: string) => void > : ^^^^ ^^^^^^^^^ >b : string @@ -758,7 +758,7 @@ const t1_55033 = factory_55033((a: { test: number }, b: string) => {})( >factory_55033((a: { test: number }, b: string) => {}) : (...args: K) => K > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >factory_55033 : (cb: (...args: T) => void) => (...args: K) => K -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void > : ^^^^ ^^^^^ ^^^^^^^^^ >a : { test: number; } @@ -790,7 +790,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})( >factory_55033((a: { test: number }, b: string) => {}) : (...args: K) => K > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >factory_55033 : (cb: (...args: T) => void) => (...args: K) => K -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void > : ^^^^ ^^^^^ ^^^^^^^^^ >a : { test: number; } @@ -851,7 +851,7 @@ const t1_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})( >factory_55033_2((a: { test: number }, b: string) => {}) : (...args: K) => K > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >factory_55033_2 : (cb: (...args: T) => void) => (...args: K) => K -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void > : ^^^^ ^^^^^ ^^^^^^^^^ >a : { test: number; } @@ -883,7 +883,7 @@ const t2_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})( >factory_55033_2((a: { test: number }, b: string) => {}) : (...args: K) => K > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >factory_55033_2 : (cb: (...args: T) => void) => (...args: K) => K -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void > : ^^^^ ^^^^^ ^^^^^^^^^ >a : { test: number; } diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types index 221c30b0379a0..89c2cccdbb3f2 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types @@ -58,7 +58,7 @@ var d = f(a, b, x => x, x => x); // Type [A, B] >x : B > : ^ >x => x : (x: A) => any -> : ^^^^^^^^^^^^^ +> : ^^^^^^^^^^ >x : A > : ^ >x : any diff --git a/tests/baselines/reference/typePredicateAcceptingPartialOfRefinedType.types b/tests/baselines/reference/typePredicateAcceptingPartialOfRefinedType.types index 49f52f287ec9a..ca53bbe0cc968 100644 --- a/tests/baselines/reference/typePredicateAcceptingPartialOfRefinedType.types +++ b/tests/baselines/reference/typePredicateAcceptingPartialOfRefinedType.types @@ -17,7 +17,7 @@ interface Options { declare function includesAllRequiredOptions(options: Partial): options is Options; >includesAllRequiredOptions : (options: Partial) => options is Options -> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^ >options : Partial > : ^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/typePredicateFreshLiteralWidening.types b/tests/baselines/reference/typePredicateFreshLiteralWidening.types index dfed35238cd48..3631f03582042 100644 --- a/tests/baselines/reference/typePredicateFreshLiteralWidening.types +++ b/tests/baselines/reference/typePredicateFreshLiteralWidening.types @@ -34,9 +34,9 @@ const satisfies = const isNotNull = (value: T | null): value is T => value !== null; >isNotNull : (value: T | null) => value is T -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >(value: T | null): value is T => value !== null : (value: T | null) => value is T -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T | null > : ^^^^^^^^ >value !== null : boolean diff --git a/tests/baselines/reference/typePredicateInLoop.types b/tests/baselines/reference/typePredicateInLoop.types index da0e7ed618dda..6117be8b2462b 100644 --- a/tests/baselines/reference/typePredicateInLoop.types +++ b/tests/baselines/reference/typePredicateInLoop.types @@ -17,9 +17,9 @@ interface TypeExt extends Type { const guard = (arg: Type): arg is TypeExt => arg.type === 1; >guard : (arg: Type) => arg is TypeExt -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >(arg: Type): arg is TypeExt => arg.type === 1 : (arg: Type) => arg is TypeExt -> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ ^^^^^ >arg : Type > : ^^^^ >arg.type === 1 : boolean diff --git a/tests/baselines/reference/typePredicateStructuralMatch.types b/tests/baselines/reference/typePredicateStructuralMatch.types index 1755fe2cd2fc4..bb1015773fdbf 100644 --- a/tests/baselines/reference/typePredicateStructuralMatch.types +++ b/tests/baselines/reference/typePredicateStructuralMatch.types @@ -55,7 +55,7 @@ type Results = Result[]; function isResponseInData(value: T | { data: T}): value is { data: T } { >isResponseInData : (value: T | { data: T; }) => value is { data: T; } -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T | { data: T; } > : ^^^^^^^^^^^^ ^^^ >data : T @@ -105,7 +105,7 @@ function getResults1(value: Results | { data: Results }): Results { function isPlainResponse(value: T | { data: T}): value is T { >isPlainResponse : (value: T | { data: T; }) => value is T -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : T | { data: T; } > : ^^^^^^^^^^^^ ^^^ >data : T diff --git a/tests/baselines/reference/typePredicateTopLevelTypeParameter.types b/tests/baselines/reference/typePredicateTopLevelTypeParameter.types index 1d5d2babbe256..bfe96fbbafc4a 100644 --- a/tests/baselines/reference/typePredicateTopLevelTypeParameter.types +++ b/tests/baselines/reference/typePredicateTopLevelTypeParameter.types @@ -52,7 +52,7 @@ const admins = ['Mike', 'Joe'].map(e => getPermissions(e)); function isDefined(a: T | undefined): a is T { >isDefined : (a: T | undefined) => a is T -> : ^ ^^^^^ ^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >a : T | undefined > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/typePredicateWithThisParameter.types b/tests/baselines/reference/typePredicateWithThisParameter.types index 396c8569766a1..6c95cdcc8e9e6 100644 --- a/tests/baselines/reference/typePredicateWithThisParameter.types +++ b/tests/baselines/reference/typePredicateWithThisParameter.types @@ -16,7 +16,7 @@ interface Bar { function isFoo1(object: {}): object is Foo { >isFoo1 : (object: {}) => object is Foo -> : ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^ >object : {} > : ^^ @@ -31,7 +31,7 @@ function isFoo1(object: {}): object is Foo { function isFoo2(this: void, object: {}): object is Foo { >isFoo2 : (this: void, object: {}) => object is Foo -> : ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^ ^^^^^^^^^^ ^^^^^ >this : void > : ^^^^ >object : {} diff --git a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types index aad469161a656..73448841b8e43 100644 --- a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types @@ -14,7 +14,7 @@ declare const fruit: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } declare function isOneOf(item: T, array: readonly U[]): item is U >isOneOf : (item: T, array: readonly U[]) => item is U -> : ^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ >item : T > : ^ >array : readonly U[] diff --git a/tests/baselines/reference/typePredicatesInUnion.types b/tests/baselines/reference/typePredicatesInUnion.types index 2f2dccb4b5a3f..9b5b4571381e8 100644 --- a/tests/baselines/reference/typePredicatesInUnion.types +++ b/tests/baselines/reference/typePredicatesInUnion.types @@ -4,14 +4,14 @@ interface A { pred(x: {}): x is boolean; >pred : (x: {}) => x is boolean -> : ^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : {} > : ^^ } interface B { pred(x: {}): x is string; >pred : (x: {}) => x is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : {} > : ^^ } diff --git a/tests/baselines/reference/typePredicatesInUnion2.types b/tests/baselines/reference/typePredicatesInUnion2.types index 6cb184b2b87b8..e5199b757dcd9 100644 --- a/tests/baselines/reference/typePredicatesInUnion2.types +++ b/tests/baselines/reference/typePredicatesInUnion2.types @@ -3,12 +3,12 @@ === typePredicatesInUnion2.ts === declare function isString(x: any): x is string; >isString : (x: any) => x is string -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any declare function isNumber(x: any): x is number; >isNumber : (x: any) => x is number -> : ^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any declare function f(p: typeof isString | typeof isNumber): void; diff --git a/tests/baselines/reference/typePredicatesInUnion3.types b/tests/baselines/reference/typePredicatesInUnion3.types index b89dcc3814fdb..6a75242729167 100644 --- a/tests/baselines/reference/typePredicatesInUnion3.types +++ b/tests/baselines/reference/typePredicatesInUnion3.types @@ -142,7 +142,7 @@ class Type1 { predicate(): this is HasAttribute { >predicate : () => this is HasAttribute -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^ return true; >true : true diff --git a/tests/baselines/reference/typePredicatesInUnion_noMatch.types b/tests/baselines/reference/typePredicatesInUnion_noMatch.types index 31a565bed7925..50fec5149989a 100644 --- a/tests/baselines/reference/typePredicatesInUnion_noMatch.types +++ b/tests/baselines/reference/typePredicatesInUnion_noMatch.types @@ -4,7 +4,7 @@ interface A { pred(x: {}, y: {}): x is boolean; >pred : (x: {}, y: {}) => x is boolean -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >x : {} > : ^^ >y : {} @@ -13,7 +13,7 @@ interface A { interface B { pred(x: {}, y: {}): y is string; >pred : (x: {}, y: {}) => y is string -> : ^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ ^^^^^ >x : {} > : ^^ >y : {} diff --git a/tests/baselines/reference/typePredicatesOptionalChaining1.types b/tests/baselines/reference/typePredicatesOptionalChaining1.types index c6bd9e9e5f58a..72aec312c66b9 100644 --- a/tests/baselines/reference/typePredicatesOptionalChaining1.types +++ b/tests/baselines/reference/typePredicatesOptionalChaining1.types @@ -31,7 +31,7 @@ const x: X = { // type guard function isNotNull(x: A): x is NonNullable { >isNotNull : (x: A) => x is NonNullable -> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^ >x : A > : ^ diff --git a/tests/baselines/reference/typePredicatesOptionalChaining2.types b/tests/baselines/reference/typePredicatesOptionalChaining2.types index ba9e2a70342eb..8aac771c45e7a 100644 --- a/tests/baselines/reference/typePredicatesOptionalChaining2.types +++ b/tests/baselines/reference/typePredicatesOptionalChaining2.types @@ -43,9 +43,9 @@ const getName1 = (person?: Person): string => { const isString = (value: any): value is string => { >isString : (value: any) => value is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >(value: any): value is string => { return typeof value === 'string';} : (value: any) => value is string -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^ >value : any return typeof value === 'string'; diff --git a/tests/baselines/reference/typePredicatesOptionalChaining3.types b/tests/baselines/reference/typePredicatesOptionalChaining3.types index 9d27f1cb92605..30a0561c2a309 100644 --- a/tests/baselines/reference/typePredicatesOptionalChaining3.types +++ b/tests/baselines/reference/typePredicatesOptionalChaining3.types @@ -13,8 +13,8 @@ interface Breed { } declare function isNil(value: unknown): value is undefined | null; ->isNil : (value: unknown) => value is null | undefined -> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>isNil : (value: unknown) => value is undefined | null +> : ^^^^^^^^ ^^^^^ >value : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/typeReferenceRelatedFiles.types b/tests/baselines/reference/typeReferenceRelatedFiles.types index 325b7a73973a8..3e9ac9d449a36 100644 --- a/tests/baselines/reference/typeReferenceRelatedFiles.types +++ b/tests/baselines/reference/typeReferenceRelatedFiles.types @@ -18,7 +18,7 @@ import { FSWatcher } from "fs"; export function f() { >f : () => FSWatcher -> : ^^^^^^^^^^^^^^^ +> : ^^^^^^ return {} as FSWatcher; >{} as FSWatcher : FSWatcher diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 2d7877b21790d..593207a20f80d 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -131,17 +131,17 @@ type T73 = U & string; declare function isA(x: any): x is "a"; >isA : (x: any) => x is "a" -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any declare function isB(x: any): x is "b"; >isB : (x: any) => x is "b" -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any declare function isC(x: any): x is "c"; >isC : (x: any) => x is "c" -> : ^^^^ ^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : any function foo(x: K) { diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.types b/tests/baselines/reference/typeofImportInstantiationExpression.types index 1c96f22ef074d..dad6ce4739bbc 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.types +++ b/tests/baselines/reference/typeofImportInstantiationExpression.types @@ -19,7 +19,7 @@ interface Arg = Record> export function myFunction = Record>(arg: Arg) { return (arg.params || {}) as U } >myFunction : = Record>(arg: Arg) => U -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ +> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ >arg : Arg > : ^^^^^^^^^ >(arg.params || {}) as U : U @@ -40,7 +40,7 @@ export function myFunction = RecordT1 : = Record>(arg: Arg) => U -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >myFunction : error type T2 = typeof import('./input.js').myFunction; diff --git a/tests/baselines/reference/unionAndIntersectionInference1.types b/tests/baselines/reference/unionAndIntersectionInference1.types index d526ef367f5d4..5131c53083861 100644 --- a/tests/baselines/reference/unionAndIntersectionInference1.types +++ b/tests/baselines/reference/unionAndIntersectionInference1.types @@ -111,7 +111,7 @@ var result = destructure(value, text => 'string', y => 'other one'); // text: st function isVoid(value: void | a): value is void { >isVoid : (value: void | a) => value is void -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : void | a > : ^^^^^^^^ @@ -122,7 +122,7 @@ function isVoid(value: void | a): value is void { function isNonVoid(value: void | a) : value is a { >isNonVoid : (value: void | a) => value is a -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : void | a > : ^^^^^^^^ diff --git a/tests/baselines/reference/unionOfArraysFilterCall.types b/tests/baselines/reference/unionOfArraysFilterCall.types index 2ae78b7f67cb1..e488f6fa7d751 100644 --- a/tests/baselines/reference/unionOfArraysFilterCall.types +++ b/tests/baselines/reference/unionOfArraysFilterCall.types @@ -99,7 +99,7 @@ interface Buzz { declare function isFizz(x: unknown): x is Fizz; >isFizz : (x: unknown) => x is Fizz -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ @@ -121,7 +121,7 @@ declare function isFizz(x: unknown): x is Fizz; declare function isBuzz(x: unknown): x is Buzz; >isBuzz : (x: unknown) => x is Buzz -> : ^^^^ ^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/unionWithIndexSignature.types b/tests/baselines/reference/unionWithIndexSignature.types index d490bb9e8c247..2448fcf259d7a 100644 --- a/tests/baselines/reference/unionWithIndexSignature.types +++ b/tests/baselines/reference/unionWithIndexSignature.types @@ -45,7 +45,7 @@ export type TypedArray = Int32Array | Uint8Array; export function isTypedArray(a: {}): a is Int32Array | Uint8Array { >isTypedArray : (a: {}) => a is Int32Array | Uint8Array -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >a : {} > : ^^ diff --git a/tests/baselines/reference/uniqueSymbolsErrors.types b/tests/baselines/reference/uniqueSymbolsErrors.types index 9d78831695d07..4caf0f2bfcc62 100644 --- a/tests/baselines/reference/uniqueSymbolsErrors.types +++ b/tests/baselines/reference/uniqueSymbolsErrors.types @@ -39,8 +39,8 @@ declare function invalidThisType(this: unique symbol): void; > : ^^^^^^ declare function invalidTypePredicate(n: any): n is unique symbol; ->invalidTypePredicate : (n: any) => n is symbol -> : ^^^^ ^^^^^^^^^^^^^^^^ +>invalidTypePredicate : (n: any) => n is unique symbol +> : ^^^^ ^^^^^ >n : any > : ^^^ @@ -92,8 +92,8 @@ class InvalidClass { > : ^^^^^^ invalidTypePredicate(n: any): n is unique symbol { return; } ->invalidTypePredicate : (n: any) => n is symbol -> : ^^^^ ^^^^^^^^^^^^^^^^ +>invalidTypePredicate : (n: any) => n is unique symbol +> : ^^^^ ^^^^^ >n : any > : ^^^ @@ -142,8 +142,8 @@ class InvalidClass { > : ^^^^^^ static invalidStaticTypePredicate(n: any): n is unique symbol { return; } ->invalidStaticTypePredicate : (n: any) => n is symbol -> : ^^^^ ^^^^^^^^^^^^^^^^ +>invalidStaticTypePredicate : (n: any) => n is unique symbol +> : ^^^^ ^^^^^ >n : any > : ^^^ @@ -195,8 +195,8 @@ interface InvalidInterface { > : ^^^^^^ invalidTypePredicate(n: any): n is unique symbol ->invalidTypePredicate : (n: any) => n is symbol -> : ^^^^ ^^^^^^^^^^^^^^^^ +>invalidTypePredicate : (n: any) => n is unique symbol +> : ^^^^ ^^^^^ >n : any > : ^^^ @@ -241,8 +241,8 @@ type InvalidTypeLiteral = { > : ^^^^^^ invalidTypePredicate(n: any): n is unique symbol ->invalidTypePredicate : (n: any) => n is symbol -> : ^^^^ ^^^^^^^^^^^^^^^^ +>invalidTypePredicate : (n: any) => n is unique symbol +> : ^^^^ ^^^^^ >n : any > : ^^^ diff --git a/tests/baselines/reference/unknownType1.types b/tests/baselines/reference/unknownType1.types index 2f0911aec871b..404220fe9356c 100644 --- a/tests/baselines/reference/unknownType1.types +++ b/tests/baselines/reference/unknownType1.types @@ -267,7 +267,7 @@ function f11(x: unknown) { declare function isFunction(x: unknown): x is Function; >isFunction : (x: unknown) => x is Function -> : ^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^^^^ ^^^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types index 6d5acd2bdf923..bdb76f80bf42f 100644 --- a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types +++ b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types @@ -138,7 +138,7 @@ class Type { /** a custom type guard */ readonly is: (u: unknown) => u is A, >is : (u: unknown) => u is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >u : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types index 47dcd3f1084dd..31b84ebb3244e 100644 --- a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types +++ b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types @@ -138,7 +138,7 @@ class Type { /** a custom type guard */ readonly is: (u: unknown) => u is A, >is : (u: unknown) => u is A -> : ^^^^ ^^^^^^^^^^^ +> : ^^^^ ^^^^^ >u : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/voidUndefinedReduction.types b/tests/baselines/reference/voidUndefinedReduction.types index fa36a16375a75..62f03f127b907 100644 --- a/tests/baselines/reference/voidUndefinedReduction.types +++ b/tests/baselines/reference/voidUndefinedReduction.types @@ -5,7 +5,7 @@ function isDefined(value: T | undefined | null | void): value is T { >isDefined : (value: T | undefined | null | void) => value is T -> : ^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^^^^ >value : void | T | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/cases/fourslash/thisPredicateFunctionQuickInfo01.ts b/tests/cases/fourslash/thisPredicateFunctionQuickInfo01.ts index 153e5aa639066..d4abaf8653637 100644 --- a/tests/cases/fourslash/thisPredicateFunctionQuickInfo01.ts +++ b/tests/cases/fourslash/thisPredicateFunctionQuickInfo01.ts @@ -43,11 +43,11 @@ verify.quickInfos({ 1: "(method) FileSystemObject.isFile(): this is Item", 2: "(method) FileSystemObject.isDirectory(): this is Directory", - 3: "(method) FileSystemObject.isNetworked(): this is Networked & this", + 3: "(method) FileSystemObject.isNetworked(): this is (Networked & this)", 4: "(method) FileSystemObject.isFile(): this is Item", - 5: "(method) FileSystemObject.isNetworked(): this is Networked & Item", + 5: "(method) FileSystemObject.isNetworked(): this is (Networked & this)", 6: "(method) FileSystemObject.isDirectory(): this is Directory", - 7: "(method) FileSystemObject.isNetworked(): this is Networked & Directory", - 8: "(method) FileSystemObject.isNetworked(): this is Networked & FileSystemObject" + 7: "(method) FileSystemObject.isNetworked(): this is (Networked & this)", + 8: "(method) FileSystemObject.isNetworked(): this is (Networked & this)" }); diff --git a/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts b/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts index 8e49644120656..a31753176e64e 100644 --- a/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts +++ b/tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts @@ -34,9 +34,9 @@ verify.quickInfos({ 1: "(method) Crate.isSundries(): this is Crate", 2: "(method) Crate.isSupplies(): this is Crate", - 3: `(method) Crate.isPackedTight(): this is this & { + 3: `(method) Crate.isPackedTight(): this is (this & { extraContents: T; -}`, +})`, 4: `(method) Crate.isPackedTight(): this is Crate & { extraContents: any; }`,