diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cc8a7f7428fcf..1e958254cb4f9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6154,15 +6154,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const type = instantiateType(getWidenedType(getRegularTypeOfExpression(expr)), context.mapper); return typeToTypeNodeHelper(type, context); }, - serializeTypeOfDeclaration(syntacticContext, declaration, symbol) { + serializeTypeOfDeclaration(syntacticContext, declaration, symbol, widen) { // Get type of the symbol if this is the valid symbol otherwise get type at location const context = syntacticContext as NodeBuilderContext; symbol ??= getSymbolOfDeclaration(declaration); let type = context.enclosingSymbolTypes?.get(getSymbolId(symbol)); if (type === undefined) { - type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) - ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) - : errorType; + const symbolType = getTypeOfSymbol(symbol); + if (widen) { + type = instantiateType(getWidenedType(symbolType), context.mapper); + } + else { + type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) + ? instantiateType(getWidenedLiteralType(symbolType), context.mapper) + : errorType; + } } const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); if (addUndefinedForParameter) { diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index 7f54ab49406c5..4715da7fceea7 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -166,7 +166,6 @@ function syntacticResult(type: undefined, reportFallback: boolean): SyntacticRes function syntacticResult(type: TypeNode | undefined, reportFallback: boolean = true) { return { type, reportFallback } as SyntacticResult; } -const notImplemented: SyntacticResult = syntacticResult(/*type*/ undefined, /*reportFallback*/ false); const alreadyReported: SyntacticResult = syntacticResult(/*type*/ undefined, /*reportFallback*/ false); const failed: SyntacticResult = syntacticResult(/*type*/ undefined, /*reportFallback*/ true); @@ -834,6 +833,7 @@ export function createSyntacticTypeNodeBuilder( symbol: Symbol | undefined, context: SyntacticTypeNodeBuilderContext, reportFallback = true, + widen = false, ) { if (reportFallback) { context.tracker.reportInferenceFallback(node); @@ -841,7 +841,7 @@ export function createSyntacticTypeNodeBuilder( if (context.noInferenceFallback === true) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } - return resolver.serializeTypeOfDeclaration(context, node, symbol); + return resolver.serializeTypeOfDeclaration(context, node, symbol, widen); } function inferExpressionType(node: Expression, context: SyntacticTypeNodeBuilderContext, reportFallback = true, requiresAddingUndefined?: boolean) { @@ -1000,9 +1000,6 @@ export function createSyntacticTypeNodeBuilder( } return syntacticResult(inferExpressionType(arrayLiteral, context, /*reportFallback*/ false, requiresAddingUndefined)); } - // Disable any inference fallback since we won't actually use the resulting type and we don't want to generate errors - const oldNoInferenceFallback = context.noInferenceFallback; - context.noInferenceFallback = true; const elementTypesInfo: TypeNode[] = []; for (const element of arrayLiteral.elements) { Debug.assert(element.kind !== SyntaxKind.SpreadElement); @@ -1019,8 +1016,7 @@ export function createSyntacticTypeNodeBuilder( } const tupleType = factory.createTupleTypeNode(elementTypesInfo); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; - context.noInferenceFallback = oldNoInferenceFallback; - return notImplemented; + return syntacticResult(addUndefinedIfNeeded(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), requiresAddingUndefined, arrayLiteral, context)); } function canGetTypeFromObjectLiteral(objectLiteral: ObjectLiteralExpression, context: SyntacticTypeNodeBuilderContext) { let result = true; @@ -1058,9 +1054,6 @@ export function createSyntacticTypeNodeBuilder( } return syntacticResult(inferExpressionType(objectLiteral, context, /*reportFallback*/ false, requiresAddingUndefined)); } - // Disable any inference fallback since we won't actually use the resulting type and we don't want to generate errors - const oldNoInferenceFallback = context.noInferenceFallback; - context.noInferenceFallback = true; const properties: TypeElement[] = []; const oldFlags = context.flags; context.flags |= NodeBuilderFlags.InObjectTypeLiteral; @@ -1092,8 +1085,7 @@ export function createSyntacticTypeNodeBuilder( if (!(context.flags & NodeBuilderFlags.MultilineObjectLiterals)) { setEmitFlags(typeNode, EmitFlags.SingleLine); } - context.noInferenceFallback = oldNoInferenceFallback; - return notImplemented; + return syntacticResult(addUndefinedIfNeeded(typeNode, requiresAddingUndefined, objectLiteral, context)); } function typeFromObjectLiteralPropertyAssignment(prop: PropertyAssignment, name: PropertyName, context: SyntacticTypeNodeBuilderContext, isConstContext: boolean) { @@ -1101,7 +1093,7 @@ export function createSyntacticTypeNodeBuilder( [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; const expressionResult = typeFromExpression(prop.initializer, context, isConstContext); - const typeNode = expressionResult.type !== undefined ? expressionResult.type : inferTypeOfDeclaration(prop, /*symbol*/ undefined, context, expressionResult.reportFallback); + const typeNode = expressionResult.type !== undefined ? expressionResult.type : inferTypeOfDeclaration(prop, /*symbol*/ undefined, context, expressionResult.reportFallback, !isConstContext); return factory.createPropertySignature( modifiers, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9b4915f1cc293..678199a135c45 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -10556,7 +10556,7 @@ export interface SyntacticTypeNodeBuilderResolver { serializeExistingTypeNode(context: SyntacticTypeNodeBuilderContext, node: TypeNode, addUndefined?: boolean): TypeNode | undefined; serializeReturnTypeForSignature(context: SyntacticTypeNodeBuilderContext, signatureDeclaration: SignatureDeclaration | JSDocSignature): TypeNode | undefined; serializeTypeOfExpression(context: SyntacticTypeNodeBuilderContext, expr: Expression): TypeNode; - serializeTypeOfDeclaration(context: SyntacticTypeNodeBuilderContext, node: HasInferredType | GetAccessorDeclaration | SetAccessorDeclaration, symbol: Symbol | undefined): TypeNode | undefined; + serializeTypeOfDeclaration(context: SyntacticTypeNodeBuilderContext, node: HasInferredType | GetAccessorDeclaration | SetAccessorDeclaration, symbol: Symbol | undefined, widen?: boolean): TypeNode | undefined; serializeNameOfParameter(context: SyntacticTypeNodeBuilderContext, parameter: ParameterDeclaration): BindingName | string; serializeTypeName(context: SyntacticTypeNodeBuilderContext, node: EntityName, isTypeOf?: boolean, typeArguments?: readonly TypeNode[]): TypeNode | undefined; serializeEntityName(context: SyntacticTypeNodeBuilderContext, node: EntityNameExpression): Expression | undefined; diff --git a/tests/baselines/reference/ES5For-of10.types b/tests/baselines/reference/ES5For-of10.types index 01bbdea4126dd..713dbeb70ecda 100644 --- a/tests/baselines/reference/ES5For-of10.types +++ b/tests/baselines/reference/ES5For-of10.types @@ -3,7 +3,7 @@ === ES5For-of10.ts === function foo() { >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { x: 0 }; >{ x: 0 } : { x: number; } @@ -19,7 +19,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >[] : undefined[] @@ -31,7 +31,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >[] : undefined[] @@ -45,7 +45,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ } diff --git a/tests/baselines/reference/ES5For-of34.types b/tests/baselines/reference/ES5For-of34.types index b9fb5c316a5b2..dcf91e3240e88 100644 --- a/tests/baselines/reference/ES5For-of34.types +++ b/tests/baselines/reference/ES5For-of34.types @@ -3,7 +3,7 @@ === ES5For-of34.ts === function foo() { >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { x: 0 }; >{ x: 0 } : { x: number; } @@ -19,7 +19,7 @@ for (foo().x of ['a', 'b', 'c']) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >['a', 'b', 'c'] : string[] @@ -39,7 +39,7 @@ for (foo().x of ['a', 'b', 'c']) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ } diff --git a/tests/baselines/reference/ES5For-of8.types b/tests/baselines/reference/ES5For-of8.types index 07818487e657d..a20c0766e7d9d 100644 --- a/tests/baselines/reference/ES5For-of8.types +++ b/tests/baselines/reference/ES5For-of8.types @@ -3,7 +3,7 @@ === ES5For-of8.ts === function foo() { >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { x: 0 }; >{ x: 0 } : { x: number; } @@ -19,7 +19,7 @@ for (foo().x of ['a', 'b', 'c']) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >['a', 'b', 'c'] : string[] @@ -39,7 +39,7 @@ for (foo().x of ['a', 'b', 'c']) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ } diff --git a/tests/baselines/reference/ES5For-of9.types b/tests/baselines/reference/ES5For-of9.types index 699d2a7d41363..64e9e9f077d10 100644 --- a/tests/baselines/reference/ES5For-of9.types +++ b/tests/baselines/reference/ES5For-of9.types @@ -3,7 +3,7 @@ === ES5For-of9.ts === function foo() { >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { x: 0 }; >{ x: 0 } : { x: number; } @@ -19,7 +19,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >[] : undefined[] @@ -31,7 +31,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ >[] : undefined[] @@ -45,7 +45,7 @@ for (foo().x of []) { >foo() : { x: number; } > : ^^^^^^^^^^^^^^ >foo : () => { x: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.types b/tests/baselines/reference/ES5For-ofTypeCheck10.types index 5cb80fe9f9782..ad7700fb2f1ab 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.types @@ -8,7 +8,7 @@ class MyStringIterator { next() { >next : () => { done: boolean; value: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^ return { >{ done: true, value: "" } : { done: boolean; value: string; } diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types index 4e7b739d3199a..e6a8bb16ac613 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types @@ -7,7 +7,7 @@ module A { export function Point() { >Point : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 0, y: 0 }; >{ x: 0, y: 0 } : { x: number; y: number; } @@ -61,11 +61,11 @@ var fn = A.Point; >fn : () => { x: number; y: number; } > : ^^^^^^ >A.Point : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >A : typeof A > : ^^^^^^^^ >Point : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ var cl: { x: number; y: number; } >cl : { x: number; y: number; } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types index 1fb48486d72bf..46e6562d8b297 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types @@ -29,7 +29,7 @@ module A { fromCarthesian(p: A.Point) { >fromCarthesian : (p: A.Point) => { x: number; y: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >p : A.Point > : ^^^^^^^ >A : any diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types index df868ced09330..211e47909e034 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types @@ -21,7 +21,7 @@ module A { export function mirror(p: T) { >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >p : T > : ^ @@ -123,7 +123,7 @@ var o = A.Utils.mirror(o); >A.Utils.mirror(o) : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >A.Utils.mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >A.Utils : typeof A.Utils > : ^^^^^^^^^^^^^^ >A : typeof A @@ -131,7 +131,7 @@ var o = A.Utils.mirror(o); >Utils : typeof A.Utils > : ^^^^^^^^^^^^^^ >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >o : { x: number; y: number; } > : ^^^^^ ^^^^^ ^^^ diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types index cf8deaad9704a..3939d74ce0671 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types @@ -21,7 +21,7 @@ export module A { export function mirror(p: T) { >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >p : T > : ^ diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types index 1e0e29ec3dd25..254ba783b7606 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types @@ -25,7 +25,7 @@ module Root { export function mirror(p: T) { >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >p : T > : ^ diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types index 2e2e43b4cc31d..48fe0f626cf48 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types @@ -21,7 +21,7 @@ module A { export function mirror(p: T) { >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >p : T > : ^ @@ -117,7 +117,7 @@ var o = A.Utils.mirror(o); >A.Utils.mirror(o) : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >A.Utils.mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >A.Utils : typeof A.Utils > : ^^^^^^^^^^^^^^ >A : typeof A @@ -125,7 +125,7 @@ var o = A.Utils.mirror(o); >Utils : typeof A.Utils > : ^^^^^^^^^^^^^^ >mirror : (p: T) => { x: number; y: number; } -> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >o : { x: number; y: number; } > : ^^^^^ ^^^^^ ^^^ diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types index be6df31991ee4..e3f49a21d15ee 100644 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types @@ -3,9 +3,9 @@ === /a.js === const a = () => { >a : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ >() => { return { arguments: [], };} : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ return { >{ arguments: [], } : { arguments: undefined[]; } diff --git a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types index 2889021bc755c..03e5044e63a8a 100644 --- a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types +++ b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types @@ -7,7 +7,7 @@ class A { public static createSelectableViewModel(initialState?: any, selectedValue?: any) { >createSelectableViewModel : (initialState?: any, selectedValue?: any) => { selectedValue: number; } -> : ^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^ ^^ ^^^ ^^^^^^^ ^^^^^^^^^^^ >initialState : any >selectedValue : any diff --git a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types index e7999a9ef5b9c..1b7a89b08b4eb 100644 --- a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types +++ b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types @@ -11,9 +11,9 @@ declare var a: any; const test = () => ({ >test : () => { prop: boolean; run: () => "special" | "default"; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "special" | "default"; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "special" | "default"; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "special" | "default"; } diff --git a/tests/baselines/reference/arrowFunctionParsingGenericInObject.types b/tests/baselines/reference/arrowFunctionParsingGenericInObject.types index 2d55ef97a0337..774ca01a1ac71 100644 --- a/tests/baselines/reference/arrowFunctionParsingGenericInObject.types +++ b/tests/baselines/reference/arrowFunctionParsingGenericInObject.types @@ -3,9 +3,9 @@ === arrowFunctionParsingGenericInObject.ts === const fn1 = () => ({ >fn1 : () => { test: (value: T) => T; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >() => ({ test: (value: T): T => value, extraValue: () => {},}) : () => { test: (value: T) => T; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >({ test: (value: T): T => value, extraValue: () => {},}) : { test: (value: T) => T; extraValue: () => void; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: (value: T): T => value, extraValue: () => {},} : { test: (value: T) => T; extraValue: () => void; } @@ -31,9 +31,9 @@ const fn1 = () => ({ const fn1async = () => ({ >fn1async : () => { test: (value: T) => Promise; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >() => ({ test: async (value: T): Promise => value, extraValue: () => {},}) : () => { test: (value: T) => Promise; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >({ test: async (value: T): Promise => value, extraValue: () => {},}) : { test: (value: T) => Promise; extraValue: () => void; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: async (value: T): Promise => value, extraValue: () => {},} : { test: (value: T) => Promise; extraValue: () => void; } @@ -59,9 +59,9 @@ const fn1async = () => ({ const fn2 = () => ({ >fn2 : () => { test: (value: T) => T; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >() => ({ test: (value: T): T => value, extraValue: () => {},}) : () => { test: (value: T) => T; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >({ test: (value: T): T => value, extraValue: () => {},}) : { test: (value: T) => T; extraValue: () => void; } > : ^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: (value: T): T => value, extraValue: () => {},} : { test: (value: T) => T; extraValue: () => void; } @@ -87,9 +87,9 @@ const fn2 = () => ({ const fn2async = () => ({ >fn2async : () => { test: (value: T) => Promise; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >() => ({ test: async (value: T): Promise => value, extraValue: () => {},}) : () => { test: (value: T) => Promise; extraValue: () => void; } -> : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^ >({ test: async (value: T): Promise => value, extraValue: () => {},}) : { test: (value: T) => Promise; extraValue: () => void; } > : ^^^^^^^^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ test: async (value: T): Promise => value, extraValue: () => {},} : { test: (value: T) => Promise; extraValue: () => void; } @@ -115,9 +115,9 @@ const fn2async = () => ({ const fn3 = () => ({ >fn3 : () => { extraValue: () => void; test: (value: T) => T; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >() => ({ extraValue: () => {}, test: (value: T): T => value,}) : () => { extraValue: () => void; test: (value: T) => T; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >({ extraValue: () => {}, test: (value: T): T => value,}) : { extraValue: () => void; test: (value: T) => T; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ >{ extraValue: () => {}, test: (value: T): T => value,} : { extraValue: () => void; test: (value: T) => T; } @@ -143,9 +143,9 @@ const fn3 = () => ({ const fn3async = () => ({ >fn3async : () => { extraValue: () => void; test: (value: T) => Promise; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >() => ({ extraValue: () => {}, test: async (value: T): Promise => value,}) : () => { extraValue: () => void; test: (value: T) => Promise; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >({ extraValue: () => {}, test: async (value: T): Promise => value,}) : { extraValue: () => void; test: (value: T) => Promise; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ >{ extraValue: () => {}, test: async (value: T): Promise => value,} : { extraValue: () => void; test: (value: T) => Promise; } @@ -171,9 +171,9 @@ const fn3async = () => ({ const fn4 = () => ({ >fn4 : () => { extraValue: string; test: (value: T) => T; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >() => ({ extraValue: '', test: (value: T): T => value,}) : () => { extraValue: string; test: (value: T) => T; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >({ extraValue: '', test: (value: T): T => value,}) : { extraValue: string; test: (value: T) => T; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ >{ extraValue: '', test: (value: T): T => value,} : { extraValue: string; test: (value: T) => T; } @@ -199,9 +199,9 @@ const fn4 = () => ({ const fn4async = () => ({ >fn4async : () => { extraValue: string; test: (value: T) => Promise; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >() => ({ extraValue: '', test: async (value: T): Promise => value,}) : () => { extraValue: string; test: (value: T) => Promise; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^ >({ extraValue: '', test: async (value: T): Promise => value,}) : { extraValue: string; test: (value: T) => Promise; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^ >{ extraValue: '', test: async (value: T): Promise => value,} : { extraValue: string; test: (value: T) => Promise; } diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types index ace90b85e8b6a..20222636d57e8 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types @@ -41,9 +41,9 @@ var b = () => ({ name: "foo", message: "bar" }); var c = () => ({ name: "foo", message: "bar" }); >c : () => { name: string; message: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >({ name: "foo", message: "bar" }) : { name: string; message: string; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ name: "foo", message: "bar" } : { name: string; message: string; } diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types index da0e8c633dfea..025575248e208 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types @@ -41,9 +41,9 @@ var b = () => ({ name: "foo", message: "bar" }); var c = () => ({ name: "foo", message: "bar" }); >c : () => { name: string; message: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >({ name: "foo", message: "bar" }) : { name: string; message: string; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ name: "foo", message: "bar" } : { name: string; message: string; } diff --git a/tests/baselines/reference/assignToExistingClass.types b/tests/baselines/reference/assignToExistingClass.types index ac535ab655391..a658a0c0f048c 100644 --- a/tests/baselines/reference/assignToExistingClass.types +++ b/tests/baselines/reference/assignToExistingClass.types @@ -24,15 +24,15 @@ module Test { Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression. >Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression. return { myProp: "test" }; } : typeof Mocked | (() => { myProp: string; }) -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >Mocked : any > : ^^^ >Mocked || function () { // => Error: Invalid left-hand side of assignment expression. return { myProp: "test" }; } : typeof Mocked | (() => { myProp: string; }) -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >Mocked : typeof Mocked > : ^^^^^^^^^^^^^ >function () { // => Error: Invalid left-hand side of assignment expression. return { myProp: "test" }; } : () => { myProp: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { myProp: "test" }; >{ myProp: "test" } : { myProp: string; } diff --git a/tests/baselines/reference/assignmentCompatBug3.types b/tests/baselines/reference/assignmentCompatBug3.types index e37a02c7de116..190cbae1bf3ab 100644 --- a/tests/baselines/reference/assignmentCompatBug3.types +++ b/tests/baselines/reference/assignmentCompatBug3.types @@ -3,7 +3,7 @@ === assignmentCompatBug3.ts === function makePoint(x: number, y: number) { >makePoint : (x: number, y: number) => { readonly x: number; readonly y: number; dist: () => number; } -> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >x : number > : ^^^^^^ >y : number diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types index 54cd3d16dd0e9..b3a3c9410730b 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types +++ b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types @@ -21,7 +21,7 @@ class MyIterator extends Iterator { next() { return { done: true, value: undefined }; } >next : () => { done: boolean; value: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^ >{ done: true, value: undefined } : { done: boolean; value: undefined; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >done : boolean diff --git a/tests/baselines/reference/builtinIterator.types b/tests/baselines/reference/builtinIterator.types index 75d934cddae8c..c89ed9b1375d1 100644 --- a/tests/baselines/reference/builtinIterator.types +++ b/tests/baselines/reference/builtinIterator.types @@ -224,7 +224,7 @@ class GoodIterator extends Iterator { next() { >next : () => { readonly done: false; readonly value: 0; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^ ^^ ^^^ return { done: false, value: 0 } as const; >{ done: false, value: 0 } as const : { readonly done: false; readonly value: 0; } @@ -320,7 +320,7 @@ class BadIterator2 extends Iterator { next() { >next : () => { done: boolean; value: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^ return { done: false, value: 0 }; >{ done: false, value: 0 } : { done: boolean; value: number; } diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types index 724f995738871..ca815444d685a 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types @@ -165,7 +165,7 @@ var r7 = foo7(1); // object types function foo8(x: number) { >foo8 : (x: number) => { x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ @@ -183,7 +183,7 @@ var r8 = foo8(1); >foo8(1) : { x: number; } > : ^^^^^^^^^^^^^^ >foo8 : (x: number) => { x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/callWithMissingVoid.types b/tests/baselines/reference/callWithMissingVoid.types index a506760c192a2..3b4f251c97f67 100644 --- a/tests/baselines/reference/callWithMissingVoid.types +++ b/tests/baselines/reference/callWithMissingVoid.types @@ -8,7 +8,7 @@ class X { f(t: T) { >f : (t: T) => { a: T; } -> : ^ ^^ ^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^ >t : T > : ^ @@ -30,11 +30,11 @@ x.f() // no error because f expects void >x.f() : { a: void; } > : ^^^^^^^^^^^^ >x.f : (t: void) => { a: void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^ >x : X > : ^^^^^^^ >f : (t: void) => { a: void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^ declare const xUnion: X; >xUnion : X @@ -44,11 +44,11 @@ xUnion.f(42) // no error because f accepts number >xUnion.f(42) : { a: number | void; } > : ^^^^^^^^^^^^^^^^^^^^^ >xUnion.f : (t: number | void) => { a: number | void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ >xUnion : X > : ^^^^^^^^^^^^^^^^ >f : (t: number | void) => { a: number | void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ >42 : 42 > : ^^ @@ -56,11 +56,11 @@ xUnion.f() // no error because f accepts void >xUnion.f() : { a: number | void; } > : ^^^^^^^^^^^^^^^^^^^^^ >xUnion.f : (t: number | void) => { a: number | void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ >xUnion : X > : ^^^^^^^^^^^^^^^^ >f : (t: number | void) => { a: number | void; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ declare const xAny: X; >xAny : X @@ -70,11 +70,11 @@ xAny.f() // error, any still expects an argument >xAny.f() : { a: any; } > : ^^^^^^^^^^^ >xAny.f : (t: any) => { a: any; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^ ^^^^^^^^ >xAny : X > : ^^^^^^ >f : (t: any) => { a: any; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^ ^^^^^^^^ declare const xUnknown: X; >xUnknown : X @@ -84,11 +84,11 @@ xUnknown.f() // error, unknown still expects an argument >xUnknown.f() : { a: unknown; } > : ^^^^^^^^^^^^^^^ >xUnknown.f : (t: unknown) => { a: unknown; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >xUnknown : X > : ^^^^^^^^^^ >f : (t: unknown) => { a: unknown; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ declare const xNever: X; >xNever : X @@ -98,11 +98,11 @@ xNever.f() // error, never still expects an argument >xNever.f() : { a: never; } > : ^^^^^^^^^^^^^ >xNever.f : (t: never) => { a: never; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^ >xNever : X > : ^^^^^^^^ >f : (t: never) => { a: never; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^ // Promise has previously been updated to work without arguments, but to show this fixes the issue too. diff --git a/tests/baselines/reference/capturedParametersInInitializers1.types b/tests/baselines/reference/capturedParametersInInitializers1.types index ff287cc2aad01..662d7f521d370 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.types +++ b/tests/baselines/reference/capturedParametersInInitializers1.types @@ -55,7 +55,7 @@ let a; function foo3(y = { x: a }, z = 1) { >foo3 : (y?: { x: typeof z; }, z?: number) => void -> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^ >y : { x: typeof z; } > : ^^^^^ ^^^ >{ x: a } : { x: typeof z; } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types index ae33cf89b661f..bbf3385b97655 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types @@ -7,7 +7,7 @@ class a { method1() { >method1 : () => { doStuff: (callback: any) => () => any; } -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ return { >{ doStuff: (callback) => () => { var _this = 2; return callback(this); } } : { doStuff: (callback: any) => () => any; } @@ -38,7 +38,7 @@ class a { } method2() { >method2 : () => { doStuff: (callback: any) => () => any; } -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ var _this = 2; >_this : number diff --git a/tests/baselines/reference/computedPropertiesNarrowed.types b/tests/baselines/reference/computedPropertiesNarrowed.types index 81a74a3aca456..443cb5e82a330 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.types +++ b/tests/baselines/reference/computedPropertiesNarrowed.types @@ -234,7 +234,7 @@ export const o8 = { function ns() { return { v: 0 } as const } >ns : () => { readonly v: 0; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^ ^^^ >{ v: 0 } as const : { readonly v: 0; } > : ^^^^^^^^^^^^^^^^^^ >{ v: 0 } : { readonly v: 0; } @@ -258,7 +258,7 @@ export const o9 = { >ns() : { readonly v: 0; } > : ^^^^^^^^^^^^^^^^^^ >ns : () => { readonly v: 0; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^ ^^^ >v : 0 > : ^ >1 : 1 diff --git a/tests/baselines/reference/crashInYieldStarInAsyncFunction.types b/tests/baselines/reference/crashInYieldStarInAsyncFunction.types index 51a39f47b2605..0ebd9ed24313a 100644 --- a/tests/baselines/reference/crashInYieldStarInAsyncFunction.types +++ b/tests/baselines/reference/crashInYieldStarInAsyncFunction.types @@ -4,13 +4,13 @@ // https://github.com/microsoft/TypeScript/issues/53145 var obj = { >obj : { [Symbol.asyncIterator](): { next(): { then(): void; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^ >{ [Symbol.asyncIterator]() { return { next() { return { then() { } }; } }; }} : { [Symbol.asyncIterator](): { next(): { then(): void; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^ [Symbol.asyncIterator]() { >[Symbol.asyncIterator] : () => { next(): { then(): void; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^ >Symbol.asyncIterator : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -20,11 +20,11 @@ var obj = { return { >{ next() { return { then() { } }; } } : { next(): { then(): void; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^ next() { >next : () => { then(): void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { then() { } }; >{ then() { } } : { then(): void; } @@ -44,5 +44,5 @@ async function* g() { >yield* obj : any > : ^^^ >obj : { [Symbol.asyncIterator](): { next(): { then(): void; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^ } diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.types b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types index 5419544595676..86472c00739d3 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.types +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types @@ -3,7 +3,7 @@ === declFileObjectLiteralWithAccessors.ts === function /*1*/makePoint(x: number) { >makePoint : (x: number) => { b: number; x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^ ^^^ >x : number > : ^^^^^^ @@ -46,7 +46,7 @@ var /*4*/point = makePoint(2); >makePoint(2) : { b: number; x: number; } > : ^^^^^^^^^^^^^^^^ ^^^ >makePoint : (x: number) => { b: number; x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^ ^^^ >2 : 2 > : ^ diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types index 7eacb512da966..c0e3adac135e9 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -3,7 +3,7 @@ === declFileObjectLiteralWithOnlyGetter.ts === function /*1*/makePoint(x: number) { >makePoint : (x: number) => { readonly x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ @@ -25,7 +25,7 @@ var /*4*/point = makePoint(2); >makePoint(2) : { readonly x: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^ >makePoint : (x: number) => { readonly x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >2 : 2 > : ^ diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types index f61fd90251cb2..c6da5ea5bf225 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types @@ -3,7 +3,7 @@ === declFileObjectLiteralWithOnlySetter.ts === function /*1*/makePoint(x: number) { >makePoint : (x: number) => { b: number; x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^ ^^^ >x : number > : ^^^^^^ @@ -40,7 +40,7 @@ var /*3*/point = makePoint(2); >makePoint(2) : { b: number; x: number; } > : ^^^^^^^^^^^^^^^^ ^^^ >makePoint : (x: number) => { b: number; x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^ ^^^ >2 : 2 > : ^ diff --git a/tests/baselines/reference/declInput.types b/tests/baselines/reference/declInput.types index 6171c0c1e6ab6..ed31f829dd42f 100644 --- a/tests/baselines/reference/declInput.types +++ b/tests/baselines/reference/declInput.types @@ -17,7 +17,7 @@ class bar { public g() { return {a: null, b: undefined, c: void 4 }; } >g : () => { a: bar; b: any; c: any; } -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^ >{a: null, b: undefined, c: void 4 } : { a: bar; b: undefined; c: undefined; } > : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : bar diff --git a/tests/baselines/reference/declInput3.types b/tests/baselines/reference/declInput3.types index aa315e1301899..2e24187db0606 100644 --- a/tests/baselines/reference/declInput3.types +++ b/tests/baselines/reference/declInput3.types @@ -17,7 +17,7 @@ class bar { public g() { return {a: null, b: undefined, c: void 4 }; } >g : () => { a: bar; b: any; c: any; } -> : ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^ >{a: null, b: undefined, c: void 4 } : { a: bar; b: undefined; c: undefined; } > : ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : bar diff --git a/tests/baselines/reference/declarationEmitNonExportedBindingPattern.types b/tests/baselines/reference/declarationEmitNonExportedBindingPattern.types index 853079971577b..ab07504e894ce 100644 --- a/tests/baselines/reference/declarationEmitNonExportedBindingPattern.types +++ b/tests/baselines/reference/declarationEmitNonExportedBindingPattern.types @@ -3,7 +3,7 @@ === test.ts === function getFoo() { >getFoo : () => { foo: { test: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^ return { foo: { test: 42 } } >{ foo: { test: 42 } } : { foo: { test: number; }; } @@ -24,7 +24,7 @@ const { foo } = getFoo() >getFoo() : { foo: { test: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >getFoo : () => { foo: { test: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^ export type AliasType = typeof foo >AliasType : { test: number; } @@ -40,7 +40,7 @@ const { foo: renamed } = getFoo() >getFoo() : { foo: { test: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >getFoo : () => { foo: { test: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^ export type AliasType2 = typeof renamed >AliasType2 : { test: number; } @@ -50,7 +50,7 @@ export type AliasType2 = typeof renamed function getNested() { >getNested : () => { a: { b: { c: string; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^ ^^^^ ^^^^^^^^^^^^^^^^^ return { a: { b: { c: 'd' } } } >{ a: { b: { c: 'd' } } } : { a: { b: { c: string; }; }; } @@ -79,7 +79,7 @@ const { a: { b: { c } } } = getNested() >getNested() : { a: { b: { c: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >getNested : () => { a: { b: { c: string; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^ ^^^^ ^^^^^^^^^^^^^^^^^ export type AliasType3 = typeof c >AliasType3 : string diff --git a/tests/baselines/reference/declarationEmitObjectLiteralAccessors1.js b/tests/baselines/reference/declarationEmitObjectLiteralAccessors1.js index 0ce00d2f8f963..f17f39f3ff4f1 100644 --- a/tests/baselines/reference/declarationEmitObjectLiteralAccessors1.js +++ b/tests/baselines/reference/declarationEmitObjectLiteralAccessors1.js @@ -39,7 +39,9 @@ export const obj4 = { //// [declarationEmitObjectLiteralAccessors1.d.ts] export declare const obj1: { /** my awesome getter (first in source order) */ - x: string; + get x(): string; + /** my awesome setter (second in source order) */ + set x(a: string); }; export declare const obj2: { /** my awesome getter */ diff --git a/tests/baselines/reference/declarationEmitPropertyNumericStringKey.js b/tests/baselines/reference/declarationEmitPropertyNumericStringKey.js index 2c1a4c01da182..1dc55d9bf9b3c 100644 --- a/tests/baselines/reference/declarationEmitPropertyNumericStringKey.js +++ b/tests/baselines/reference/declarationEmitPropertyNumericStringKey.js @@ -28,7 +28,7 @@ var obj2 = (_c = {}, _c[hundredNum] = "bar", _c); //// [declarationEmitPropertyNumericStringKey.d.ts] declare const STATUS: { - readonly "404": "not found"; + readonly ["404"]: "not found"; }; declare const hundredStr = "100"; declare const obj: { diff --git a/tests/baselines/reference/declarationEmitRetainsJsdocyComments.types b/tests/baselines/reference/declarationEmitRetainsJsdocyComments.types index 7ba71d7030734..a5f7d886a17de 100644 --- a/tests/baselines/reference/declarationEmitRetainsJsdocyComments.types +++ b/tests/baselines/reference/declarationEmitRetainsJsdocyComments.types @@ -7,9 +7,9 @@ */ export const foo = (p: string) => { >foo : (p: string) => { bar: (s: number) => void; bar2(s: number): void; } -> : ^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^ ^^^^^^^^^^^ ^ ^^^^^^^^^^ >(p: string) => { return { /** * comment2 * @param s */ bar: (s: number) => {}, /** * comment3 * @param s */ bar2(s: number) {}, }} : (p: string) => { bar: (s: number) => void; bar2(s: number): void; } -> : ^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^ ^^^^^^^^^^^ ^ ^^^^^^^^^^ >p : string > : ^^^^^^ diff --git a/tests/baselines/reference/declarationFiles.types b/tests/baselines/reference/declarationFiles.types index 66f870a21cf12..a06f3140d3190 100644 --- a/tests/baselines/reference/declarationFiles.types +++ b/tests/baselines/reference/declarationFiles.types @@ -136,7 +136,7 @@ class C4 { f1() { >f1 : () => { a: this; } -> : ^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ return { a: this }; >{ a: this } : { a: this; } diff --git a/tests/baselines/reference/declarationMapsMultifile.js.map b/tests/baselines/reference/declarationMapsMultifile.js.map index 6c718bdae2ae4..5d3791edc4723 100644 --- a/tests/baselines/reference/declarationMapsMultifile.js.map +++ b/tests/baselines/reference/declarationMapsMultifile.js.map @@ -1,6 +1,6 @@ //// [a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd"} -//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBkb1RoaW5nKHg6IHsNCiAgICAgICAgYTogbnVtYmVyOw0KICAgIH0pOiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxQkFBYSxHQUFHO0lBQ1osT0FBTyxDQUFDLENBQUMsRUFBRTtRQUFDLENBQUMsRUFBRSxNQUFNLENBQUE7S0FBQzs7O0lBR3RCLE1BQU0sQ0FBQyxJQUFJO0NBR2QifQ==,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ== +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;QACV,CAAC;;IAEb,MAAM,CAAC,IAAI;CAGd"} +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBkb1RoaW5nKHg6IHsNCiAgICAgICAgYTogbnVtYmVyOw0KICAgIH0pOiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxQkFBYSxHQUFHO0lBQ1osT0FBTyxDQUFDLENBQUMsRUFBRTtRQUFDLENBQUMsRUFBRSxNQUFNLENBQUE7S0FBQztRQUNWLENBQUM7O0lBRWIsTUFBTSxDQUFDLElBQUk7Q0FHZCJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ== //// [index.d.ts.map] {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,eAAO,IAAI,CAAC;;CAAqB,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} diff --git a/tests/baselines/reference/declarationMapsMultifile.sourcemap.txt b/tests/baselines/reference/declarationMapsMultifile.sourcemap.txt index f13fe742ce2d3..1a3296d1e80ce 100644 --- a/tests/baselines/reference/declarationMapsMultifile.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsMultifile.sourcemap.txt @@ -62,20 +62,27 @@ sourceFile:a.ts 1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) --- >>> b: number; +1->^^^^^^^^ +2 > ^ +1->) { + > return { +2 > b +1->Emitted(5, 9) Source(3, 17) + SourceIndex(0) +2 >Emitted(5, 10) Source(3, 18) + SourceIndex(0) +--- >>> }; >>> static make(): Foo; -1->^^^^ +1 >^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^^^ -1->) { - > return {b: x.a}; +1 >: x.a}; > } > 2 > static 3 > 4 > make -1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) +1 >Emitted(7, 5) Source(5, 5) + SourceIndex(0) 2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) 3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) 4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) diff --git a/tests/baselines/reference/declarationMapsMultifile.types b/tests/baselines/reference/declarationMapsMultifile.types index a39bd25e00833..058ca9d3c77ec 100644 --- a/tests/baselines/reference/declarationMapsMultifile.types +++ b/tests/baselines/reference/declarationMapsMultifile.types @@ -7,7 +7,7 @@ export class Foo { doThing(x: {a: number}) { >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >x : { a: number; } > : ^^^^^ ^^^ >a : number @@ -53,11 +53,11 @@ c.doThing({a: 42}); >c.doThing({a: 42}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 42} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number @@ -71,11 +71,11 @@ export let x = c.doThing({a: 12}); >c.doThing({a: 12}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 12} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number diff --git a/tests/baselines/reference/declarationMapsOutFile.js.map b/tests/baselines/reference/declarationMapsOutFile.js.map index efa89ba138362..0676dbefc924c 100644 --- a/tests/baselines/reference/declarationMapsOutFile.js.map +++ b/tests/baselines/reference/declarationMapsOutFile.js.map @@ -1,3 +1,3 @@ //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQogICAgICAgICAgICBiOiBudW1iZXI7DQogICAgICAgIH07DQogICAgICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCiAgICB9DQp9DQpkZWNsYXJlIG1vZHVsZSAiaW5kZXgiIHsNCiAgICBpbXBvcnQgeyBGb28gfSBmcm9tICJhIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLFVBQVk7SUFFeEIsTUFBTSxDQUFDLEtBQVksQ0FBQztJQUdwQixNQUFNLENBQUMsSUFBSSxDQUFDOztLQUFxQixDQUFDO0lBQ2xDLE9BQU8sRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;YACV,CAAC;;QAEb,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQogICAgICAgICAgICBiOiBudW1iZXI7DQogICAgICAgIH07DQogICAgICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCiAgICB9DQp9DQpkZWNsYXJlIG1vZHVsZSAiaW5kZXgiIHsNCiAgICBpbXBvcnQgeyBGb28gfSBmcm9tICJhIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7WUFDVixDQUFDOztRQUViLE1BQU0sQ0FBQyxJQUFJO0tBR2Q7OztJQ1BELE9BQU8sRUFBQyxHQUFHLEVBQUMsVUFBWTtJQUV4QixNQUFNLENBQUMsS0FBWSxDQUFDO0lBR3BCLE1BQU0sQ0FBQyxJQUFJLENBQUM7O0tBQXFCLENBQUM7SUFDbEMsT0FBTyxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= diff --git a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt index 5e7d5c40b8880..b506521a95b4c 100644 --- a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt @@ -64,20 +64,27 @@ sourceFile:a.ts 1 >Emitted(5, 10) Source(2, 27) + SourceIndex(0) --- >>> b: number; +1->^^^^^^^^^^^^ +2 > ^ +1->) { + > return { +2 > b +1->Emitted(6, 13) Source(3, 17) + SourceIndex(0) +2 >Emitted(6, 14) Source(3, 18) + SourceIndex(0) +--- >>> }; >>> static make(): Foo; -1->^^^^^^^^ +1 >^^^^^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^^^ -1->) { - > return {b: x.a}; +1 >: x.a}; > } > 2 > static 3 > 4 > make -1->Emitted(8, 9) Source(5, 5) + SourceIndex(0) +1 >Emitted(8, 9) Source(5, 5) + SourceIndex(0) 2 >Emitted(8, 15) Source(5, 11) + SourceIndex(0) 3 >Emitted(8, 16) Source(5, 12) + SourceIndex(0) 4 >Emitted(8, 20) Source(5, 16) + SourceIndex(0) diff --git a/tests/baselines/reference/declarationMapsOutFile.types b/tests/baselines/reference/declarationMapsOutFile.types index b34dd93d14aa9..d69b29e24afb2 100644 --- a/tests/baselines/reference/declarationMapsOutFile.types +++ b/tests/baselines/reference/declarationMapsOutFile.types @@ -7,7 +7,7 @@ export class Foo { doThing(x: {a: number}) { >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >x : { a: number; } > : ^^^^^ ^^^ >a : number @@ -53,11 +53,11 @@ c.doThing({a: 42}); >c.doThing({a: 42}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 42} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number @@ -71,11 +71,11 @@ export let x = c.doThing({a: 12}); >c.doThing({a: 12}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 12} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number diff --git a/tests/baselines/reference/declarationMapsOutFile2.js.map b/tests/baselines/reference/declarationMapsOutFile2.js.map index 9fbc681df5c64..d1a57530de349 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.js.map +++ b/tests/baselines/reference/declarationMapsOutFile2.js.map @@ -1,3 +1,3 @@ //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;QACV,CAAC;;IAEb,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7UUFDVixDQUFDOztJQUViLE1BQU0sQ0FBQyxJQUFJO0NBR2Q7QUNQRCxRQUFBLE1BQU0sQ0FBQyxLQUFZLENBQUM7QUFHcEIsUUFBQSxJQUFJLENBQUM7O0NBQXFCLENBQUMifQ==,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== diff --git a/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt b/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt index ec4ae6a40e3ff..0ecd45ac7ebbf 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt @@ -59,20 +59,27 @@ sourceFile:a.ts 1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) --- >>> b: number; +1->^^^^^^^^ +2 > ^ +1->) { + > return { +2 > b +1->Emitted(5, 9) Source(3, 17) + SourceIndex(0) +2 >Emitted(5, 10) Source(3, 18) + SourceIndex(0) +--- >>> }; >>> static make(): Foo; -1->^^^^ +1 >^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^^^ -1->) { - > return {b: x.a}; +1 >: x.a}; > } > 2 > static 3 > 4 > make -1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) +1 >Emitted(7, 5) Source(5, 5) + SourceIndex(0) 2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) 3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) 4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) diff --git a/tests/baselines/reference/declarationMapsOutFile2.types b/tests/baselines/reference/declarationMapsOutFile2.types index 5f3a5e48afae5..fe6d6267b2547 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.types +++ b/tests/baselines/reference/declarationMapsOutFile2.types @@ -7,7 +7,7 @@ class Foo { doThing(x: {a: number}) { >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >x : { a: number; } > : ^^^^^ ^^^ >a : number @@ -49,11 +49,11 @@ c.doThing({a: 42}); >c.doThing({a: 42}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 42} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number @@ -67,11 +67,11 @@ let x = c.doThing({a: 12}); >c.doThing({a: 12}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 12} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.js.map b/tests/baselines/reference/declarationMapsWithSourceMap.js.map index c0ab927400229..34fb35f12969a 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.js.map +++ b/tests/baselines/reference/declarationMapsWithSourceMap.js.map @@ -3,5 +3,5 @@ //// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsNCiAgICBmdW5jdGlvbiBGb28oKSB7DQogICAgfQ0KICAgIEZvby5wcm90b3R5cGUuZG9UaGluZyA9IGZ1bmN0aW9uICh4KSB7DQogICAgICAgIHJldHVybiB7IGI6IHguYSB9Ow0KICAgIH07DQogICAgRm9vLm1ha2UgPSBmdW5jdGlvbiAoKSB7DQogICAgICAgIHJldHVybiBuZXcgRm9vKCk7DQogICAgfTsNCiAgICByZXR1cm4gRm9vOw0KfSgpKTsNCnZhciBjID0gbmV3IEZvbygpOw0KYy5kb1RoaW5nKHsgYTogNDIgfSk7DQp2YXIgeCA9IGMuZG9UaGluZyh7IGE6IDEyIH0pOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFPQSxDQUFDO0lBTkcscUJBQU8sR0FBUCxVQUFRLENBQWM7UUFDbEIsT0FBTyxFQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFDLENBQUM7SUFDcEIsQ0FBQztJQUNNLFFBQUksR0FBWDtRQUNJLE9BQU8sSUFBSSxHQUFHLEVBQUUsQ0FBQztJQUNyQixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFQRCxJQU9DO0FDUEQsSUFBTSxDQUFDLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQztBQUNwQixDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBQyxDQUFDLENBQUM7QUFFbkIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQyxDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;QACV,CAAC;;IAEb,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7UUFDVixDQUFDOztJQUViLE1BQU0sQ0FBQyxJQUFJO0NBR2Q7QUNQRCxRQUFBLE1BQU0sQ0FBQyxLQUFZLENBQUM7QUFHcEIsUUFBQSxJQUFJLENBQUM7O0NBQXFCLENBQUMifQ==,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt index ca0144e49ecd6..c4b2fc1f2c4c3 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt @@ -353,20 +353,27 @@ sourceFile:a.ts 1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) --- >>> b: number; +1->^^^^^^^^ +2 > ^ +1->) { + > return { +2 > b +1->Emitted(5, 9) Source(3, 17) + SourceIndex(0) +2 >Emitted(5, 10) Source(3, 18) + SourceIndex(0) +--- >>> }; >>> static make(): Foo; -1->^^^^ +1 >^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^^^ -1->) { - > return {b: x.a}; +1 >: x.a}; > } > 2 > static 3 > 4 > make -1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) +1 >Emitted(7, 5) Source(5, 5) + SourceIndex(0) 2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) 3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) 4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.types b/tests/baselines/reference/declarationMapsWithSourceMap.types index 84a472e3bba8c..2f2afd6e55540 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.types +++ b/tests/baselines/reference/declarationMapsWithSourceMap.types @@ -7,7 +7,7 @@ class Foo { doThing(x: {a: number}) { >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >x : { a: number; } > : ^^^^^ ^^^ >a : number @@ -49,11 +49,11 @@ c.doThing({a: 42}); >c.doThing({a: 42}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 42} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number @@ -67,11 +67,11 @@ let x = c.doThing({a: 12}); >c.doThing({a: 12}) : { b: number; } > : ^^^^^^^^^^^^^^ >c.doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >c : Foo > : ^^^ >doThing : (x: { a: number; }) => { b: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^^ >{a: 12} : { a: number; } > : ^^^^^^^^^^^^^^ >a : number diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js index d470e497131fa..0c3e97a402c73 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js @@ -155,7 +155,10 @@ export declare const testRecFun: (parent: T) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; - deeper: (child: U_10) => /*elided*/ any; + deeper: (child: U_10) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; + deeper: (child: U_11) => /*elided*/ any; + }; }; }; }; diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types index 183b707e18779..9a5090ba8b37c 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types @@ -187,10 +187,10 @@ export const updateIfChanged = (t: T) => { // example from https://github.com/microsoft/TypeScript/issues/31605 export const testRecFun = (parent: T) => { ->testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => any; }; }; }; }; }; }; }; }; }; }; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->(parent: T) => { return { result: parent, deeper: (child: U) => testRecFun({ ...parent, ...child }) };} : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => any; }; }; }; }; }; }; }; }; }; }; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; deeper: (child: U_11) => any; }; }; }; }; }; }; }; }; }; }; }; } +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(parent: T) => { return { result: parent, deeper: (child: U) => testRecFun({ ...parent, ...child }) };} : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; deeper: (child: U_11) => any; }; }; }; }; }; }; }; }; }; }; }; } +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >parent : T > : ^ @@ -215,8 +215,8 @@ export const testRecFun = (parent: T) => { testRecFun({ ...parent, ...child }) >testRecFun({ ...parent, ...child }) : { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; deeper: (child: U_11) => any; }; }; }; }; }; }; }; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => any; }; }; }; }; }; }; }; }; }; }; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; deeper: (child: U_11) => any; }; }; }; }; }; }; }; }; }; }; }; } +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ ...parent, ...child } : T & U > : ^^^^^ >parent : T @@ -233,8 +233,8 @@ let p1 = testRecFun({ one: '1' }) > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >testRecFun({ one: '1' }) : { result: { one: string; }; deeper: (child: U) => { result: { one: string; } & U; deeper: (child: U_1) => { result: { one: string; } & U & U_1; deeper: (child: U_2) => { result: { one: string; } & U & U_1 & U_2; deeper: (child: U_3) => { result: { one: string; } & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: { one: string; } & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => any; }; }; }; }; }; }; }; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => any; }; }; }; }; }; }; }; }; }; }; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>testRecFun : (parent: T) => { result: T; deeper: (child: U) => { result: T & U; deeper: (child: U_1) => { result: T & U & U_1; deeper: (child: U_2) => { result: T & U & U_1 & U_2; deeper: (child: U_3) => { result: T & U & U_1 & U_2 & U_3; deeper: (child: U_4) => { result: T & U & U_1 & U_2 & U_3 & U_4; deeper: (child: U_5) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; deeper: (child: U_6) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; deeper: (child: U_7) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; deeper: (child: U_8) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; deeper: (child: U_9) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; deeper: (child: U_10) => { result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9 & U_10; deeper: (child: U_11) => any; }; }; }; }; }; }; }; }; }; }; }; } +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ one: '1' } : { one: string; } > : ^^^^^^^^^^^^^^^^ >one : string diff --git a/tests/baselines/reference/deepElaborationsIntoArrowExpressions.types b/tests/baselines/reference/deepElaborationsIntoArrowExpressions.types index b196726905fc0..228fd36e5b157 100644 --- a/tests/baselines/reference/deepElaborationsIntoArrowExpressions.types +++ b/tests/baselines/reference/deepElaborationsIntoArrowExpressions.types @@ -35,7 +35,7 @@ function foo1(): () => Foo { return () => ({a: ''}); >() => ({a: ''}) : () => { a: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >({a: ''}) : { a: string; } > : ^^^^^^^^^^^^^^ >{a: ''} : { a: string; } diff --git a/tests/baselines/reference/deeplyNestedAssignabilityErrorsCombined.types b/tests/baselines/reference/deeplyNestedAssignabilityErrorsCombined.types index db490ffff358f..9cca22fcbf87f 100644 --- a/tests/baselines/reference/deeplyNestedAssignabilityErrorsCombined.types +++ b/tests/baselines/reference/deeplyNestedAssignabilityErrorsCombined.types @@ -3,31 +3,31 @@ === deeplyNestedAssignabilityErrorsCombined.ts === let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } }; >x : { a: { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } } : { a: { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } : { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >b : { c: { d: { e: { f(): { g: string; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ >{ c: { d: { e: { f() { return { g: "hello" }; } } } } } : { c: { d: { e: { f(): { g: string; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ >c : { d: { e: { f(): { g: string; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >{ d: { e: { f() { return { g: "hello" }; } } } } : { d: { e: { f(): { g: string; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >d : { e: { f(): { g: string; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >{ e: { f() { return { g: "hello" }; } } } : { e: { f(): { g: string; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >e : { f(): { g: string; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^^^^^^^^^^ >{ f() { return { g: "hello" }; } } : { f(): { g: string; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^^^^^^^^^^ >f : () => { g: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >{ g: "hello" } : { g: string; } > : ^^^^^^^^^^^^^^ >g : string @@ -37,31 +37,31 @@ let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } }; let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } }; >y : { a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } } : { a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a : { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } : { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ >b : { c: { d: { e: { f(): { g: number; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ >{ c: { d: { e: { f() { return { g: 12345 }; } } } } } : { c: { d: { e: { f(): { g: number; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ >c : { d: { e: { f(): { g: number; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >{ d: { e: { f() { return { g: 12345 }; } } } } : { d: { e: { f(): { g: number; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >d : { e: { f(): { g: number; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >{ e: { f() { return { g: 12345 }; } } } : { e: { f(): { g: number; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >e : { f(): { g: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^^^^^^^^^^ >{ f() { return { g: 12345 }; } } : { f(): { g: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^ ^^^^^^^^^^^^^^ >f : () => { g: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >{ g: 12345 } : { g: number; } > : ^^^^^^^^^^^^^^ >g : number @@ -71,11 +71,11 @@ let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } }; x = y; >x = y : { a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : { a: { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >y : { a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ class Ctor1 { >Ctor1 : Ctor1 diff --git a/tests/baselines/reference/destructuredDeclarationEmit.types b/tests/baselines/reference/destructuredDeclarationEmit.types index 5329e83ccc2e4..2d92a372cf127 100644 --- a/tests/baselines/reference/destructuredDeclarationEmit.types +++ b/tests/baselines/reference/destructuredDeclarationEmit.types @@ -146,9 +146,9 @@ export { one, bee, sec }; const getFoo = () => ({ >getFoo : () => { foo: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >() => ({ foo: 'foo'}) : () => { foo: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >({ foo: 'foo'}) : { foo: string; } > : ^^^^^^^^^^^^^^^^ >{ foo: 'foo'} : { foo: string; } @@ -170,7 +170,7 @@ const { foo: foo2 } = getFoo(); >getFoo() : { foo: string; } > : ^^^^^^^^^^^^^^^^ >getFoo : () => { foo: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ export { foo2 }; >foo2 : string diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types index bf29ab287a437..e44d551f166a9 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types @@ -126,7 +126,7 @@ function b1(z = [undefined, null]) { }; function b2(z = null, o = { x: 0, y: undefined }) { } >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >z : any > : ^^^ >o : { x: number; y: any; } @@ -258,7 +258,7 @@ b2("string", { x: 200, y: "string" }); >b2("string", { x: 200, y: "string" }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: "string" } : { x: number; y: string; } @@ -276,7 +276,7 @@ b2("string", { x: 200, y: true }); >b2("string", { x: 200, y: true }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: true } : { x: number; y: boolean; } diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types index b8dc9594ee088..a9beb9487b424 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types @@ -126,7 +126,7 @@ function b1(z = [undefined, null]) { }; function b2(z = null, o = { x: 0, y: undefined }) { } >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >z : any > : ^^^ >o : { x: number; y: any; } @@ -258,7 +258,7 @@ b2("string", { x: 200, y: "string" }); >b2("string", { x: 200, y: "string" }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: "string" } : { x: number; y: string; } @@ -276,7 +276,7 @@ b2("string", { x: 200, y: true }); >b2("string", { x: 200, y: true }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: true } : { x: number; y: boolean; } diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types index 8bc4d49e6cf95..184ee2d9a3a51 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types @@ -129,7 +129,7 @@ function b1(z = [undefined, null]) { }; function b2(z = null, o = { x: 0, y: undefined }) { } >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >z : any > : ^^^ >o : { x: number; y: any; } @@ -261,7 +261,7 @@ b2("string", { x: 200, y: "string" }); >b2("string", { x: 200, y: "string" }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: "string" } : { x: number; y: string; } @@ -279,7 +279,7 @@ b2("string", { x: 200, y: true }); >b2("string", { x: 200, y: true }) : void > : ^^^^ >b2 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: 200, y: true } : { x: number; y: boolean; } diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.types b/tests/baselines/reference/destructuringParameterDeclaration2.types index 8c69c1f57e028..ef91a24289664 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.types +++ b/tests/baselines/reference/destructuringParameterDeclaration2.types @@ -95,7 +95,7 @@ interface F1 { function b1(z = null, o = { x: 0, y: undefined }) { } >b1 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >z : any > : ^^^ >o : { x: number; y: any; } @@ -159,7 +159,7 @@ b1("string", { x: "string", y: true }); // Error >b1("string", { x: "string", y: true }) : void > : ^^^^ >b1 : (z?: any, o?: { x: number; y: any; }) => void -> : ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^ ^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >"string" : "string" > : ^^^^^^^^ >{ x: "string", y: true } : { x: string; y: boolean; } diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAccessInHeritageClause1.types b/tests/baselines/reference/emitClassDeclarationWithPropertyAccessInHeritageClause1.types index 93b5e84a40651..35b5f23fb2c57 100644 --- a/tests/baselines/reference/emitClassDeclarationWithPropertyAccessInHeritageClause1.types +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAccessInHeritageClause1.types @@ -7,7 +7,7 @@ class B {} function foo() { >foo : () => { B: typeof B; } -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^ return {B: B}; >{B: B} : { B: typeof B; } @@ -27,7 +27,7 @@ class C extends (foo()).B {} >foo() : { B: typeof B; } > : ^^^^^^^^^^^^^^^^ >foo : () => { B: typeof B; } -> : ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^ >B : typeof B > : ^^^^^^^^ diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types index 941124f060814..39e9959b29483 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types @@ -9,7 +9,7 @@ var globalCounter = 0; function foo() { >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ globalCounter += 1; >globalCounter += 1 : number @@ -35,7 +35,7 @@ foo()[0] **= foo()[0]; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] : number @@ -43,7 +43,7 @@ foo()[0] **= foo()[0]; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ @@ -57,7 +57,7 @@ var result_foo1 = foo()[0] **= foo()[0]; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] : number @@ -65,7 +65,7 @@ var result_foo1 = foo()[0] **= foo()[0]; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ @@ -77,7 +77,7 @@ foo()[0] **= foo()[0] **= 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] **= 2 : number @@ -87,7 +87,7 @@ foo()[0] **= foo()[0] **= 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >2 : 2 @@ -103,7 +103,7 @@ var result_foo2 = foo()[0] **= foo()[0] **= 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] **= 2 : number @@ -113,7 +113,7 @@ var result_foo2 = foo()[0] **= foo()[0] **= 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >2 : 2 @@ -127,7 +127,7 @@ foo()[0] **= foo()[0] ** 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] ** 2 : number @@ -137,7 +137,7 @@ foo()[0] **= foo()[0] ** 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >2 : 2 @@ -153,7 +153,7 @@ var result_foo3 = foo()[0] **= foo()[0] ** 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >foo()[0] ** 2 : number @@ -163,7 +163,7 @@ var result_foo3 = foo()[0] **= foo()[0] ** 2; >foo() : { 0: number; } > : ^^^^^^^^^^^^^^ >foo : () => { 0: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >0 : 0 > : ^ >2 : 2 diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types index 180c2f6c8db3b..8a2e4a27ca574 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types @@ -9,7 +9,7 @@ var globalCounter = 0; function foo() { >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ globalCounter += 1; >globalCounter += 1 : number @@ -35,7 +35,7 @@ foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 @@ -51,7 +51,7 @@ var result0 = foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 @@ -65,7 +65,7 @@ foo().prop **= foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >foo().prop **= 2 : number @@ -75,7 +75,7 @@ foo().prop **= foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 @@ -91,7 +91,7 @@ var result1 = foo().prop **= foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >foo().prop **= 2 : number @@ -101,7 +101,7 @@ var result1 = foo().prop **= foo().prop **= 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 @@ -115,7 +115,7 @@ foo().prop **= foo().prop ** 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >foo().prop ** 2 : number @@ -125,7 +125,7 @@ foo().prop **= foo().prop ** 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 @@ -141,7 +141,7 @@ var result2 = foo().prop **= foo().prop ** 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >foo().prop ** 2 : number @@ -151,7 +151,7 @@ var result2 = foo().prop **= foo().prop ** 2; >foo() : { prop: number; } > : ^^^^^^^^^^^^^^^^^ >foo : () => { prop: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >prop : number > : ^^^^^^ >2 : 2 diff --git a/tests/baselines/reference/emitMethodCalledNew.js b/tests/baselines/reference/emitMethodCalledNew.js index eec54a1904dd0..2612636931ae8 100644 --- a/tests/baselines/reference/emitMethodCalledNew.js +++ b/tests/baselines/reference/emitMethodCalledNew.js @@ -39,5 +39,5 @@ export declare const b: { "new"(x: number): number; }; export declare const c: { - "new"(x: number): number; + ["new"](x: number): number; }; diff --git a/tests/baselines/reference/enumKeysQuotedAsObjectPropertiesInDeclarationEmit.js b/tests/baselines/reference/enumKeysQuotedAsObjectPropertiesInDeclarationEmit.js index 60e41c76550b6..fcc80bef33ff6 100644 --- a/tests/baselines/reference/enumKeysQuotedAsObjectPropertiesInDeclarationEmit.js +++ b/tests/baselines/reference/enumKeysQuotedAsObjectPropertiesInDeclarationEmit.js @@ -52,7 +52,7 @@ export declare enum MouseButton { NO_BUTTON = 0 } export declare const DOMMouseButton: { - '-1': MouseButton; + "-1": MouseButton; "0": MouseButton; "1": MouseButton; "2": MouseButton; diff --git a/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.js b/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.js index 6ae365348a5f8..548ee01e1b071 100644 --- a/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.js +++ b/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.js @@ -68,7 +68,7 @@ var b5 = o5["_proto__"]; //// [escapedReservedCompilerNamedIdentifier.d.ts] declare var __proto__: number; declare var o: { - __proto__: number; + "__proto__": number; }; declare var b: number; declare var o1: { @@ -77,7 +77,7 @@ declare var o1: { declare var b1: number; declare var ___proto__: number; declare var o2: { - ___proto__: number; + "___proto__": number; }; declare var b2: number; declare var o3: { @@ -86,7 +86,7 @@ declare var o3: { declare var b3: number; declare var _proto__: number; declare var o4: { - _proto__: number; + "_proto__": number; }; declare var b4: number; declare var o5: { diff --git a/tests/baselines/reference/for-of17.types b/tests/baselines/reference/for-of17.types index 15c602a444c74..ed4e8f336e4ea 100644 --- a/tests/baselines/reference/for-of17.types +++ b/tests/baselines/reference/for-of17.types @@ -7,7 +7,7 @@ class NumberIterator { next() { >next : () => { value: number; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: 0, done: false } : { value: number; done: boolean; } diff --git a/tests/baselines/reference/for-of18.types b/tests/baselines/reference/for-of18.types index 0ac03cf3e9e2d..354e7074fdf15 100644 --- a/tests/baselines/reference/for-of18.types +++ b/tests/baselines/reference/for-of18.types @@ -7,7 +7,7 @@ class MyStringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/for-of19.types b/tests/baselines/reference/for-of19.types index e49e24422fb28..8287a90a54e91 100644 --- a/tests/baselines/reference/for-of19.types +++ b/tests/baselines/reference/for-of19.types @@ -11,7 +11,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/for-of20.types b/tests/baselines/reference/for-of20.types index e96095fb2f69e..9af129fdc12c3 100644 --- a/tests/baselines/reference/for-of20.types +++ b/tests/baselines/reference/for-of20.types @@ -11,7 +11,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/for-of21.types b/tests/baselines/reference/for-of21.types index 94f11fd25739f..57de13c8f6688 100644 --- a/tests/baselines/reference/for-of21.types +++ b/tests/baselines/reference/for-of21.types @@ -11,7 +11,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/for-of22.types b/tests/baselines/reference/for-of22.types index 9aff6ee639e73..931e02f8a1677 100644 --- a/tests/baselines/reference/for-of22.types +++ b/tests/baselines/reference/for-of22.types @@ -11,7 +11,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/for-of23.types b/tests/baselines/reference/for-of23.types index efa9db641d246..c0850847555d4 100644 --- a/tests/baselines/reference/for-of23.types +++ b/tests/baselines/reference/for-of23.types @@ -11,7 +11,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/for-of30.types b/tests/baselines/reference/for-of30.types index 3b05a65c38762..d6ca7d49d2013 100644 --- a/tests/baselines/reference/for-of30.types +++ b/tests/baselines/reference/for-of30.types @@ -7,7 +7,7 @@ class MyStringIterator { next() { >next : () => { done: boolean; value: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^ return { >{ done: false, value: "" } : { done: boolean; value: string; } diff --git a/tests/baselines/reference/for-of31.types b/tests/baselines/reference/for-of31.types index 79cf5a3748f86..10e53e5e3b522 100644 --- a/tests/baselines/reference/for-of31.types +++ b/tests/baselines/reference/for-of31.types @@ -7,7 +7,7 @@ class MyStringIterator { next() { >next : () => { value: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { >{ // no done property value: "" } : { value: string; } diff --git a/tests/baselines/reference/for-of35.types b/tests/baselines/reference/for-of35.types index 6f458f5fce0b9..6acb4abed4a4c 100644 --- a/tests/baselines/reference/for-of35.types +++ b/tests/baselines/reference/for-of35.types @@ -6,8 +6,8 @@ class MyStringIterator { > : ^^^^^^^^^^^^^^^^ next() { ->next : () => any -> : ^^^^^^^^^ +>next : () => { done: boolean; value: any; } +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^ return { >{ done: true, value: v } : { done: boolean; value: any; } diff --git a/tests/baselines/reference/functionImplementations.types b/tests/baselines/reference/functionImplementations.types index c07a8e17303ab..b3b911d56e8a2 100644 --- a/tests/baselines/reference/functionImplementations.types +++ b/tests/baselines/reference/functionImplementations.types @@ -372,7 +372,7 @@ function opt1(n = 4) { // Function signature with optional parameter, no type annotation and initializer has initializer's widened type function opt2(n = { x: null, y: undefined }) { >opt2 : (n?: { x: any; y: any; }) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^ >n : { x: any; y: any; } > : ^^^^^^^^^^^^^^^^^^^ >{ x: null, y: undefined } : { x: null; y: undefined; } diff --git a/tests/baselines/reference/functionLikeInParameterInitializer.types b/tests/baselines/reference/functionLikeInParameterInitializer.types index 582877c8fb871..86ac242fa9efa 100644 --- a/tests/baselines/reference/functionLikeInParameterInitializer.types +++ b/tests/baselines/reference/functionLikeInParameterInitializer.types @@ -21,7 +21,7 @@ export function bar(func = () => foo) { // error export function baz1(func = { f() { return foo } }) { >baz1 : (func?: { f(): string; }) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >func : { f(): string; } > : ^^^^^^^^^^^^^^^^ >{ f() { return foo } } : { f(): string; } diff --git a/tests/baselines/reference/genericFunctionsAndConditionalInference.types b/tests/baselines/reference/genericFunctionsAndConditionalInference.types index 057667bb7c6f6..9cf605ed57326 100644 --- a/tests/baselines/reference/genericFunctionsAndConditionalInference.types +++ b/tests/baselines/reference/genericFunctionsAndConditionalInference.types @@ -127,9 +127,9 @@ const right: Ops<"right"> = {} as any const ok = (at: Ops) => ({lr: at.lr(at.str, at.num)}) >ok : (at: Ops) => { lr: Result>; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(at: Ops) => ({lr: at.lr(at.str, at.num)}) : (at: Ops) => { lr: Result>; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >at : Ops > : ^^^^^^ >({lr: at.lr(at.str, at.num)}) : { lr: Result>; } @@ -177,7 +177,7 @@ const orphaned = (at: Ops) => at.dict(ok(at)) >ok(at) : { lr: Result>; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >ok : (at: Ops) => { lr: Result>; } -> : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >at : Ops > : ^^^^^^ @@ -187,7 +187,7 @@ const leftOk = ok(left) >ok(left) : { lr: string; } > : ^^^^^^^^^^^^^^^ >ok : (at: Ops) => { lr: Result>; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >left : Ops<"left"> > : ^^^^^^^^^^^ @@ -207,7 +207,7 @@ const rightOk = ok(right) >ok(right) : { lr: number; } > : ^^^^^^^^^^^^^^^ >ok : (at: Ops) => { lr: Result>; } -> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >right : Ops<"right"> > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/genericObjectLitReturnType.types b/tests/baselines/reference/genericObjectLitReturnType.types index 8babd1cec37ea..7ef9b39f5812d 100644 --- a/tests/baselines/reference/genericObjectLitReturnType.types +++ b/tests/baselines/reference/genericObjectLitReturnType.types @@ -7,7 +7,7 @@ class X { f(t: T) { return { a: t }; } >f : (t: T) => { a: T; } -> : ^ ^^ ^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^ >t : T > : ^ >{ a: t } : { a: T; } @@ -29,11 +29,11 @@ var t1 = x.f(5); >x.f(5) : { a: number; } > : ^^^^^^^^^^^^^^ >x.f : (t: number) => { a: number; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >x : X > : ^^^^^^^^^ >f : (t: number) => { a: number; } -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >5 : 5 > : ^ diff --git a/tests/baselines/reference/getsetReturnTypes.types b/tests/baselines/reference/getsetReturnTypes.types index 3ccc04464572d..a73ed02aebe3f 100644 --- a/tests/baselines/reference/getsetReturnTypes.types +++ b/tests/baselines/reference/getsetReturnTypes.types @@ -3,7 +3,7 @@ === getsetReturnTypes.ts === function makePoint(x: number) { >makePoint : (x: number) => { readonly x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >x : number > : ^^^^^^ @@ -26,7 +26,7 @@ var x = makePoint(2).x; >makePoint(2) : { readonly x: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^ >makePoint : (x: number) => { readonly x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >2 : 2 > : ^ >x : number @@ -40,7 +40,7 @@ var y: number = makePoint(2).x; >makePoint(2) : { readonly x: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^ >makePoint : (x: number) => { readonly x: number; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >2 : 2 > : ^ >x : number diff --git a/tests/baselines/reference/inferTypes1.types b/tests/baselines/reference/inferTypes1.types index 33d5e8d331d6d..cee1eb5e98dec 100644 --- a/tests/baselines/reference/inferTypes1.types +++ b/tests/baselines/reference/inferTypes1.types @@ -43,7 +43,7 @@ type T06 = Unpacked; // never function f1(s: string) { >f1 : (s: string) => { a: number; b: string; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >s : string > : ^^^^^^ @@ -116,7 +116,7 @@ type T14 = ReturnType; // { a: number, b: string } >T14 : { a: number; b: string; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >f1 : (s: string) => { a: number; b: string; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ type T15 = ReturnType; // any >T15 : any diff --git a/tests/baselines/reference/isolatedDeclarationErrorsArrays.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsArrays.errors.txt new file mode 100644 index 0000000000000..a6280584dc0cb --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsArrays.errors.txt @@ -0,0 +1,64 @@ +bad.ts(1,20): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +bad.ts(2,22): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +bad.ts(6,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +bad.ts(8,21): error TS9018: Arrays with spread elements can't inferred with --isolatedDeclarations. +bad.ts(11,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +bad.ts(15,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== ok.ts (0 errors) ==== + export let a1 = [1, "2"] as const + const x = 0; + export let a2 = [x as 0, "2"] as const + type N = 1; + export let a3 = [x as N, "2" as string] as const + export let a4 = [Math.random() as N, "2" as string] as const + export const a5 = [(s: N):void => {}, "2"] as const + + export const o = { + arr: [x as N,2,3] + } as const + + export const o2 = { + arr: () => [x as N,2,3] as const + }; + + +==== bad.ts (6 errors) ==== + export let aBad1 = [1, "2"]; + ~~~~~~~~ +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 bad.ts:1:12: Add a type annotation to the variable aBad1. + export const aBad2 = [1, "2"]; + ~~~~~~~~ +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 bad.ts:2:14: Add a type annotation to the variable aBad2. + const y = 0; + type S = "2"; + + export let aBad3 = [y, "2"] as const + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 bad.ts:6:12: Add a type annotation to the variable aBad3. +!!! related TS9035 bad.ts:6:21: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit. + export let a = [1,2,3] as const; + export let aBad4 = [...a] as const + ~~~~ +!!! error TS9018: Arrays with spread elements can't inferred with --isolatedDeclarations. +!!! related TS9027 bad.ts:8:12: Add a type annotation to the variable aBad4. + + export const oBad1 = { + arr: [y,2,3] + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 bad.ts:10:14: Add a type annotation to the variable oBad1. +!!! related TS9035 bad.ts:11:11: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit. + } as const + + export const oBad2 = { + arr: () => [y,2,3] + ~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 bad.ts:14:14: Add a type annotation to the variable oBad2. +!!! related TS9030 bad.ts:15:10: Add a return type to the function expression. + } as const \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsArrays.js b/tests/baselines/reference/isolatedDeclarationErrorsArrays.js new file mode 100644 index 0000000000000..523658467ca64 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsArrays.js @@ -0,0 +1,80 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsArrays.ts] //// + +//// [ok.ts] +export let a1 = [1, "2"] as const +const x = 0; +export let a2 = [x as 0, "2"] as const +type N = 1; +export let a3 = [x as N, "2" as string] as const +export let a4 = [Math.random() as N, "2" as string] as const +export const a5 = [(s: N):void => {}, "2"] as const + +export const o = { + arr: [x as N,2,3] +} as const + +export const o2 = { + arr: () => [x as N,2,3] as const +}; + + +//// [bad.ts] +export let aBad1 = [1, "2"]; +export const aBad2 = [1, "2"]; +const y = 0; +type S = "2"; + +export let aBad3 = [y, "2"] as const +export let a = [1,2,3] as const; +export let aBad4 = [...a] as const + +export const oBad1 = { + arr: [y,2,3] +} as const + +export const oBad2 = { + arr: () => [y,2,3] +} as const + +//// [ok.js] +export let a1 = [1, "2"]; +const x = 0; +export let a2 = [x, "2"]; +export let a3 = [x, "2"]; +export let a4 = [Math.random(), "2"]; +export const a5 = [(s) => { }, "2"]; +export const o = { + arr: [x, 2, 3] +}; +export const o2 = { + arr: () => [x, 2, 3] +}; +//// [bad.js] +export let aBad1 = [1, "2"]; +export const aBad2 = [1, "2"]; +const y = 0; +export let aBad3 = [y, "2"]; +export let a = [1, 2, 3]; +export let aBad4 = [...a]; +export const oBad1 = { + arr: [y, 2, 3] +}; +export const oBad2 = { + arr: () => [y, 2, 3] +}; + + +//// [ok.d.ts] +export declare let a1: readonly [1, "2"]; +export declare let a2: readonly [0, "2"]; +type N = 1; +export declare let a3: readonly [N, string]; +export declare let a4: readonly [N, string]; +export declare const a5: readonly [(s: N) => void, "2"]; +export declare const o: { + readonly arr: readonly [N, 2, 3]; +}; +export declare const o2: { + arr: () => readonly [N, 2, 3]; +}; +export {}; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsArrays.symbols b/tests/baselines/reference/isolatedDeclarationErrorsArrays.symbols new file mode 100644 index 0000000000000..032b16b8ebf7b --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsArrays.symbols @@ -0,0 +1,108 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsArrays.ts] //// + +=== ok.ts === +export let a1 = [1, "2"] as const +>a1 : Symbol(a1, Decl(ok.ts, 0, 10)) +>const : Symbol(const) + +const x = 0; +>x : Symbol(x, Decl(ok.ts, 1, 5)) + +export let a2 = [x as 0, "2"] as const +>a2 : Symbol(a2, Decl(ok.ts, 2, 10)) +>x : Symbol(x, Decl(ok.ts, 1, 5)) +>const : Symbol(const) + +type N = 1; +>N : Symbol(N, Decl(ok.ts, 2, 38)) + +export let a3 = [x as N, "2" as string] as const +>a3 : Symbol(a3, Decl(ok.ts, 4, 10)) +>x : Symbol(x, Decl(ok.ts, 1, 5)) +>N : Symbol(N, Decl(ok.ts, 2, 38)) +>const : Symbol(const) + +export let a4 = [Math.random() as N, "2" as string] as const +>a4 : Symbol(a4, Decl(ok.ts, 5, 10)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>N : Symbol(N, Decl(ok.ts, 2, 38)) +>const : Symbol(const) + +export const a5 = [(s: N):void => {}, "2"] as const +>a5 : Symbol(a5, Decl(ok.ts, 6, 12)) +>s : Symbol(s, Decl(ok.ts, 6, 20)) +>N : Symbol(N, Decl(ok.ts, 2, 38)) +>const : Symbol(const) + +export const o = { +>o : Symbol(o, Decl(ok.ts, 8, 12)) + + arr: [x as N,2,3] +>arr : Symbol(arr, Decl(ok.ts, 8, 18)) +>x : Symbol(x, Decl(ok.ts, 1, 5)) +>N : Symbol(N, Decl(ok.ts, 2, 38)) + +} as const +>const : Symbol(const) + +export const o2 = { +>o2 : Symbol(o2, Decl(ok.ts, 12, 12)) + + arr: () => [x as N,2,3] as const +>arr : Symbol(arr, Decl(ok.ts, 12, 19)) +>x : Symbol(x, Decl(ok.ts, 1, 5)) +>N : Symbol(N, Decl(ok.ts, 2, 38)) +>const : Symbol(const) + +}; + + +=== bad.ts === +export let aBad1 = [1, "2"]; +>aBad1 : Symbol(aBad1, Decl(bad.ts, 0, 10)) + +export const aBad2 = [1, "2"]; +>aBad2 : Symbol(aBad2, Decl(bad.ts, 1, 12)) + +const y = 0; +>y : Symbol(y, Decl(bad.ts, 2, 5)) + +type S = "2"; +>S : Symbol(S, Decl(bad.ts, 2, 12)) + +export let aBad3 = [y, "2"] as const +>aBad3 : Symbol(aBad3, Decl(bad.ts, 5, 10)) +>y : Symbol(y, Decl(bad.ts, 2, 5)) +>const : Symbol(const) + +export let a = [1,2,3] as const; +>a : Symbol(a, Decl(bad.ts, 6, 10)) +>const : Symbol(const) + +export let aBad4 = [...a] as const +>aBad4 : Symbol(aBad4, Decl(bad.ts, 7, 10)) +>a : Symbol(a, Decl(bad.ts, 6, 10)) +>const : Symbol(const) + +export const oBad1 = { +>oBad1 : Symbol(oBad1, Decl(bad.ts, 9, 12)) + + arr: [y,2,3] +>arr : Symbol(arr, Decl(bad.ts, 9, 22)) +>y : Symbol(y, Decl(bad.ts, 2, 5)) + +} as const +>const : Symbol(const) + +export const oBad2 = { +>oBad2 : Symbol(oBad2, Decl(bad.ts, 13, 12)) + + arr: () => [y,2,3] +>arr : Symbol(arr, Decl(bad.ts, 13, 22)) +>y : Symbol(y, Decl(bad.ts, 2, 5)) + +} as const +>const : Symbol(const) + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsArrays.types b/tests/baselines/reference/isolatedDeclarationErrorsArrays.types new file mode 100644 index 0000000000000..57db077c774a7 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsArrays.types @@ -0,0 +1,256 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsArrays.ts] //// + +=== ok.ts === +export let a1 = [1, "2"] as const +>a1 : readonly [1, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[1, "2"] as const : readonly [1, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[1, "2"] : readonly [1, "2"] +> : ^^^^^^^^^^^^^^^^^ +>1 : 1 +> : ^ +>"2" : "2" +> : ^^^ + +const x = 0; +>x : 0 +> : ^ +>0 : 0 +> : ^ + +export let a2 = [x as 0, "2"] as const +>a2 : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[x as 0, "2"] as const : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[x as 0, "2"] : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>x as 0 : 0 +> : ^ +>x : 0 +> : ^ +>"2" : "2" +> : ^^^ + +type N = 1; +>N : 1 +> : ^ + +export let a3 = [x as N, "2" as string] as const +>a3 : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>[x as N, "2" as string] as const : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>[x as N, "2" as string] : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>x as N : 1 +> : ^ +>x : 0 +> : ^ +>"2" as string : string +> : ^^^^^^ +>"2" : "2" +> : ^^^ + +export let a4 = [Math.random() as N, "2" as string] as const +>a4 : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>[Math.random() as N, "2" as string] as const : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>[Math.random() as N, "2" as string] : readonly [1, string] +> : ^^^^^^^^^^^^^^^^^^^^ +>Math.random() as N : 1 +> : ^ +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ +>"2" as string : string +> : ^^^^^^ +>"2" : "2" +> : ^^^ + +export const a5 = [(s: N):void => {}, "2"] as const +>a5 : readonly [(s: N) => void, "2"] +> : ^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^ +>[(s: N):void => {}, "2"] as const : readonly [(s: N) => void, "2"] +> : ^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^ +>[(s: N):void => {}, "2"] : readonly [(s: N) => void, "2"] +> : ^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^ +>(s: N):void => {} : (s: N) => void +> : ^ ^^ ^^^^^ +>s : 1 +> : ^ +>"2" : "2" +> : ^^^ + +export const o = { +>o : { readonly arr: readonly [1, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: [x as N,2,3]} as const : { readonly arr: readonly [1, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: [x as N,2,3]} : { readonly arr: readonly [1, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arr: [x as N,2,3] +>arr : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[x as N,2,3] : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>x as N : 1 +> : ^ +>x : 0 +> : ^ +>2 : 2 +> : ^ +>3 : 3 +> : ^ + +} as const + +export const o2 = { +>o2 : { arr: () => readonly [N, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^ +>{ arr: () => [x as N,2,3] as const} : { arr: () => readonly [N, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^ + + arr: () => [x as N,2,3] as const +>arr : () => readonly [N, 2, 3] +> : ^^^^^^^^^^^^^^^^ ^^ ^^ ^ +>() => [x as N,2,3] as const : () => readonly [N, 2, 3] +> : ^^^^^^^^^^^^^^^^ ^^ ^^ ^ +>[x as N,2,3] as const : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[x as N,2,3] : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>x as N : 1 +> : ^ +>x : 0 +> : ^ +>2 : 2 +> : ^ +>3 : 3 +> : ^ + +}; + + +=== bad.ts === +export let aBad1 = [1, "2"]; +>aBad1 : (string | number)[] +> : ^^^^^^^^^^^^^^^^^^^ +>[1, "2"] : (string | number)[] +> : ^^^^^^^^^^^^^^^^^^^ +>1 : 1 +> : ^ +>"2" : "2" +> : ^^^ + +export const aBad2 = [1, "2"]; +>aBad2 : (string | number)[] +> : ^^^^^^^^^^^^^^^^^^^ +>[1, "2"] : (string | number)[] +> : ^^^^^^^^^^^^^^^^^^^ +>1 : 1 +> : ^ +>"2" : "2" +> : ^^^ + +const y = 0; +>y : 0 +> : ^ +>0 : 0 +> : ^ + +type S = "2"; +>S : "2" +> : ^^^ + +export let aBad3 = [y, "2"] as const +>aBad3 : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[y, "2"] as const : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>[y, "2"] : readonly [0, "2"] +> : ^^^^^^^^^^^^^^^^^ +>y : 0 +> : ^ +>"2" : "2" +> : ^^^ + +export let a = [1,2,3] as const; +>a : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[1,2,3] as const : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[1,2,3] : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>1 : 1 +> : ^ +>2 : 2 +> : ^ +>3 : 3 +> : ^ + +export let aBad4 = [...a] as const +>aBad4 : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[...a] as const : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[...a] : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>...a : 1 | 2 | 3 +> : ^^^^^^^^^ +>a : readonly [1, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ + +export const oBad1 = { +>oBad1 : { readonly arr: readonly [0, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: [y,2,3]} as const : { readonly arr: readonly [0, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: [y,2,3]} : { readonly arr: readonly [0, 2, 3]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arr: [y,2,3] +>arr : readonly [0, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>[y,2,3] : readonly [0, 2, 3] +> : ^^^^^^^^^^^^^^^^^^ +>y : 0 +> : ^ +>2 : 2 +> : ^ +>3 : 3 +> : ^ + +} as const + +export const oBad2 = { +>oBad2 : { readonly arr: () => number[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: () => [y,2,3]} as const : { readonly arr: () => number[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ arr: () => [y,2,3]} : { readonly arr: () => number[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arr: () => [y,2,3] +>arr : () => number[] +> : ^^^^^^^^^^^^^^ +>() => [y,2,3] : () => number[] +> : ^^^^^^^^^^^^^^ +>[y,2,3] : number[] +> : ^^^^^^^^ +>y : 0 +> : ^ +>2 : 2 +> : ^ +>3 : 3 +> : ^ + +} as const diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types index 653e0561c544f..94aa24f39ded7 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types @@ -21,7 +21,7 @@ export function noParamAnnotationDefault(p = 1): void {} export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} >noParamAnnotationBadDefault : (p?: number, p2?: { a: number; }, p3?: readonly [number]) => void -> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ >p : number > : ^^^^^^ >1 + 1 : number @@ -57,7 +57,7 @@ export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [ export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} >noParamAnnotationBadDefault2 : (p?: { a: number; }) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^ >p : { a: number; } > : ^^^^^^^^^^^^^^ >{ a: 1 + 1 } : { a: number; } diff --git a/tests/baselines/reference/isolatedDeclarationsAddUndefined.js b/tests/baselines/reference/isolatedDeclarationsAddUndefined.js index 525c702548da9..db87133353afc 100644 --- a/tests/baselines/reference/isolatedDeclarationsAddUndefined.js +++ b/tests/baselines/reference/isolatedDeclarationsAddUndefined.js @@ -62,7 +62,7 @@ exports.Bar2 = Bar2; //// [file1.d.ts] type N = 1; export declare class Bar { - c?: readonly [1] | undefined; + c?: readonly [N]; c3?: N; readonly r = 1; f: number; diff --git a/tests/baselines/reference/iterableArrayPattern1.types b/tests/baselines/reference/iterableArrayPattern1.types index 1e9dcd0c833ec..199c627b0f66d 100644 --- a/tests/baselines/reference/iterableArrayPattern1.types +++ b/tests/baselines/reference/iterableArrayPattern1.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern10.types b/tests/baselines/reference/iterableArrayPattern10.types index a671e05e60ca3..92f09e81f3fa2 100644 --- a/tests/baselines/reference/iterableArrayPattern10.types +++ b/tests/baselines/reference/iterableArrayPattern10.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern11.types b/tests/baselines/reference/iterableArrayPattern11.types index af08a2b6fc748..2c466888ccbe5 100644 --- a/tests/baselines/reference/iterableArrayPattern11.types +++ b/tests/baselines/reference/iterableArrayPattern11.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern12.types b/tests/baselines/reference/iterableArrayPattern12.types index 00163f3177355..7874b3bc6378a 100644 --- a/tests/baselines/reference/iterableArrayPattern12.types +++ b/tests/baselines/reference/iterableArrayPattern12.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern13.types b/tests/baselines/reference/iterableArrayPattern13.types index 07c8e9f46e0e6..fa1173b718bdd 100644 --- a/tests/baselines/reference/iterableArrayPattern13.types +++ b/tests/baselines/reference/iterableArrayPattern13.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern14.types b/tests/baselines/reference/iterableArrayPattern14.types index d47b8359c1071..d2abd82b25f64 100644 --- a/tests/baselines/reference/iterableArrayPattern14.types +++ b/tests/baselines/reference/iterableArrayPattern14.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern15.types b/tests/baselines/reference/iterableArrayPattern15.types index 093c4d9b0023f..9b2b7c0ec31c7 100644 --- a/tests/baselines/reference/iterableArrayPattern15.types +++ b/tests/baselines/reference/iterableArrayPattern15.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern16.types b/tests/baselines/reference/iterableArrayPattern16.types index 2e97a3ec3c588..ed989e5f0b7a9 100644 --- a/tests/baselines/reference/iterableArrayPattern16.types +++ b/tests/baselines/reference/iterableArrayPattern16.types @@ -41,7 +41,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } @@ -86,7 +86,7 @@ class FooIteratorIterator { next() { >next : () => { value: FooIterator; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new FooIterator, done: false } : { value: FooIterator; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern17.types b/tests/baselines/reference/iterableArrayPattern17.types index 332ef15510c9b..d3623476721fb 100644 --- a/tests/baselines/reference/iterableArrayPattern17.types +++ b/tests/baselines/reference/iterableArrayPattern17.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern18.types b/tests/baselines/reference/iterableArrayPattern18.types index ec6d6540119b8..0a89208370544 100644 --- a/tests/baselines/reference/iterableArrayPattern18.types +++ b/tests/baselines/reference/iterableArrayPattern18.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern19.types b/tests/baselines/reference/iterableArrayPattern19.types index 039ceddf69c6d..b37738ad5edd2 100644 --- a/tests/baselines/reference/iterableArrayPattern19.types +++ b/tests/baselines/reference/iterableArrayPattern19.types @@ -21,7 +21,7 @@ class FooArrayIterator { next() { >next : () => { value: Foo[]; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: [new Foo], done: false } : { value: Foo[]; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern2.types b/tests/baselines/reference/iterableArrayPattern2.types index 683931401ecda..096c5c71bee81 100644 --- a/tests/baselines/reference/iterableArrayPattern2.types +++ b/tests/baselines/reference/iterableArrayPattern2.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern20.types b/tests/baselines/reference/iterableArrayPattern20.types index 5f2215ba64efc..1e6c250d9382c 100644 --- a/tests/baselines/reference/iterableArrayPattern20.types +++ b/tests/baselines/reference/iterableArrayPattern20.types @@ -19,7 +19,7 @@ class FooArrayIterator { next() { >next : () => { value: Foo[]; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: [new Foo], done: false } : { value: Foo[]; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern3.types b/tests/baselines/reference/iterableArrayPattern3.types index b8d6c75617d1d..eafcb63fd0b4c 100644 --- a/tests/baselines/reference/iterableArrayPattern3.types +++ b/tests/baselines/reference/iterableArrayPattern3.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern4.types b/tests/baselines/reference/iterableArrayPattern4.types index aba72c3c2f74a..888f831710af9 100644 --- a/tests/baselines/reference/iterableArrayPattern4.types +++ b/tests/baselines/reference/iterableArrayPattern4.types @@ -19,7 +19,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern5.types b/tests/baselines/reference/iterableArrayPattern5.types index a37c2e96fd6f2..f70b58e37c35f 100644 --- a/tests/baselines/reference/iterableArrayPattern5.types +++ b/tests/baselines/reference/iterableArrayPattern5.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern6.types b/tests/baselines/reference/iterableArrayPattern6.types index 6bb0c30b8328a..de8b964c1fc93 100644 --- a/tests/baselines/reference/iterableArrayPattern6.types +++ b/tests/baselines/reference/iterableArrayPattern6.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern7.types b/tests/baselines/reference/iterableArrayPattern7.types index 5deee0d88f5a3..bf254c4e8e69a 100644 --- a/tests/baselines/reference/iterableArrayPattern7.types +++ b/tests/baselines/reference/iterableArrayPattern7.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern8.types b/tests/baselines/reference/iterableArrayPattern8.types index 70acc1d945c51..00b8dcccaaa94 100644 --- a/tests/baselines/reference/iterableArrayPattern8.types +++ b/tests/baselines/reference/iterableArrayPattern8.types @@ -21,7 +21,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iterableArrayPattern9.types b/tests/baselines/reference/iterableArrayPattern9.types index 1cd9dbc05fcc4..05c8d21a98b27 100644 --- a/tests/baselines/reference/iterableArrayPattern9.types +++ b/tests/baselines/reference/iterableArrayPattern9.types @@ -31,7 +31,7 @@ class FooIterator { next() { >next : () => { value: Foo; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ return { >{ value: new Foo, done: false } : { value: Foo; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray.types b/tests/baselines/reference/iteratorSpreadInArray.types index b59345fef2364..5fcc0c6b9cdee 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.types +++ b/tests/baselines/reference/iteratorSpreadInArray.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray2.types b/tests/baselines/reference/iteratorSpreadInArray2.types index 90024decf077b..d526bd7030c8c 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.types +++ b/tests/baselines/reference/iteratorSpreadInArray2.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -52,7 +52,7 @@ class NumberIterator { next() { >next : () => { value: number; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: 0, done: false } : { value: number; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray3.types b/tests/baselines/reference/iteratorSpreadInArray3.types index a9f2c08d4b0bc..a86f7da06b863 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.types +++ b/tests/baselines/reference/iteratorSpreadInArray3.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray4.types b/tests/baselines/reference/iteratorSpreadInArray4.types index ca951e4d239b3..ceb6c067d9446 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.types +++ b/tests/baselines/reference/iteratorSpreadInArray4.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray5.types b/tests/baselines/reference/iteratorSpreadInArray5.types index 4a450509d81c1..678e2117ca046 100644 --- a/tests/baselines/reference/iteratorSpreadInArray5.types +++ b/tests/baselines/reference/iteratorSpreadInArray5.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray6.types b/tests/baselines/reference/iteratorSpreadInArray6.types index 6762d8bf9b941..4951bae08d72f 100644 --- a/tests/baselines/reference/iteratorSpreadInArray6.types +++ b/tests/baselines/reference/iteratorSpreadInArray6.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray7.types b/tests/baselines/reference/iteratorSpreadInArray7.types index 9f1a5e391fd7e..e8344e081901e 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.types +++ b/tests/baselines/reference/iteratorSpreadInArray7.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray8.types b/tests/baselines/reference/iteratorSpreadInArray8.types index 1d60757154982..8aed0253e717c 100644 --- a/tests/baselines/reference/iteratorSpreadInArray8.types +++ b/tests/baselines/reference/iteratorSpreadInArray8.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInArray9.types b/tests/baselines/reference/iteratorSpreadInArray9.types index de6963ddab775..1da8b2055c99e 100644 --- a/tests/baselines/reference/iteratorSpreadInArray9.types +++ b/tests/baselines/reference/iteratorSpreadInArray9.types @@ -7,7 +7,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { >{ value: Symbol() } : { value: symbol; } diff --git a/tests/baselines/reference/iteratorSpreadInCall.types b/tests/baselines/reference/iteratorSpreadInCall.types index 300d5fa83469f..fe6c17aad0a48 100644 --- a/tests/baselines/reference/iteratorSpreadInCall.types +++ b/tests/baselines/reference/iteratorSpreadInCall.types @@ -13,7 +13,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall10.types b/tests/baselines/reference/iteratorSpreadInCall10.types index a0b703b809c72..6e004135f84e4 100644 --- a/tests/baselines/reference/iteratorSpreadInCall10.types +++ b/tests/baselines/reference/iteratorSpreadInCall10.types @@ -19,7 +19,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall11.types b/tests/baselines/reference/iteratorSpreadInCall11.types index e5e3c83c572d4..0239ba8742ca4 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.types +++ b/tests/baselines/reference/iteratorSpreadInCall11.types @@ -19,7 +19,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall12.types b/tests/baselines/reference/iteratorSpreadInCall12.types index 583f54b8cc4a3..0dca7e991c5bc 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.types +++ b/tests/baselines/reference/iteratorSpreadInCall12.types @@ -16,7 +16,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -61,7 +61,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall2.types b/tests/baselines/reference/iteratorSpreadInCall2.types index 2299f807f3adb..d082a2d59e648 100644 --- a/tests/baselines/reference/iteratorSpreadInCall2.types +++ b/tests/baselines/reference/iteratorSpreadInCall2.types @@ -13,7 +13,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall3.types b/tests/baselines/reference/iteratorSpreadInCall3.types index 0e5c51117e761..76bde628f7efa 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.types +++ b/tests/baselines/reference/iteratorSpreadInCall3.types @@ -13,7 +13,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall4.types b/tests/baselines/reference/iteratorSpreadInCall4.types index 17152acf0f20c..12a25bab98770 100644 --- a/tests/baselines/reference/iteratorSpreadInCall4.types +++ b/tests/baselines/reference/iteratorSpreadInCall4.types @@ -15,7 +15,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall5.types b/tests/baselines/reference/iteratorSpreadInCall5.types index bc7419d402559..a9df833592b7c 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.types +++ b/tests/baselines/reference/iteratorSpreadInCall5.types @@ -13,7 +13,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -58,7 +58,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall6.types b/tests/baselines/reference/iteratorSpreadInCall6.types index d585aebffa89b..5aecc54460b3d 100644 --- a/tests/baselines/reference/iteratorSpreadInCall6.types +++ b/tests/baselines/reference/iteratorSpreadInCall6.types @@ -13,7 +13,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -58,7 +58,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall7.types b/tests/baselines/reference/iteratorSpreadInCall7.types index c65b4b9326bde..0472406f39069 100644 --- a/tests/baselines/reference/iteratorSpreadInCall7.types +++ b/tests/baselines/reference/iteratorSpreadInCall7.types @@ -19,7 +19,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -64,7 +64,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall8.types b/tests/baselines/reference/iteratorSpreadInCall8.types index b592aed22f8ab..6f3c629cae983 100644 --- a/tests/baselines/reference/iteratorSpreadInCall8.types +++ b/tests/baselines/reference/iteratorSpreadInCall8.types @@ -16,7 +16,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -61,7 +61,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/iteratorSpreadInCall9.types b/tests/baselines/reference/iteratorSpreadInCall9.types index 5f18f3d6ec12a..5d7c92b00db86 100644 --- a/tests/baselines/reference/iteratorSpreadInCall9.types +++ b/tests/baselines/reference/iteratorSpreadInCall9.types @@ -16,7 +16,7 @@ class SymbolIterator { next() { >next : () => { value: symbol; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: Symbol(), done: false } : { value: symbol; done: boolean; } @@ -61,7 +61,7 @@ class _StringIterator { next() { >next : () => { value: string; done: boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ return { >{ value: "", done: false } : { value: string; done: boolean; } diff --git a/tests/baselines/reference/jsDeclarationsComputedNames.types b/tests/baselines/reference/jsDeclarationsComputedNames.types index fb55894698642..4f39c5c271e2e 100644 --- a/tests/baselines/reference/jsDeclarationsComputedNames.types +++ b/tests/baselines/reference/jsDeclarationsComputedNames.types @@ -19,15 +19,15 @@ const InnerSym = Symbol(); module.exports = { >module.exports = { [TopLevelSym](x = 12) { return x; }, items: { [InnerSym]: (arg = {x: 12}) => arg.x }} : { [TopLevelSym](x?: number): number; items: { [InnerSym]: (arg?: { x: number; }) => number; }; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >module.exports : { [TopLevelSym](x?: number): number; items: { [InnerSym]: (arg?: { x: number; }) => number; }; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >module : { exports: { [TopLevelSym](x?: number): number; items: { [InnerSym]: (arg?: { x: number; }) => number; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >exports : { [TopLevelSym](x?: number): number; items: { [InnerSym]: (arg?: { x: number; }) => number; }; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ [TopLevelSym](x = 12) { return x; }, items: { [InnerSym]: (arg = {x: 12}) => arg.x }} : { [TopLevelSym](x?: number): number; items: { [InnerSym]: (arg?: { x: number; }) => number; }; } -> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [TopLevelSym](x = 12) { >[TopLevelSym] : (x?: number) => number @@ -46,17 +46,17 @@ module.exports = { }, items: { >items : { [InnerSym]: (arg?: { x: number; }) => number; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ >{ [InnerSym]: (arg = {x: 12}) => arg.x } : { [InnerSym]: (arg?: { x: number; }) => number; } -> : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ [InnerSym]: (arg = {x: 12}) => arg.x >[InnerSym] : (arg?: { x: number; }) => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >InnerSym : unique symbol > : ^^^^^^^^^^^^^ >(arg = {x: 12}) => arg.x : (arg?: { x: number; }) => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >arg : { x: number; } > : ^^^^^^^^^^^^^^ >{x: 12} : { x: number; } diff --git a/tests/baselines/reference/jsFileClassPropertyInitalizationInObjectLiteral.types b/tests/baselines/reference/jsFileClassPropertyInitalizationInObjectLiteral.types index cc71541f07901..bfb981665d4a7 100644 --- a/tests/baselines/reference/jsFileClassPropertyInitalizationInObjectLiteral.types +++ b/tests/baselines/reference/jsFileClassPropertyInitalizationInObjectLiteral.types @@ -3,15 +3,15 @@ === foo.js === module.exports = function () { >module.exports = function () { class A { } return { c: A.b = 1, }} : () => { c: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >module.exports : () => { c: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >module : { exports: () => { c: number; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ >exports : () => { c: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >function () { class A { } return { c: A.b = 1, }} : () => { c: number; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ class A { } >A : A diff --git a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types index 11d9cb162fc6b..73b275a259212 100644 --- a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types +++ b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types @@ -9,9 +9,9 @@ declare const fA: () => { v: T }; const fB = () => { >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >() => { return { v: '' as any as T };} : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ return { v: '' as any as T }; >{ v: '' as any as T } : { v: T; } @@ -51,9 +51,9 @@ type TA = typeof fA; type TB = typeof fB; >TB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ type TC = typeof fC; >TC : () => { v: T; } @@ -77,7 +77,7 @@ declare function accB(x: TB): void; >accB : (x: TB) => void > : ^ ^^ ^^^^^ >x : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ declare function accC(x: TC): void; >accC : (x: TC) => void @@ -104,7 +104,7 @@ accA(fA); accA(fB); accA(fC); >accA : (x: TA) => void > : ^ ^^ ^^^^^ >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >accA(fC) : void > : ^^^^ >accA : (x: TA) => void @@ -125,7 +125,7 @@ accB(fA); accB(fB); accB(fC); >accB : (x: TB) => void > : ^ ^^ ^^^^^ >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >accB(fC) : void > : ^^^^ >accB : (x: TB) => void @@ -146,7 +146,7 @@ accC(fA); accC(fB); accC(fC); >accC : (x: TC) => void > : ^ ^^ ^^^^^ >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >accC(fC) : void > : ^^^^ >accC : (x: TC) => void @@ -167,7 +167,7 @@ accL(fA); accL(fB); accL(fC); >accL : (x: TL) => void > : ^ ^^ ^^^^^ >fB : () => { v: T; } -> : ^ ^^^^^^^^^^^^ ^^^ +> : ^ ^^^^^^^^^ ^^ ^^^ >accL(fC) : void > : ^^^^ >accL : (x: TL) => void diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.types b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.types index 87e9ad85bf900..9d3e97e9ba020 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.types +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.types @@ -13,7 +13,7 @@ class a { method1() { >method1 : () => { doStuff: (callback: any) => () => any; } -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ return { >{ doStuff: (callback) => () => { var _this = 2; return callback(_this); } } : { doStuff: (callback: any) => () => any; } @@ -44,7 +44,7 @@ class a { } method2() { >method2 : () => { doStuff: (callback: any) => () => any; } -> : ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ var _this = 2; >_this : number diff --git a/tests/baselines/reference/noImplicitThisBigThis.js b/tests/baselines/reference/noImplicitThisBigThis.js index 7c5b795183abe..c41867fb8c2ce 100644 --- a/tests/baselines/reference/noImplicitThisBigThis.js +++ b/tests/baselines/reference/noImplicitThisBigThis.js @@ -100,18 +100,120 @@ function createObjNoCrash() { //// [noImplicitThisBigThis.d.ts] declare function createObj(): { - func1(): /*elided*/ any; - func2(): /*elided*/ any; - func3(): /*elided*/ any; + func1(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + }; + func2(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + }; + func3(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + }; }; declare function createObjNoCrash(): { - func1(): /*elided*/ any; - func2(): /*elided*/ any; - func3(): /*elided*/ any; - func4(): /*elided*/ any; - func5(): /*elided*/ any; - func6(): /*elided*/ any; - func7(): /*elided*/ any; - func8(): /*elided*/ any; - func9(): /*elided*/ any; + func1(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func2(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func3(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func4(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func5(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func6(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func7(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func8(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; + func9(): { + func1(): /*elided*/ any; + func2(): /*elided*/ any; + func3(): /*elided*/ any; + func4(): /*elided*/ any; + func5(): /*elided*/ any; + func6(): /*elided*/ any; + func7(): /*elided*/ any; + func8(): /*elided*/ any; + func9(): /*elided*/ any; + }; }; diff --git a/tests/baselines/reference/noImplicitThisBigThis.types b/tests/baselines/reference/noImplicitThisBigThis.types index 47522d17c6f97..1e5570f34d4cc 100644 --- a/tests/baselines/reference/noImplicitThisBigThis.types +++ b/tests/baselines/reference/noImplicitThisBigThis.types @@ -4,8 +4,8 @@ // https://github.com/microsoft/TypeScript/issues/29902 function createObj() { ->createObj : () => { func1(): any; func2(): any; func3(): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>createObj : () => { func1(): { func1(): any; func2(): any; func3(): any; }; func2(): { func1(): any; func2(): any; func3(): any; }; func3(): { func1(): any; func2(): any; func3(): any; }; } +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return { >{ func1() { return this; }, func2() { return this; }, func3() { return this; } } : { func1(): { func1(): any; func2(): any; func3(): any; }; func2(): { func1(): any; func2(): any; func3(): any; }; func3(): { func1(): any; func2(): any; func3(): any; }; } @@ -41,8 +41,8 @@ function createObj() { } function createObjNoCrash() { ->createObjNoCrash : () => { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>createObjNoCrash : () => { func1(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func2(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func3(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func4(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func5(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func6(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func7(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func8(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func9(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; } +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return { >{ func1() { return this; }, func2() { return this; }, func3() { return this; }, func4() { return this; }, func5() { return this; }, func6() { return this; }, func7() { return this; }, func8() { return this; }, func9() { return this; } } : { func1(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func2(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func3(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func4(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func5(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func6(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func7(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func8(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; func9(): { func1(): any; func2(): any; func3(): any; func4(): any; func5(): any; func6(): any; func7(): any; func8(): any; func9(): any; }; } diff --git a/tests/baselines/reference/objectLitPropertyScoping.types b/tests/baselines/reference/objectLitPropertyScoping.types index 37305471c38da..ca1d9474089a2 100644 --- a/tests/baselines/reference/objectLitPropertyScoping.types +++ b/tests/baselines/reference/objectLitPropertyScoping.types @@ -5,7 +5,7 @@ function makePoint(x: number, y: number) { >makePoint : (x: number, y: number) => { readonly x: number; readonly y: number; dist: () => number; } -> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >x : number > : ^^^^^^ >y : number diff --git a/tests/baselines/reference/objectRest2.types b/tests/baselines/reference/objectRest2.types index 0b7e60347631d..d08e4606f095b 100644 --- a/tests/baselines/reference/objectRest2.types +++ b/tests/baselines/reference/objectRest2.types @@ -11,7 +11,7 @@ declare function connectionFromArray(objects: number, args: any): {}; function rootConnection(name: string) { >rootConnection : (name: string) => { resolve: (context: any, args: any) => Promise<{}>; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >name : string > : ^^^^^^ @@ -60,7 +60,7 @@ rootConnection('test'); >rootConnection('test') : { resolve: (context: any, args: any) => Promise<{}>; } > : ^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ >rootConnection : (name: string) => { resolve: (context: any, args: any) => Promise<{}>; } -> : ^ ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ >'test' : "test" > : ^^^^^^ diff --git a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types index d2738266e4be3..e3992feecacfd 100644 --- a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types +++ b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types @@ -21,7 +21,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -70,11 +70,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([this.#field, y] = this.testArray()); >([this.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2022).types b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2022).types index d2738266e4be3..e3992feecacfd 100644 --- a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2022).types +++ b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2022).types @@ -21,7 +21,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -70,11 +70,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([this.#field, y] = this.testArray()); >([this.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types index d2738266e4be3..e3992feecacfd 100644 --- a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types +++ b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types @@ -21,7 +21,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -70,11 +70,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([this.#field, y] = this.testArray()); >([this.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types index e85c8d14a447f..f92ac8dc4c7ca 100644 --- a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types +++ b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types @@ -19,7 +19,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -68,11 +68,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([A.#field, y] = this.testArray()); >([A.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2022).types b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2022).types index e85c8d14a447f..f92ac8dc4c7ca 100644 --- a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2022).types +++ b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2022).types @@ -19,7 +19,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -68,11 +68,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([A.#field, y] = this.testArray()); >([A.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types index e85c8d14a447f..f92ac8dc4c7ca 100644 --- a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types +++ b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types @@ -19,7 +19,7 @@ class A { testObject() { >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { x: 10, y: 6 }; >{ x: 10, y: 6 } : { x: number; y: number; } @@ -68,11 +68,11 @@ class A { >this.testObject() : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >this.testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >this : this > : ^^^^ >testObject : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ ([A.#field, y] = this.testArray()); >([A.#field, y] = this.testArray()) : number[] diff --git a/tests/baselines/reference/readonlyInDeclarationFile.types b/tests/baselines/reference/readonlyInDeclarationFile.types index ac3d899754fd4..e52aeee178413 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.types +++ b/tests/baselines/reference/readonlyInDeclarationFile.types @@ -167,7 +167,7 @@ var z: { function f() { >f : () => { readonly x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { >{ get x() { return 1; }, get y() { return 1; }, set y(value) { } } : { readonly x: number; y: number; } diff --git a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js index bdbf5554d0a7d..e639d7e8e218a 100644 --- a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js +++ b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js @@ -16,6 +16,6 @@ var m1; //// [stringLiteralObjectLiteralDeclaration1.d.ts] declare namespace m1 { var n: { - 'foo bar': number; + "foo bar": number; }; } diff --git a/tests/baselines/reference/superCallInNonStaticMethod.types b/tests/baselines/reference/superCallInNonStaticMethod.types index 78cd26b126a71..34573196ba607 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.types +++ b/tests/baselines/reference/superCallInNonStaticMethod.types @@ -57,7 +57,7 @@ class Other extends Doing { // in an object literal inside a instance method public objectLiteralInsideAnInstanceMethod() { >objectLiteralInsideAnInstanceMethod : () => { a: () => void; b: void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ return { >{ a: () => { super.instanceMethod(); }, b: super.instanceMethod() } : { a: () => void; b: void; } diff --git a/tests/baselines/reference/superCallInStaticMethod.types b/tests/baselines/reference/superCallInStaticMethod.types index 54b43e87fa485..937e06ca6f484 100644 --- a/tests/baselines/reference/superCallInStaticMethod.types +++ b/tests/baselines/reference/superCallInStaticMethod.types @@ -57,7 +57,7 @@ class Other extends Doing { // in an object literal inside a static method public static objectLiteralInsideAStaticMethod() { >objectLiteralInsideAStaticMethod : () => { a: () => void; b: void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ return { >{ a: () => { super.staticMethod(); }, b: super.staticMethod() } : { a: () => void; b: void; } diff --git a/tests/baselines/reference/symbolProperty19.types b/tests/baselines/reference/symbolProperty19.types index 45299570770fb..948b6e60ac01f 100644 --- a/tests/baselines/reference/symbolProperty19.types +++ b/tests/baselines/reference/symbolProperty19.types @@ -3,9 +3,9 @@ === symbolProperty19.ts === var i = { >i : { [Symbol.iterator]: { p: any; }; [Symbol.toStringTag](): { p: any; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >{ [Symbol.iterator]: { p: null }, [Symbol.toStringTag]() { return { p: undefined }; }} : { [Symbol.iterator]: { p: null; }; [Symbol.toStringTag](): { p: any; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [Symbol.iterator]: { p: null }, >[Symbol.iterator] : { p: null; } @@ -23,7 +23,7 @@ var i = { [Symbol.toStringTag]() { return { p: undefined }; } >[Symbol.toStringTag] : () => { p: any; } -> : ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -44,7 +44,7 @@ var it = i[Symbol.iterator]; >i[Symbol.iterator] : { p: any; } > : ^^^^^^^^^^^ >i : { [Symbol.iterator]: { p: any; }; [Symbol.toStringTag](): { p: any; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >Symbol.iterator : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -58,9 +58,9 @@ var str = i[Symbol.toStringTag](); >i[Symbol.toStringTag]() : { p: any; } > : ^^^^^^^^^^^ >i[Symbol.toStringTag] : () => { p: any; } -> : ^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^ >i : { [Symbol.iterator]: { p: any; }; [Symbol.toStringTag](): { p: any; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty28.types b/tests/baselines/reference/symbolProperty28.types index 87d714cec3e84..a9b40b5df8d1c 100644 --- a/tests/baselines/reference/symbolProperty28.types +++ b/tests/baselines/reference/symbolProperty28.types @@ -7,7 +7,7 @@ class C1 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -43,7 +43,7 @@ var obj = c[Symbol.toStringTag]().x; >c[Symbol.toStringTag]() : { x: string; } > : ^^^^^^^^^^^^^^ >c[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >c : C2 > : ^^ >Symbol.toStringTag : unique symbol diff --git a/tests/baselines/reference/symbolProperty29.types b/tests/baselines/reference/symbolProperty29.types index 279f5398e6119..1136d1c89a96f 100644 --- a/tests/baselines/reference/symbolProperty29.types +++ b/tests/baselines/reference/symbolProperty29.types @@ -7,7 +7,7 @@ class C1 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty30.types b/tests/baselines/reference/symbolProperty30.types index 9c9f6d251a884..63d6926b44742 100644 --- a/tests/baselines/reference/symbolProperty30.types +++ b/tests/baselines/reference/symbolProperty30.types @@ -7,7 +7,7 @@ class C1 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty31.types b/tests/baselines/reference/symbolProperty31.types index 55a72f10d42dc..a28138beef4c4 100644 --- a/tests/baselines/reference/symbolProperty31.types +++ b/tests/baselines/reference/symbolProperty31.types @@ -7,7 +7,7 @@ class C1 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty32.types b/tests/baselines/reference/symbolProperty32.types index e64e226b6fdf5..0aea7da81fc67 100644 --- a/tests/baselines/reference/symbolProperty32.types +++ b/tests/baselines/reference/symbolProperty32.types @@ -7,7 +7,7 @@ class C1 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty33.types b/tests/baselines/reference/symbolProperty33.types index 36cdd1cb66784..af3eb86a34958 100644 --- a/tests/baselines/reference/symbolProperty33.types +++ b/tests/baselines/reference/symbolProperty33.types @@ -9,7 +9,7 @@ class C1 extends C2 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty34.types b/tests/baselines/reference/symbolProperty34.types index a448039eee218..0c1dfb788369e 100644 --- a/tests/baselines/reference/symbolProperty34.types +++ b/tests/baselines/reference/symbolProperty34.types @@ -9,7 +9,7 @@ class C1 extends C2 { [Symbol.toStringTag]() { >[Symbol.toStringTag] : () => { x: string; } -> : ^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ >Symbol.toStringTag : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.types b/tests/baselines/reference/thisInPropertyBoundDeclarations.types index 329b65d3b41b4..85493cd08e04d 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.types +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.types @@ -125,9 +125,9 @@ class A { prop5 = () => { >prop5 : () => { a: () => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ >() => { return { a: function() { return this; }, }; } : () => { a: () => any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^ return { >{ a: function() { return this; }, } : { a: () => any; } @@ -227,9 +227,9 @@ class B { prop6 = () => { >prop6 : () => { a: () => this; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^ >() => { return { a: () => { return this; } }; } : () => { a: () => this; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^ return { >{ a: () => { return this; } } : { a: () => this; } diff --git a/tests/baselines/reference/thisTypeInObjectLiterals2.types b/tests/baselines/reference/thisTypeInObjectLiterals2.types index 05cb646d4eea8..18fbfea214afb 100644 --- a/tests/baselines/reference/thisTypeInObjectLiterals2.types +++ b/tests/baselines/reference/thisTypeInObjectLiterals2.types @@ -1108,13 +1108,13 @@ let vue = new Vue({ >Vue : new (options: VueOptions) => D & M & P > : ^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ data: () => ({ x: 1, y: 2 }), methods: { f(x: string) { return this.x; } }, computed: { test(): number { return this.x; }, hello: { get() { return "hi"; }, set(value: string) { } } }} : { data: () => { x: number; y: number; }; methods: { f(x: string): number; }; computed: { test(): number; hello: { get(): string; set(value: string): void; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^ data: () => ({ x: 1, y: 2 }), >data : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >() => ({ x: 1, y: 2 }) : () => { x: number; y: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >({ x: 1, y: 2 }) : { x: number; y: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >{ x: 1, y: 2 } : { x: number; y: number; } diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.types b/tests/baselines/reference/truthinessCallExpressionCoercion1.types index 916f5ce426488..58b973a95f167 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion1.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.types @@ -304,19 +304,19 @@ function checksPropertyAccess() { var chrome = { >chrome : { platformKeys: { subtleCrypto(): { sign(): void; exportKey(): boolean; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >{ platformKeys: { subtleCrypto() { return { sign() {}, exportKey() { return true } } } } } : { platformKeys: { subtleCrypto(): { sign(): void; exportKey(): boolean; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ platformKeys: { >platformKeys : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >{ subtleCrypto() { return { sign() {}, exportKey() { return true } } } } : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ subtleCrypto() { >subtleCrypto : () => { sign(): void; exportKey(): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ return { >{ sign() {}, exportKey() { return true } } : { sign(): void; exportKey(): boolean; } @@ -342,15 +342,15 @@ function checksPropertyAccess() { >chrome.platformKeys.subtleCrypto() : { sign(): void; exportKey(): boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >chrome.platformKeys.subtleCrypto : () => { sign(): void; exportKey(): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ >chrome.platformKeys : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >chrome : { platformKeys: { subtleCrypto(): { sign(): void; exportKey(): boolean; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >platformKeys : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >subtleCrypto : () => { sign(): void; exportKey(): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ >exportKey : () => boolean > : ^^^^^^^^^^^^^ @@ -360,15 +360,15 @@ function checksPropertyAccess() { >chrome.platformKeys.subtleCrypto() : { sign(): void; exportKey(): boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >chrome.platformKeys.subtleCrypto : () => { sign(): void; exportKey(): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ >chrome.platformKeys : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >chrome : { platformKeys: { subtleCrypto(): { sign(): void; exportKey(): boolean; }; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ >platformKeys : { subtleCrypto(): { sign(): void; exportKey(): boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ >subtleCrypto : () => { sign(): void; exportKey(): boolean; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^ >exportKey : () => boolean > : ^^^^^^^^^^^^^ } diff --git a/tests/baselines/reference/typeofImportTypeOnlyExport.types b/tests/baselines/reference/typeofImportTypeOnlyExport.types index b384d11faf0a4..db85fef96d059 100644 --- a/tests/baselines/reference/typeofImportTypeOnlyExport.types +++ b/tests/baselines/reference/typeofImportTypeOnlyExport.types @@ -3,7 +3,7 @@ === button.ts === import {classMap} from './lit.js'; >classMap : () => { directive: typeof import("lit").ClassMapDirective; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const c = classMap(); >c : { directive: typeof import("lit").ClassMapDirective; } @@ -11,7 +11,7 @@ export const c = classMap(); >classMap() : { directive: typeof import("lit").ClassMapDirective; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >classMap : () => { directive: typeof import("lit").ClassMapDirective; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ === lit.ts === class ClassMapDirective {} @@ -24,17 +24,17 @@ export type {ClassMapDirective}; export const directive = >directive : (class_: C) => () => { directive: C; } -> : ^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^^^^^^^ ^^^^^^ (class_: C) => >(class_: C) => () => ({ directive: class_, }) : (class_: C) => () => { directive: C; } -> : ^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^^^^^^^ ^^^^^^ >class_ : C > : ^ () => ({ >() => ({ directive: class_, }) : () => { directive: C; } -> : ^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^ >({ directive: class_, }) : { directive: C; } > : ^^^^^^^^^^^^^^^^^ >{ directive: class_, } : { directive: C; } @@ -50,11 +50,11 @@ export const directive = export const classMap = directive(ClassMapDirective); >classMap : () => { directive: typeof ClassMapDirective; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >directive(ClassMapDirective) : () => { directive: typeof ClassMapDirective; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >directive : (class_: C) => () => { directive: C; } -> : ^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^^^^^^^ ^^^^^^ >ClassMapDirective : typeof ClassMapDirective > : ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/unexpectedStatementBlockTerminator.types b/tests/baselines/reference/unexpectedStatementBlockTerminator.types index 7469419db8ab0..235e69eb5ad25 100644 --- a/tests/baselines/reference/unexpectedStatementBlockTerminator.types +++ b/tests/baselines/reference/unexpectedStatementBlockTerminator.types @@ -13,7 +13,7 @@ case function Goo() {return {a:1,b:2};} >Goo : () => { a: number; b: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ >{a:1,b:2} : { a: number; b: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >a : number diff --git a/tests/baselines/reference/unusedLocalsInMethod4.types b/tests/baselines/reference/unusedLocalsInMethod4.types index b684bd318d203..0c16698820304 100644 --- a/tests/baselines/reference/unusedLocalsInMethod4.types +++ b/tests/baselines/reference/unusedLocalsInMethod4.types @@ -386,7 +386,7 @@ function f3() { function f4() { >f4 : () => { foo(): string; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^^^ let x: number; // should error >x : number diff --git a/tests/baselines/reference/usingDeclarationsWithIteratorObject.types b/tests/baselines/reference/usingDeclarationsWithIteratorObject.types index ae0dcfe5b55db..eb49a00a77145 100644 --- a/tests/baselines/reference/usingDeclarationsWithIteratorObject.types +++ b/tests/baselines/reference/usingDeclarationsWithIteratorObject.types @@ -21,7 +21,7 @@ class MyIterator extends Iterator { next() { return { done: true, value: undefined }; } >next : () => { done: boolean; value: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^ >{ done: true, value: undefined } : { done: boolean; value: undefined; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >done : boolean diff --git a/tests/baselines/reference/weakType.types b/tests/baselines/reference/weakType.types index be047048adee5..6985edac991ea 100644 --- a/tests/baselines/reference/weakType.types +++ b/tests/baselines/reference/weakType.types @@ -13,7 +13,7 @@ interface Settings { function getDefaultSettings() { >getDefaultSettings : () => { timeout: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ return { timeout: 1000 }; >{ timeout: 1000 } : { timeout: number; } @@ -44,7 +44,7 @@ doSomething(getDefaultSettings); >doSomething : (settings: Settings) => void > : ^ ^^ ^^^^^^^^^ >getDefaultSettings : () => { timeout: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^^ doSomething(() => ({ timeout: 1000 })); >doSomething(() => ({ timeout: 1000 })) : void diff --git a/tests/baselines/reference/withExportDecl.types b/tests/baselines/reference/withExportDecl.types index 1d45b9b0fc6f7..5b5327823e865 100644 --- a/tests/baselines/reference/withExportDecl.types +++ b/tests/baselines/reference/withExportDecl.types @@ -123,7 +123,7 @@ exportedArrayVar.push({ x: 30, y : 'hello world' }); function simpleFunction() { >simpleFunction : () => { x: string; y: string; n: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { >{ x: "Hello", y: "word", n: 2 } : { x: string; y: string; n: number; } @@ -158,7 +158,7 @@ export function exportedFunction() { >simpleFunction() : { x: string; y: string; n: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >simpleFunction : () => { x: string; y: string; n: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ } module m1 { diff --git a/tests/baselines/reference/withImportDecl.types b/tests/baselines/reference/withImportDecl.types index 7fc757fb6324f..0761de0dc7f9d 100644 --- a/tests/baselines/reference/withImportDecl.types +++ b/tests/baselines/reference/withImportDecl.types @@ -66,7 +66,7 @@ var arrayVar: string[] = ['a', 'b']; function simpleFunction() { >simpleFunction : () => { x: string; y: string; n: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^ return { >{ x: "Hello", y: "word", n: 2 } : { x: string; y: string; n: number; } diff --git a/tests/cases/compiler/isolatedDeclarationErrorsArrays.ts b/tests/cases/compiler/isolatedDeclarationErrorsArrays.ts new file mode 100644 index 0000000000000..1e4dc058a0435 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsArrays.ts @@ -0,0 +1,41 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @strict: true +// @target: ESNext + +// @fileName: ok.ts +export let a1 = [1, "2"] as const +const x = 0; +export let a2 = [x as 0, "2"] as const +type N = 1; +export let a3 = [x as N, "2" as string] as const +export let a4 = [Math.random() as N, "2" as string] as const +export const a5 = [(s: N):void => {}, "2"] as const + +export const o = { + arr: [x as N,2,3] +} as const + +export const o2 = { + arr: () => [x as N,2,3] as const +}; + + +// @fileName:bad.ts +export let aBad1 = [1, "2"]; +export const aBad2 = [1, "2"]; +const y = 0; +type S = "2"; + +export let aBad3 = [y, "2"] as const +export let a = [1,2,3] as const; +export let aBad4 = [...a] as const + +export const oBad1 = { + arr: [y,2,3] +} as const + +export const oBad2 = { + arr: () => [y,2,3] +} as const \ No newline at end of file