From 2906dead4a7aa0528fd4221f7e7a7b977857462d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 10 Dec 2024 17:06:07 +0000 Subject: [PATCH 1/5] Preserve string delimiter in type printing. --- src/compiler/checker.ts | 12 +- src/compiler/expressionToTypeNode.ts | 6 +- tests/baselines/reference/ambientErrors.types | 4 +- ...signmentCompatWithDiscriminatedUnion.types | 2 +- ...ObjectMembersStringNumericNames.errors.txt | 48 ++--- .../callSignatureFunctionOverload.types | 4 +- .../callbackArgsDifferByOptionality.types | 8 +- .../reference/callbackCrossModule.types | 2 +- .../reference/checkJsdocTypeTag5.types | 4 +- .../reference/coAndContraVariantInferences.js | 4 +- .../reference/commonTypeIntersection.types | 12 +- ...onRegularTypeFetchingSpeedReasonable.types | 2 +- ...sistentAliasVsNonAliasRecordBehavior.types | 16 +- tests/baselines/reference/constAssertions.js | 14 +- .../baselines/reference/constAssertions.types | 4 +- .../reference/constantOverloadFunction.types | 10 +- ...nstantOverloadFunctionNoSubtypeError.types | 10 +- ...eBasedOnIntersectionWithAnyInTheMix3.types | 2 +- .../contextualTypedSpecialAssignment.types | 8 +- ...ntextuallyTypedSymbolNamedProperties.types | 4 +- .../controlFlowAliasedDiscriminants.types | 4 +- .../reference/controlFlowAliasing.types | 192 +++++++++--------- .../reference/controlFlowGenericTypes.types | 6 +- .../reference/controlFlowOptionalChain.types | 6 +- .../reference/correlatedUnions.types | 2 +- .../declarationEmitAliasInlineing.js | 8 +- .../declarationEmitAliasInlineing.types | 20 +- ...EmitClassMemberWithComputedPropertyName.js | 4 +- ...itCrossFileCopiedGeneratedImportType.types | 2 +- ...peDistributivityPreservesConstraints.types | 6 +- ...ppedTypePropertyFromNumericStringKey.types | 2 +- ...eclarationEmitResolveTypesIfNotReusable.js | 8 +- ...arationEmitResolveTypesIfNotReusable.types | 16 +- ...rationEmitTopLevelNodeFromCrossFile2.types | 2 +- .../declarationEmitUsingTypeAlias2.types | 4 +- .../deferredLookupTypeResolution.types | 2 +- .../dependentDestructuredVariables.types | 4 +- .../reference/dependentReturnType1.types | 6 +- .../reference/dependentReturnType2.types | 14 +- .../reference/dependentReturnType3.types | 14 +- .../destructuredDeclarationEmit.types | 10 +- .../destructuringParameterDeclaration8.types | 12 +- ...gParameterDeclaration9(strict=false).types | 2 +- ...riminableUnionWithIntersectedMembers.types | 4 +- .../reference/discriminantPropertyCheck.types | 4 +- .../reference/discriminatedUnionTypes2.types | 20 +- .../reference/dynamicImportsDeclaration.js | 2 +- ...tyCheckIntersectionWithRecursiveType.types | 4 +- ...rdRefInTypeDeclaration(strict=false).types | 4 +- ...ardRefInTypeDeclaration(strict=true).types | 4 +- .../generatorReturnContextualType.types | 16 +- .../genericObjectSpreadResultInSwitch.types | 8 +- .../identityAndDivergentNormalizedTypes.types | 6 +- .../independentPropertyVariance.types | 4 +- .../indexedAccessTypeConstraints.types | 2 +- .../indexedAccessWithFreshObjectLiteral.types | 6 +- ...inferFromGenericFunctionReturnTypes3.types | 16 +- ...eOfNullableObjectTypesWithCommonBase.types | 4 +- ...nIncludingPropFromGlobalAugmentation.types | 2 +- ...sectionMemberOfUnionNarrowsCorrectly.types | 4 +- .../intersectionTypeNormalization.types | 4 +- .../baselines/reference/intrinsicTypes.types | 2 +- .../invariantGenericErrorElaboration.types | 2 +- ...onsClassImplementsGenericsSerialization.js | 2 +- ...tionsParameterTagReusesInputNodeInEmit2.js | 2 +- ...tionsTypedefPropertyAndExportAssignment.js | 4 +- .../jsDeclarationsUniqueSymbolUsage.js | 2 +- .../jsDeclarationsUniqueSymbolUsage.types | 2 +- ...itDoesNotUseNodeModulesPathWithoutError.js | 2 +- .../reference/jsFileFunctionOverloads.js | 6 +- .../reference/jsFileFunctionOverloads.types | 2 +- .../reference/jsFileFunctionOverloads2.js | 6 +- .../reference/jsFileFunctionOverloads2.types | 2 +- .../reference/jsFileMethodOverloads.js | 4 +- .../reference/jsFileMethodOverloads.types | 2 +- .../reference/jsFileMethodOverloads2.js | 4 +- .../reference/jsFileMethodOverloads2.types | 2 +- .../reference/jsdocBracelessTypeTag1.types | 4 +- tests/baselines/reference/jsdocLiteral.types | 2 +- tests/baselines/reference/jsdocThisType.types | 12 +- .../jsxIntrinsicElementsCompatability.types | 6 +- .../reference/keyofAndIndexedAccess.js | 4 +- .../reference/keyofAndIndexedAccess.types | 16 +- .../reference/keyofAndIndexedAccess2.types | 8 +- .../logicalAssignment2(target=es2015).types | 88 ++++---- .../logicalAssignment2(target=es2020).types | 88 ++++---- .../logicalAssignment2(target=es2021).types | 88 ++++---- .../logicalAssignment2(target=esnext).types | 88 ++++---- .../reference/mappedTypeConstraints.types | 6 +- .../mappedTypeContextualTypesApplied.types | 8 +- .../mappedTypeGenericIndexedAccess.types | 6 +- .../reference/mappedTypeProperties.types | 2 +- .../memberFunctionsWithPrivateOverloads.types | 36 ++-- .../memberFunctionsWithPublicOverloads.types | 32 +-- ...rFunctionsWithPublicPrivateOverloads.types | 40 ++-- .../reference/moduleExportAssignment7.types | 4 +- ...essPropertyCheckFromContainedLiteral.types | 12 +- ...narrowExceptionVariableInCatchClause.types | 8 +- .../reference/narrowingByTypeofInSwitch.types | 2 +- .../narrowingTypeofDiscriminant.types | 16 +- .../reference/narrowingUnionToUnion.types | 38 ++-- .../reference/narrowingUnionWithBang.types | 56 ++--- .../nestedExcessPropertyChecking.types | 4 +- ...everAsDiscriminantType(strict=false).types | 4 +- ...neverAsDiscriminantType(strict=true).types | 4 +- .../nodeNextCjsNamespaceImportDefault2.js | 2 +- ...iteralComputedNameNoDeclarationError.types | 6 +- .../overloadOnConstAsTypeAnnotation.types | 4 +- .../overloadOnConstConstraintChecks1.types | 18 +- .../overloadOnConstConstraintChecks2.types | 8 +- .../overloadOnConstConstraintChecks3.types | 8 +- .../overloadOnConstConstraintChecks4.types | 8 +- .../overloadOnConstDuplicateOverloads1.types | 14 +- ...InBaseWithBadImplementationInDerived.types | 8 +- .../overloadOnConstInCallback1.types | 6 +- ...ObjectLiteralImplementingAnInterface.types | 12 +- .../overloadOnConstInheritance1.types | 8 +- .../overloadOnConstInheritance2.types | 6 +- .../overloadOnConstInheritance3.types | 4 +- .../overloadOnConstInheritance4.types | 12 +- .../overloadOnConstNoAnyImplementation.types | 18 +- ...loadOnConstNoAnyImplementation2.errors.txt | 4 +- .../overloadOnConstNoAnyImplementation2.types | 30 +-- ...loadOnConstNoNonSpecializedSignature.types | 4 +- ...verloadOnConstNoStringImplementation.types | 18 +- ...dOnConstNoStringImplementation2.errors.txt | 4 +- ...erloadOnConstNoStringImplementation2.types | 30 +-- .../reference/overloadingOnConstants1.types | 40 ++-- ...erloadingOnConstantsInImplementation.types | 6 +- tests/baselines/reference/override2.types | 8 +- .../parserOverloadOnConstants1.types | 8 +- .../reference/primtiveTypesAreIdentical.types | 8 +- .../reference/ramdaToolsNoInfinite2.types | 4 +- .../reference/recursiveConditionalTypes.types | 2 +- ...pecializedOverloadWithRestParameters.types | 12 +- ...edSignatureAsCallbackParameter1.errors.txt | 4 +- ...ializedSignatureAsCallbackParameter1.types | 2 +- ...sNotSubtypeOfNonSpecializedSignature.types | 52 ++--- ...reIsSubtypeOfNonSpecializedSignature.types | 70 +++---- ...ramsFromGeneratorMakesRequiredParams.types | 2 +- .../spreadsAndContextualTupleTypes.types | 12 +- .../spuriousCircularityOnTypeImport.types | 4 +- .../reference/strictSubtypeAndNarrowing.types | 24 +-- .../reference/stringLiteralType.types | 6 +- .../stringLiteralTypeIsSubtypeOfString.types | 96 ++++----- ...teralTypesInImplementationSignatures.types | 36 ++-- ...eralTypesInImplementationSignatures2.types | 18 +- ...lSignaturesWithSpecializedSignatures.types | 6 +- ...tSignaturesWithSpecializedSignatures.types | 6 +- .../switchWithConstrainedTypeVariable.types | 2 +- .../reference/templateLiteralTypes1.types | 2 +- .../reference/templateLiteralTypes2.types | 2 +- .../reference/templateLiteralTypes3.types | 2 +- ...based-projects-and-emits-them-correctly.js | 18 +- ...ared-resolution-should-not-report-error.js | 10 +- .../when-resolution-is-not-shared.js | 10 +- .../reference/typeGuardFunctionErrors.types | 2 +- ...ypePredicatesCanNarrowByDiscriminant.types | 16 +- .../typeTagOnPropertyAssignment.types | 16 +- .../typeVariableConstraintIntersections.types | 2 +- .../typedefMultipleTypeParameters.types | 2 +- .../typeofImportInstantiationExpression.types | 2 +- .../typesWithSpecializedCallSignatures.types | 46 ++--- ...esWithSpecializedConstructSignatures.types | 14 +- ...ntWithUnknown(strictnullchecks=true).types | 4 +- .../reference/unionTypeReduction2.types | 28 +-- .../fourslash/completionForStringLiteral4.ts | 2 +- .../fourslash/overloadOnConstCallSignature.ts | 4 +- .../fourslash/quickInfoForOverloadOnConst1.ts | 10 +- .../signatureHelpOnOverloadOnConst.ts | 4 +- 170 files changed, 1113 insertions(+), 1107 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 690b17c376445..7bc59b911ff24 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -742,6 +742,7 @@ import { isStatic, isString, isStringANonContextualKeyword, + isStringDoubleQuoted, isStringLiteral, isStringLiteralLike, isStringOrNumericLiteralLike, @@ -6309,8 +6310,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * It also calls `setOriginalNode` to setup a `.original` pointer, since you basically *always* want these in the node builder. */ function setTextRange(context: NodeBuilderContext, range: T, location: Node | undefined): T { - if (!nodeIsSynthesized(range) || !(range.flags & NodeFlags.Synthesized) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) { - range = factory.cloneNode(range); // if `range` is synthesized or originates in another file, copy it so it definitely has synthetic positions + const nodeSourceFile = getSourceFileOfNode(getOriginalNode(range)); + if (!nodeIsSynthesized(range) || !(range.flags & NodeFlags.Synthesized) || !context.enclosingFile || context.enclosingFile !== nodeSourceFile) { + if (range.kind === SyntaxKind.StringLiteral) { + const stringLiteral = range as Node as StringLiteral; + range = factory.createStringLiteral(stringLiteral.text, !!nodeSourceFile && !isStringDoubleQuoted(stringLiteral, nodeSourceFile)) as Node as T; + } + else { + range = factory.cloneNode(range); // if `range` is synthesized or originates in another file, copy it so it definitely has synthetic positions + } } if (range === location) return range; if (!location) { diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index ad4f8321066e9..41b76c856bc7f 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -115,7 +115,6 @@ import { NodeBuilderFlags, NodeFlags, nodeIsMissing, - NoSubstitutionTemplateLiteral, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, @@ -193,7 +192,7 @@ export function createSyntacticTypeNodeBuilder( function reuseNode(context: SyntacticTypeNodeBuilderContext, node: T, range?: Node): T; function reuseNode(context: SyntacticTypeNodeBuilderContext, node: T | undefined, range?: Node): T | undefined; function reuseNode(context: SyntacticTypeNodeBuilderContext, node: T | undefined, range: Node | undefined = node) { - return node === undefined ? undefined : resolver.markNodeReuse(context, node.flags & NodeFlags.Synthesized ? node : factory.cloneNode(node), range ?? node); + return node === undefined ? undefined : resolver.markNodeReuse(context, node, range ?? node); } function tryReuseExistingTypeNode(context: SyntacticTypeNodeBuilderContext, existing: TypeNode): TypeNode | undefined { const { finalizeBoundary, startRecoveryScope, hadError, markError } = resolver.createRecoveryBoundary(context); @@ -942,13 +941,12 @@ export function createSyntacticTypeNodeBuilder( break; default: let typeKind: KeywordTypeSyntaxKind | undefined; - let primitiveNode = node as PrimitiveLiteral; + const primitiveNode = node as PrimitiveLiteral; switch (node.kind) { case SyntaxKind.NumericLiteral: typeKind = SyntaxKind.NumberKeyword; break; case SyntaxKind.NoSubstitutionTemplateLiteral: - primitiveNode = factory.createStringLiteral((node as NoSubstitutionTemplateLiteral).text); typeKind = SyntaxKind.StringKeyword; break; case SyntaxKind.StringLiteral: diff --git a/tests/baselines/reference/ambientErrors.types b/tests/baselines/reference/ambientErrors.types index a6745844e6a5b..d8c2f8874d361 100644 --- a/tests/baselines/reference/ambientErrors.types +++ b/tests/baselines/reference/ambientErrors.types @@ -10,13 +10,13 @@ declare var x = 4; // Ambient functions with invalid overloads declare function fn(x: number): string; ->fn : { (x: number): string; (x: "foo"): number; } +>fn : { (x: number): string; (x: 'foo'): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : number > : ^^^^^^ declare function fn(x: 'foo'): number; ->fn : { (x: number): string; (x: "foo"): number; } +>fn : { (x: number): string; (x: 'foo'): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types index be6617683be64..fe07add8d6b65 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types @@ -435,7 +435,7 @@ namespace GH30170 { > : ^^^^^^^^^^^^^ function drawWithColor(currentColor: 'blue' | 'yellow' | undefined) { ->drawWithColor : (currentColor: "blue" | "yellow" | undefined) => void +>drawWithColor : (currentColor: 'blue' | 'yellow' | undefined) => void > : ^ ^^ ^^^^^^^^^ >currentColor : "blue" | "yellow" > : ^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 6c85c052e0336..230a4dd66cced 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -5,28 +5,28 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Prop assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. ==== assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== @@ -82,7 +82,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. a = b; @@ -103,22 +103,22 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = a2; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. } @@ -153,7 +153,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s2 = b; // ok s2 = a2; // error ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. a = b; // error @@ -174,7 +174,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = a2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = b2; // error ~ @@ -183,22 +183,22 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop a2 = b2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. b2 = a2; // error ~~ -!!! error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +!!! error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. a2 = b; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureFunctionOverload.types b/tests/baselines/reference/callSignatureFunctionOverload.types index 5d9bb851813f1..18b1123d97b46 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.types +++ b/tests/baselines/reference/callSignatureFunctionOverload.types @@ -2,7 +2,7 @@ === callSignatureFunctionOverload.ts === var foo: { ->foo : { (name: string): string; (name: "order"): string; (name: "content"): string; (name: "done"): string; } +>foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; @@ -23,7 +23,7 @@ var foo: { } var foo2: { ->foo2 : { (name: string): string; (name: "order"): string; (name: "order"): string; (name: "done"): string; } +>foo2 : { (name: string): string; (name: 'order'): string; (name: 'order'): string; (name: 'done'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.types b/tests/baselines/reference/callbackArgsDifferByOptionality.types index c0c107c1d76cb..88fac714db623 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.types +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.types @@ -2,15 +2,15 @@ === callbackArgsDifferByOptionality.ts === function x3(callback: (x?: 'hi') => number); ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->callback : (x?: "hi") => number +>callback : (x?: 'hi') => number > : ^ ^^^ ^^^^^ >x : "hi" > : ^^^^ function x3(callback: (x: string) => number); ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: string) => number > : ^ ^^ ^^^^^ @@ -18,7 +18,7 @@ function x3(callback: (x: string) => number); > : ^^^^^^ function x3(callback: (x: any) => number) { ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: any) => number > : ^ ^^ ^^^^^ diff --git a/tests/baselines/reference/callbackCrossModule.types b/tests/baselines/reference/callbackCrossModule.types index 062a8a09257d0..2e5388420d6bd 100644 --- a/tests/baselines/reference/callbackCrossModule.types +++ b/tests/baselines/reference/callbackCrossModule.types @@ -36,7 +36,7 @@ function C() { === use.js === /** @param {import('./mod1').Con} k */ function f(k) { ->f : (k: import("./mod1").Con) => any +>f : (k: import('./mod1').Con) => any > : ^ ^^ ^^^^^^^^ >k : import("mod1").Con > : ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsdocTypeTag5.types b/tests/baselines/reference/checkJsdocTypeTag5.types index e7500bc7c59a0..5afc2c23f6bb6 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.types +++ b/tests/baselines/reference/checkJsdocTypeTag5.types @@ -68,7 +68,7 @@ var k = function (x) { return x } /** @typedef {(x: 'hi' | 'bye') => 0 | 1 | 2} Argle */ /** @type {Argle} */ function blargle(s) { ->blargle : (x: "hi" | "bye") => 0 | 1 | 2 +>blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 > : ^ ^^ ^^^^^ >s : "hi" | "bye" > : ^^^^^^^^^^^^ @@ -84,7 +84,7 @@ var zeroonetwo = blargle('hi') > : ^^^^^^^^^ >blargle('hi') : 0 | 1 | 2 > : ^^^^^^^^^ ->blargle : (x: "hi" | "bye") => 0 | 1 | 2 +>blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 > : ^ ^^ ^^^^^ >'hi' : "hi" > : ^^^^ diff --git a/tests/baselines/reference/coAndContraVariantInferences.js b/tests/baselines/reference/coAndContraVariantInferences.js index c9a631188e636..060d7dc0c22fa 100644 --- a/tests/baselines/reference/coAndContraVariantInferences.js +++ b/tests/baselines/reference/coAndContraVariantInferences.js @@ -70,7 +70,7 @@ interface Action { name: TName; payload: TPayload; } -declare const actionA: Action<"ACTION_A", string>; -declare const actionB: Action<"ACTION_B", boolean>; +declare const actionA: Action<'ACTION_A', string>; +declare const actionB: Action<'ACTION_B', boolean>; declare function call(action: Action, fn: (action: Action) => any): void; declare const printFn: (action: typeof actionA | typeof actionB) => void; diff --git a/tests/baselines/reference/commonTypeIntersection.types b/tests/baselines/reference/commonTypeIntersection.types index 447530c1e1119..b101079160517 100644 --- a/tests/baselines/reference/commonTypeIntersection.types +++ b/tests/baselines/reference/commonTypeIntersection.types @@ -2,7 +2,7 @@ === commonTypeIntersection.ts === declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; ->x1 : { __typename?: "TypeTwo"; } & { a: boolean; } +>x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ @@ -10,26 +10,26 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; > : ^^^^^^^ let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here ->y1 : { __typename?: "TypeOne"; } & { a: boolean; } +>y1 : { __typename?: 'TypeOne'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeOne" > : ^^^^^^^^^ >a : boolean > : ^^^^^^^ ->x1 : { __typename?: "TypeTwo"; } & { a: boolean; } +>x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ declare let x2: { __typename?: 'TypeTwo' } & string; ->x2 : { __typename?: "TypeTwo"; } & string +>x2 : { __typename?: 'TypeTwo'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ let y2: { __typename?: 'TypeOne' } & string = x2; // should error here ->y2 : { __typename?: "TypeOne"; } & string +>y2 : { __typename?: 'TypeOne'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeOne" > : ^^^^^^^^^ ->x2 : { __typename?: "TypeTwo"; } & string +>x2 : { __typename?: 'TypeTwo'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types index b53132a7c94ba..c9a53432a91fc 100644 --- a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types +++ b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types @@ -20024,7 +20024,7 @@ type ChildrenOf = T['children'][number]; > : ^^^^^^^^^^^^^ export function makeThing( ->makeThing : (name: T, children?: ChildrenOf>[]) => void +>makeThing : (name: T, children?: ChildrenOf>[]) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^ name: T, diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types index 341678572ef89..814e0c20d3bec 100644 --- a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types @@ -13,7 +13,7 @@ type Record2 = { }; function defaultRecord(x: Record<'a', string>, y: Record) { ->defaultRecord : (x: Record<"a", string>, y: Record) => void +>defaultRecord : (x: Record<'a', string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ function defaultRecord(x: Record<'a', string>, y: Record) { } function customRecord(x: Record2<'a', string>, y: Record2) { ->customRecord : (x: Record2<"a", string>, y: Record2) => void +>customRecord : (x: Record2<'a', string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ function customRecord(x: Record2<'a', string>, y: Record2) { } function mixed1(x: Record2<'a', string>, y: Record) { ->mixed1 : (x: Record2<"a", string>, y: Record) => void +>mixed1 : (x: Record2<'a', string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -64,7 +64,7 @@ function mixed1(x: Record2<'a', string>, y: Record) { } function mixed2(x: Record<'a', string>, y: Record2) { ->mixed2 : (x: Record<"a", string>, y: Record2) => void +>mixed2 : (x: Record<'a', string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ function mixed2(x: Record<'a', string>, y: Record2) { } function defaultRecord2(x: Record<'a', T>, y: Record) { ->defaultRecord2 : (x: Record<"a", T>, y: Record) => void +>defaultRecord2 : (x: Record<'a', T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ function defaultRecord2(x: Record<'a', T>, y: Record) { } function customRecord2(x: Record2<'a', T>, y: Record2) { ->customRecord2 : (x: Record2<"a", T>, y: Record2) => void +>customRecord2 : (x: Record2<'a', T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ function customRecord2(x: Record2<'a', T>, y: Record2) { } function mixed3(x: Record2<'a', T>, y: Record) { ->mixed3 : (x: Record2<"a", T>, y: Record) => void +>mixed3 : (x: Record2<'a', T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ function mixed3(x: Record2<'a', T>, y: Record) { } function mixed4(x: Record<'a', T>, y: Record2) { ->mixed4 : (x: Record<"a", T>, y: Record2) => void +>mixed4 : (x: Record<'a', T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constAssertions.js b/tests/baselines/reference/constAssertions.js index 3173e2bf92ae3..e217cfe2fd810 100644 --- a/tests/baselines/reference/constAssertions.js +++ b/tests/baselines/reference/constAssertions.js @@ -214,8 +214,8 @@ const fooConst54374 = { //// [constAssertions.d.ts] -declare let v1: "abc"; -declare let v2: "abc"; +declare let v1: 'abc'; +declare let v2: `abc`; declare let v3: 10; declare let v4: -10; declare let v5: 10; @@ -223,8 +223,8 @@ declare let v6: 10n; declare let v7: -10n; declare let v8: true; declare let v9: false; -declare let c1: "abc"; -declare let c2: "abc"; +declare let c1: 'abc'; +declare let c2: `abc`; declare let c3: 10; declare let c4: -10; declare let c5: 10; @@ -301,7 +301,7 @@ declare let x1: { }; }; declare let q1: 10; -declare let q2: "abc"; +declare let q2: 'abc'; declare let q3: true; declare let q4: readonly [1, 2, 3]; declare let q5: { @@ -312,8 +312,8 @@ declare function id(x: T): T; declare let e1: "abc"; declare let e2: 0 | 1; declare let e3: 1; -declare let t1: "foo"; -declare let t2: "bar"; +declare let t1: 'foo'; +declare let t2: 'bar'; declare let t3: "foo-bar"; declare let t4: "(foo)-(bar)"; declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2"; diff --git a/tests/baselines/reference/constAssertions.types b/tests/baselines/reference/constAssertions.types index e64ff4ce6e3fa..3de63430ed042 100644 --- a/tests/baselines/reference/constAssertions.types +++ b/tests/baselines/reference/constAssertions.types @@ -650,7 +650,7 @@ let t4 = `${`(${t1})`}-${`(${t2})`}` as const; > : ^^^^^ function ff1(x: 'foo' | 'bar', y: 1 | 2) { ->ff1 : (x: "foo" | "bar", y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" +>ff1 : (x: 'foo' | 'bar', y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,7 +754,7 @@ const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); > : ^^^^^^^ function ff3(x: 'foo' | 'bar', y: object) { ->ff3 : (x: "foo" | "bar", y: object) => `foo${string}` | `bar${string}` +>ff3 : (x: 'foo' | 'bar', y: object) => `foo${string}` | `bar${string}` > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constantOverloadFunction.types b/tests/baselines/reference/constantOverloadFunction.types index 4a7b2d87e01c3..461fce96494b9 100644 --- a/tests/baselines/reference/constantOverloadFunction.types +++ b/tests/baselines/reference/constantOverloadFunction.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived1; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived3; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: string): Base; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types index c22ff4030d88c..bd7721b2b40fe 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived3; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived1; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: number): Base; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : number > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types index c5ac24db84967..bba8cc1135813 100644 --- a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types +++ b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types @@ -93,7 +93,7 @@ test2({ type: "foo" }); // https://github.com/microsoft/TypeScript/issues/59473 const x: { ml: any } & { ml: 'edge' } = { ml: 'edge' }; ->x : { ml: any; } & { ml: "edge"; } +>x : { ml: any; } & { ml: 'edge'; } > : ^^^^^^ ^^^^^^^^^^^^ ^^^ >ml : any >ml : "edge" diff --git a/tests/baselines/reference/contextualTypedSpecialAssignment.types b/tests/baselines/reference/contextualTypedSpecialAssignment.types index 8c5d1bbc1c6f6..05d220458d32e 100644 --- a/tests/baselines/reference/contextualTypedSpecialAssignment.types +++ b/tests/baselines/reference/contextualTypedSpecialAssignment.types @@ -289,13 +289,13 @@ F.prototype = { // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { ->module.exports = { status: "done", m(n) { }} : { status: "done"; m(n: number): void; } +>module.exports = { status: "done", m(n) { }} : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module.exports : { status: "done"; m(n: number): void; } +>module.exports : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module : { exports: { status: "done"; m(n: number): void; }; } +>module : { exports: { status: 'done'; m(n: number): void; }; } > : ^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^^^^ ->exports : { status: "done"; m(n: number): void; } +>exports : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ >{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types index 95e4eb7641d68..cb5debb4d96b1 100644 --- a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types +++ b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types @@ -48,7 +48,7 @@ declare const ab: Action; > : ^^^^^^ declare function f(action: T, blah: { [K in T['type']]: (p: K) => void }): any; ->f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >type : string | symbol > : ^^^^^^^^^^^^^^^ @@ -61,7 +61,7 @@ declare function f(action: T, blah: { [K in f(ab, { >f(ab, { [A]: ap => { ap.description }, [B]: bp => { bp.description },}) : any ->f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >ab : Action > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowAliasedDiscriminants.types b/tests/baselines/reference/controlFlowAliasedDiscriminants.types index 9fd6a7949b697..13d0f182fea7b 100644 --- a/tests/baselines/reference/controlFlowAliasedDiscriminants.types +++ b/tests/baselines/reference/controlFlowAliasedDiscriminants.types @@ -526,7 +526,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: "string"; resp: { data: string; }; } +>resp : { type: 'string'; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ @@ -586,7 +586,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: "string"; resp: { data: string; }; } +>resp : { type: 'string'; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index d24919344d519..5590b3055b15f 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -388,9 +388,9 @@ function f18(obj: readonly [string | number]) { } function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f20 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f20 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -408,7 +408,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -422,7 +422,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -431,7 +431,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -439,9 +439,9 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f21 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f21 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -459,7 +459,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -473,7 +473,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo has type annotation >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -482,7 +482,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo has type annotation >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -490,9 +490,9 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f22 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f22 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -510,7 +510,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -524,7 +524,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo is mutable >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -533,7 +533,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo is mutable >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -541,9 +541,9 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f23 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f23 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -561,7 +561,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -569,11 +569,11 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ obj = obj; ->obj = obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj = obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (isFoo) { @@ -583,7 +583,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because obj is assigned in function body >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -592,7 +592,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because obj is assigned in function body >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -600,9 +600,9 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f24 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f24 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -614,9 +614,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ const obj = arg; ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -626,7 +626,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -640,7 +640,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -649,7 +649,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -657,9 +657,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f25 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f25 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -671,9 +671,9 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ let obj = arg; ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -683,7 +683,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -697,7 +697,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -706,7 +706,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -714,11 +714,11 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f26 : (outer: { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void +>f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -736,11 +736,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,11 +754,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.foo; >outer.obj.foo : string > : ^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } +>outer.obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -767,11 +767,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.bar; >outer.obj.bar : number > : ^^^^^^ ->outer.obj : { kind: "bar"; bar: number; } +>outer.obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -779,11 +779,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' } function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f27 : (outer: { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void +>f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -801,11 +801,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -819,11 +819,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.foo; // Not narrowed because obj is mutable >outer.obj.foo : any > : ^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -832,11 +832,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.bar; // Not narrowed because obj is mutable >outer.obj.bar : any > : ^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -844,9 +844,9 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu } function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f28 : (obj?: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "foo" > : ^^^^^ @@ -862,13 +862,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'foo' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'foo' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -880,13 +880,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'bar' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'bar' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -900,7 +900,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -912,7 +912,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -922,9 +922,9 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) // Narrowing by aliased discriminant property access function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f30 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f30 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -940,7 +940,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -956,7 +956,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -965,7 +965,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -973,9 +973,9 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f31 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f31 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -989,7 +989,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (kind === 'foo') { @@ -1003,7 +1003,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1012,7 +1012,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1020,9 +1020,9 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f32 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f32 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1038,7 +1038,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^ >k : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (k === 'foo') { @@ -1052,7 +1052,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1061,7 +1061,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1069,9 +1069,9 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f33 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f33 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1085,7 +1085,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ switch (kind) { @@ -1097,7 +1097,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1107,7 +1107,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1282,9 +1282,9 @@ class C11 { // Mixing of aliased discriminants and conditionals function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) { ->f40 : (obj: { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; }) => void +>f40 : (obj: { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } +>obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1298,7 +1298,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } +>obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ const isFoo = kind == 'foo'; @@ -1318,7 +1318,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^^ >obj.foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } +>obj : { kind: 'foo'; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -1328,7 +1328,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo?: string; } +>obj : { kind: 'foo'; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1372,7 +1372,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : string > : ^^^^^^ ->obj : { kind: "str"; payload: string; } +>obj : { kind: 'str'; payload: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : string > : ^^^^^^ @@ -1383,7 +1383,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : number > : ^^^^^^ ->obj : { kind: "num"; payload: number; } +>obj : { kind: 'num'; payload: number; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : number > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index 34aaf80709138..a016d450be1e0 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -252,13 +252,13 @@ function g4 | undefined>(x: T) { // Repro from #13995 declare function takeA(val: 'A'): void; ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -274,7 +274,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index 1be51c8e96277..ced5d4f19bd3e 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -3051,7 +3051,7 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.radius : number > : ^^^^^^ ->shape : { type: "circle"; radius: number; } +>shape : { type: 'circle'; radius: number; } > : ^^^^^^^^ ^^^^^^^^^^ ^^^ >radius : number > : ^^^^^^ @@ -3067,13 +3067,13 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.width : number > : ^^^^^^ ->shape : { type: "rectangle"; width: number; height: number; } +>shape : { type: 'rectangle'; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >width : number > : ^^^^^^ >shape.height : number > : ^^^^^^ ->shape : { type: "rectangle"; width: number; height: number; } +>shape : { type: 'rectangle'; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >height : number > : ^^^^^^ diff --git a/tests/baselines/reference/correlatedUnions.types b/tests/baselines/reference/correlatedUnions.types index 82f0b9d082942..d9cca19802a09 100644 --- a/tests/baselines/reference/correlatedUnions.types +++ b/tests/baselines/reference/correlatedUnions.types @@ -1047,7 +1047,7 @@ const ref: MyObj = { }; function func(k: K): MyObj[K]['name'] | undefined { ->func : (k: K) => MyObj[K]["name"] | undefined +>func : (k: K) => MyObj[K]['name'] | undefined > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >k : K > : ^ diff --git a/tests/baselines/reference/declarationEmitAliasInlineing.js b/tests/baselines/reference/declarationEmitAliasInlineing.js index 73ad5be9da142..20112524a817f 100644 --- a/tests/baselines/reference/declarationEmitAliasInlineing.js +++ b/tests/baselines/reference/declarationEmitAliasInlineing.js @@ -60,7 +60,7 @@ type O = { type I = { prop: string; }; -export declare const fn: (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void; +export declare const fn: (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void; export {}; //// [aExp.d.ts] export type O = { @@ -70,16 +70,16 @@ export type O = { export type I = { prop: string; }; -export declare const fnExp: (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void; +export declare const fnExp: (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void; //// [b.d.ts] export declare const f: (v: string, p: Omit<{ prop: string; prop2: string; -}, "prop">, key: keyof { +}, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void; -export declare const fExp: (v: import("./aExp").O["prop"], p: Omit, key: keyof import("./aExp").O, p2: Omit) => void; +export declare const fExp: (v: import("./aExp").O['prop'], p: Omit, key: keyof import("./aExp").O, p2: Omit) => void; diff --git a/tests/baselines/reference/declarationEmitAliasInlineing.types b/tests/baselines/reference/declarationEmitAliasInlineing.types index a03f57311a4ee..dc255c7728734 100644 --- a/tests/baselines/reference/declarationEmitAliasInlineing.types +++ b/tests/baselines/reference/declarationEmitAliasInlineing.types @@ -24,9 +24,9 @@ type I = { } export const fn = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fn : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>fn : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -61,9 +61,9 @@ export type I = { } export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fnExp : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>fnExp : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -76,22 +76,22 @@ export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omitfn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ import {fnExp} from './aExp' ->fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ export const f = fn; ->f : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>f : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ ->fn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ export const fExp = fnExp; ->fExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ ->fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitClassMemberWithComputedPropertyName.js b/tests/baselines/reference/declarationEmitClassMemberWithComputedPropertyName.js index 1445e1f383e8a..2608e5bf3e46f 100644 --- a/tests/baselines/reference/declarationEmitClassMemberWithComputedPropertyName.js +++ b/tests/baselines/reference/declarationEmitClassMemberWithComputedPropertyName.js @@ -58,9 +58,9 @@ export const t12 = new Foo().p1; //// [declarationEmitClassMemberWithComputedPropertyName.d.ts] declare const k1: unique symbol; -declare const k2: "foo"; +declare const k2: 'foo'; declare const k3: unique symbol; -declare const k4: "prop"; +declare const k4: 'prop'; declare class Foo { static [k1](): number; [k1](): string; diff --git a/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types b/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types index ffc3b71256ec0..e0e0247452749 100644 --- a/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types +++ b/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types @@ -41,7 +41,7 @@ import {e} from "../projC"; export const d = {e}; >d : { e: { f: (foo: import("projA/index").Foo) => boolean; }; } > : ^^^^^^^^^^ ^^^^^^ ->{e} : { e: { f: (foo: import("projA/index").Foo) => boolean; }; } +>{e} : { e: { f: (foo: import('projA/index').Foo) => boolean; }; } > : ^^^^^^^^^^ ^^^^^^ >e : { f: (foo: import("projA/index").Foo) => boolean; } > : ^^^^^ ^^^ diff --git a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types index 68058b6bb5190..b18f1527ab1b4 100644 --- a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types +++ b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types @@ -16,7 +16,7 @@ type AllArg = { [K in keyof T]: Parameters }; > : ^^^^^^^^^ function fn }>(sliceIndex: T): AllArg { ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : Map > : ^^^^^^^^^^^ @@ -29,9 +29,9 @@ function fn }>(sliceIndex: T): AllArg { } export default { fn }; ->{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } +>{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^^ ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ === reexport.ts === diff --git a/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types b/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types index dfb60de7132df..a78cf4a837cb1 100644 --- a/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types +++ b/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types @@ -4,7 +4,7 @@ export const f = ((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}); // Original prop uses string syntax >f : { '0': string | number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}) : { '0': string | number; } +>((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}) : { "0": string | number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >((arg: {[K in keyof T]: T[K] | string}) => arg) : (arg: { [K in keyof T]: T[K] | string; }) => { [K in keyof T]: string | T[K]; } > : ^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.js b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.js index 93dc0d4825540..2ed0255ba9907 100644 --- a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.js +++ b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.js @@ -42,10 +42,10 @@ declare const a: { readonly a: "value of a"; readonly notNecessary: "X"; }; -export declare const o1: (o: A["a"]["b"]) => void; -export declare const o2: (o: (typeof a)["a"]) => void; -export declare const o3: (o: (typeof a)["a"]) => void; -export declare const o4: (o: keyof A["a"]) => void; +export declare const o1: (o: A['a']['b']) => void; +export declare const o2: (o: (typeof a)['a']) => void; +export declare const o3: (o: (typeof a)['a']) => void; +export declare const o4: (o: keyof A['a']) => void; export {}; //// [main.d.ts] export declare const f: { diff --git a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types index 4579c067ade2f..e846364d28110 100644 --- a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types +++ b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types @@ -37,17 +37,17 @@ const a = { a: "value of a", notNecessary: u } as const export const o1 = (o: A['a']['b']) => {} ->o1 : (o: A["a"]["b"]) => void +>o1 : (o: A['a']['b']) => void > : ^ ^^ ^^^^^^^^^ ->(o: A['a']['b']) => {} : (o: A["a"]["b"]) => void +>(o: A['a']['b']) => {} : (o: A['a']['b']) => void > : ^ ^^ ^^^^^^^^^ >o : "value of b" > : ^^^^^^^^^^^^ export const o2 = (o: (typeof a)['a']) => {} ->o2 : (o: (typeof a)["a"]) => void +>o2 : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: (typeof a)['a']) => {} : (o: (typeof a)["a"]) => void +>(o: (typeof a)['a']) => {} : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -55,9 +55,9 @@ export const o2 = (o: (typeof a)['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o3 = (o: typeof a['a']) => {} ->o3 : (o: (typeof a)["a"]) => void +>o3 : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: typeof a['a']) => {} : (o: (typeof a)["a"]) => void +>(o: typeof a['a']) => {} : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -65,9 +65,9 @@ export const o3 = (o: typeof a['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o4 = (o: keyof (A['a'])) => {} ->o4 : (o: keyof A["a"]) => void +>o4 : (o: keyof A['a']) => void > : ^ ^^ ^^^^^^^^^ ->(o: keyof (A['a'])) => {} : (o: keyof A["a"]) => void +>(o: keyof (A['a'])) => {} : (o: keyof A['a']) => void > : ^ ^^ ^^^^^^^^^ >o : "b" | "notNecessary" > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types b/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types index 5cc1c050264f5..8e64e58331205 100644 --- a/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types +++ b/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types @@ -8,7 +8,7 @@ import { boxedBox } from "./boxedBox"; export const _ = boxedBox; >_ : import("box").Box<{ boxed: import("box").Box; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ->boxedBox : import("box").Box<{ boxed: import("box").Box; }> +>boxedBox : import("box").Box<{ boxed: import('box').Box; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ // At index 83 diff --git a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types index b99ee19d2b2b1..2b531d6c638ed 100644 --- a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types +++ b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types @@ -50,7 +50,7 @@ import { shouldLookupName, reuseDepName, shouldReuseLocalName, shouldBeElided } > : ^^^^^^^^^^^^^ export declare const goodDeclaration: () => () => { ->goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import("./other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } +>goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import('./other').shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } > : ^ ^^^^^^^ /** Other Can't be named in index.ts, but the whole conditional type can be resolved */ @@ -107,7 +107,7 @@ import { goodDeclaration, shouldReuseLocalName, shouldBeElided } from "some-dep" export const bar = goodDeclaration<{}>; >bar : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ->goodDeclaration<{}> : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } +>goodDeclaration<{}> : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import('node_modules/some-dep/dist/other').shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >goodDeclaration : () => () => { shouldPrintResult: T extends import("node_modules/some-dep/dist/inner").Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? import("node_modules/some-dep/dist/inner").Other : "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/deferredLookupTypeResolution.types b/tests/baselines/reference/deferredLookupTypeResolution.types index 81aa562834c02..a45a4870b07ee 100644 --- a/tests/baselines/reference/deferredLookupTypeResolution.types +++ b/tests/baselines/reference/deferredLookupTypeResolution.types @@ -62,7 +62,7 @@ function f2(a: A) { } function f3(x: 'a' | 'b') { ->f3 : (x: "a" | "b") => { a: any; b: any; x: any; } +>f3 : (x: 'a' | 'b') => { a: any; b: any; x: any; } > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "a" | "b" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index 1b829f101d426..36af4eef845aa 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -878,7 +878,7 @@ f50((kind, data) => { }); const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => { ->f51 : (...args: ["A", number] | ["B", string]) => void +>f51 : (...args: ['A', number] | ['B', string]) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B", string] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -928,7 +928,7 @@ const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => }; const f52: (...args: ['A', number] | ['B']) => void = (kind, payload?) => { ->f52 : (...args: ["A", number] | ["B"]) => void +>f52 : (...args: ['A', number] | ['B']) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B"] > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType1.types b/tests/baselines/reference/dependentReturnType1.types index 96265db6b57be..9ec46efcfb0af 100644 --- a/tests/baselines/reference/dependentReturnType1.types +++ b/tests/baselines/reference/dependentReturnType1.types @@ -482,13 +482,13 @@ function ftakeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -504,7 +504,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/dependentReturnType2.types b/tests/baselines/reference/dependentReturnType2.types index 1adf92c29a8fd..2581a01cb7ebf 100644 --- a/tests/baselines/reference/dependentReturnType2.types +++ b/tests/baselines/reference/dependentReturnType2.types @@ -827,7 +827,7 @@ class NewAgenda { * @returns {Promise} */ async _createIntervalJob(interval, name, data, options) { ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -853,7 +853,7 @@ class NewAgenda { * @returns {Promise | undefined} */ _createIntervalJobs(interval, names, data, options) { ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -878,7 +878,7 @@ class NewAgenda { * @returns {Promise>} */ async newEvery(interval, name, data, options) { ->newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -902,11 +902,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -933,11 +933,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType3.types b/tests/baselines/reference/dependentReturnType3.types index ac94d85e9b9e3..43ac3d581739c 100644 --- a/tests/baselines/reference/dependentReturnType3.types +++ b/tests/baselines/reference/dependentReturnType3.types @@ -825,7 +825,7 @@ class NewAgenda { > : ^^^^^^^^^ public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise { return undefined as any; } ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -841,7 +841,7 @@ class NewAgenda { > : ^^^^^^^^^ private _createIntervalJobs( ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -867,7 +867,7 @@ class NewAgenda { > : ^^^^^^^^^ public async newEvery( ->newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -899,11 +899,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -930,11 +930,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuredDeclarationEmit.types b/tests/baselines/reference/destructuredDeclarationEmit.types index 5329e83ccc2e4..ef7f04b00fed6 100644 --- a/tests/baselines/reference/destructuredDeclarationEmit.types +++ b/tests/baselines/reference/destructuredDeclarationEmit.types @@ -32,7 +32,7 @@ const foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } > : ^^^ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]]; ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ >def : "def" > : ^^^^^ @@ -72,20 +72,20 @@ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ === index.ts === import { foo, arr } from './foo'; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo; @@ -133,7 +133,7 @@ const [ , one, , [, bee, , [, {sec} ]]] = arr; > : ^^^^^^^^^ >sec : "sec" > : ^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { one, bee, sec }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration8.types b/tests/baselines/reference/destructuringParameterDeclaration8.types index 54655273fce7b..80dd1b585f02a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration8.types +++ b/tests/baselines/reference/destructuringParameterDeclaration8.types @@ -4,7 +4,7 @@ // explicit type annotation should cause `method` to have type 'x' | 'y' // both inside and outside `test`. function test({ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ method = 'z', @@ -27,7 +27,7 @@ function test({ > : ^^^^^^^^^ nested?: { p: 'a' | 'b' } ->nested : { p: "a" | "b"; } +>nested : { p: 'a' | 'b'; } > : ^^^^^ ^^^ >p : "a" | "b" > : ^^^^^^^^^ @@ -46,7 +46,7 @@ function test({ test({}); >test({}) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{} : {} > : ^^ @@ -54,7 +54,7 @@ test({}); test({ method: 'x', nested: { p: 'a' } }) >test({ method: 'x', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'x', nested: { p: 'a' } } : { method: "x"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ test({ method: 'x', nested: { p: 'a' } }) test({ method: 'z', nested: { p: 'b' } }) >test({ method: 'z', nested: { p: 'b' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -94,7 +94,7 @@ test({ method: 'z', nested: { p: 'b' } }) test({ method: 'one', nested: { p: 'a' } }) >test({ method: 'one', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types index e827977063d76..3d1dd22fe0be6 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types +++ b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types @@ -6,7 +6,7 @@ * @param {Partial>} [config.additionalFiles] */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void > : ^ ^^^ ^^^ ^ ^^^^^^^^^ additionalFiles: { diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types index eea65063472ed..851bd317245c8 100644 --- a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types @@ -28,7 +28,7 @@ type X = const x: X = 4 as any as { x: 'x' | 'y', y: number }; >x : X > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 @@ -60,7 +60,7 @@ type Y = const y: Y = 4 as any as { x: 'x' | 'y', y: number }; >y : Y > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 diff --git a/tests/baselines/reference/discriminantPropertyCheck.types b/tests/baselines/reference/discriminantPropertyCheck.types index f92594a3e1fd4..85488720e94d7 100644 --- a/tests/baselines/reference/discriminantPropertyCheck.types +++ b/tests/baselines/reference/discriminantPropertyCheck.types @@ -649,7 +649,7 @@ export function foo(obj: Obj) { onlyPlus(obj.key); >onlyPlus(obj.key) : "+" > : ^^^ ->onlyPlus : (arg: "+") => "+" +>onlyPlus : (arg: '+') => "+" > : ^ ^^ ^^^^^^^^ >obj.key : "+" > : ^^^ @@ -664,7 +664,7 @@ export function foo(obj: Obj) { } function onlyPlus(arg: '+') { ->onlyPlus : (arg: "+") => "+" +>onlyPlus : (arg: '+') => "+" > : ^ ^^ ^^^^^^^^ >arg : "+" > : ^^^ diff --git a/tests/baselines/reference/discriminatedUnionTypes2.types b/tests/baselines/reference/discriminatedUnionTypes2.types index f67c4ae4daa10..ce388aacf9544 100644 --- a/tests/baselines/reference/discriminatedUnionTypes2.types +++ b/tests/baselines/reference/discriminatedUnionTypes2.types @@ -549,9 +549,9 @@ type RuntimeValue = > : ^^^^^^^ function foo1(x: RuntimeValue & { type: 'number' }) { ->foo1 : (x: RuntimeValue & { type: "number"; }) => void +>foo1 : (x: RuntimeValue & { type: 'number'; }) => void > : ^ ^^ ^^^^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -561,7 +561,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { > : ^^^^^^^ >x.type : "number" > : ^^^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -571,7 +571,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -580,7 +580,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -588,9 +588,9 @@ function foo1(x: RuntimeValue & { type: 'number' }) { } function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { ->foo2 : (x: RuntimeValue & ({ type: "number"; } | { type: "string"; })) => void +>foo2 : (x: RuntimeValue & ({ type: 'number'; } | { type: 'string'; })) => void > : ^ ^^ ^^^^^^^^^ ->x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) +>x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "number" > : ^^^^^^^^ @@ -602,7 +602,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { > : ^^^^^^^ >x.type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ ->x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) +>x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ @@ -612,7 +612,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -621,7 +621,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // string >x.value : string > : ^^^^^^ ->x : { type: "string"; value: string; } & { type: "string"; } +>x : { type: 'string'; value: string; } & { type: 'string'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/dynamicImportsDeclaration.js b/tests/baselines/reference/dynamicImportsDeclaration.js index 2892964db5904..853bb88027597 100644 --- a/tests/baselines/reference/dynamicImportsDeclaration.js +++ b/tests/baselines/reference/dynamicImportsDeclaration.js @@ -58,7 +58,7 @@ export default _default; declare const _default: 1; export default _default; //// [caseFallback.d.ts] -declare const _default: "fallback"; +declare const _default: 'fallback'; export default _default; //// [index.d.ts] export declare const mod: { diff --git a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types index 313700a47e74f..17e007554c208 100644 --- a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types +++ b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types @@ -79,7 +79,7 @@ type Schema2 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj2: Schema2 = { ->schemaObj2 : { props: { l1: { props: { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example +>schemaObj2 : { props: { l1: { props: { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ type Schema4 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj4: Schema4 = { ->schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; }; }; } +>schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types index 6df385d452429..a3876a2c08673 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types index 6df385d452429..a3876a2c08673 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/generatorReturnContextualType.types b/tests/baselines/reference/generatorReturnContextualType.types index 392d859ed65b0..e3fe28c12939f 100644 --- a/tests/baselines/reference/generatorReturnContextualType.types +++ b/tests/baselines/reference/generatorReturnContextualType.types @@ -4,7 +4,7 @@ // #35995 function* f1(): Generator { ->f1 : () => Generator +>f1 : () => Generator > : ^^^^^^ >x : "x" > : ^^^ @@ -19,7 +19,7 @@ function* f1(): Generator { } function* g1(): Iterator { ->g1 : () => Iterator +>g1 : () => Iterator > : ^^^^^^ >x : "x" > : ^^^ @@ -34,7 +34,7 @@ function* g1(): Iterator { } async function* f2(): AsyncGenerator { ->f2 : () => AsyncGenerator +>f2 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -49,7 +49,7 @@ async function* f2(): AsyncGenerator { } async function* g2(): AsyncIterator { ->g2 : () => AsyncIterator +>g2 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -64,7 +64,7 @@ async function* g2(): AsyncIterator { } async function* f3(): AsyncGenerator { ->f3 : () => AsyncGenerator +>f3 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -87,7 +87,7 @@ async function* f3(): AsyncGenerator { } async function* g3(): AsyncIterator { ->g3 : () => AsyncIterator +>g3 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -110,7 +110,7 @@ async function* g3(): AsyncIterator { } async function* f4(): AsyncGenerator { ->f4 : () => AsyncGenerator +>f4 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -139,7 +139,7 @@ async function* f4(): AsyncGenerator { } async function* g4(): AsyncIterator { ->g4 : () => AsyncIterator +>g4 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ diff --git a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types index 1a2cbde5968ed..408369af28144 100644 --- a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types +++ b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types @@ -70,11 +70,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : number > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: "a"; type: number; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: 'a'; type: number; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: "a"; type: number; } +>params : { foo: string; } & { tag: 'a'; type: number; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : number > : ^^^^^^ @@ -92,11 +92,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : string > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: "b"; type: string; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: 'b'; type: string; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: "b"; type: string; } +>params : { foo: string; } & { tag: 'b'; type: string; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : string > : ^^^^^^ diff --git a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types index 43c575386ab0e..24dc18e19c9ac 100644 --- a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types +++ b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types @@ -39,9 +39,9 @@ type PostBody = Extract["body"]; > : ^^^^ const post = ( ->post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ path: PATH, @@ -77,7 +77,7 @@ const tmp = ( post(path, { body }) >post(path, { body }) : void > : ^^^^ ->post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void > : ^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >path : PATH > : ^^^^ diff --git a/tests/baselines/reference/independentPropertyVariance.types b/tests/baselines/reference/independentPropertyVariance.types index 4d846fdc12ec6..95ff4022c4987 100644 --- a/tests/baselines/reference/independentPropertyVariance.types +++ b/tests/baselines/reference/independentPropertyVariance.types @@ -12,7 +12,7 @@ declare const x: { a: 1, b: string }; > : ^^^^^^ declare const y: { a: number, b: 'a' }; ->y : { a: number; b: "a"; } +>y : { a: number; b: 'a'; } > : ^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -24,6 +24,6 @@ x === y; > : ^^^^^^^ >x : { a: 1; b: string; } > : ^^^^^ ^^^^^ ^^^ ->y : { a: number; b: "a"; } +>y : { a: number; b: 'a'; } > : ^^^^^ ^^^^^ ^^^ diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.types b/tests/baselines/reference/indexedAccessTypeConstraints.types index 17b5fb66dd175..d30d7ddad9b4b 100644 --- a/tests/baselines/reference/indexedAccessTypeConstraints.types +++ b/tests/baselines/reference/indexedAccessTypeConstraints.types @@ -106,7 +106,7 @@ export class Bar> extends Parent { // Repro from #14557 function foo(x: C, y: T['content']) { ->foo : (x: C, y: T["content"]) => void +>foo : (x: C, y: T['content']) => void > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >content : C > : ^ diff --git a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types index c483b23f65f72..d77f4b930db53 100644 --- a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types +++ b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types @@ -37,7 +37,7 @@ function foo (id: string) { } function bar (id: 'a' | 'b') { ->bar : (id: "a" | "b") => string | number +>bar : (id: 'a' | 'b') => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" > : ^^^^^^^^^ @@ -72,7 +72,7 @@ function bar (id: 'a' | 'b') { } function baz (id: '1' | '2') { ->baz : (id: "1" | "2") => string | number +>baz : (id: '1' | '2') => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "1" | "2" > : ^^^^^^^^^ @@ -142,7 +142,7 @@ function qux (id: 1 | 2) { } function quux (id: 'a' | 'b' | 'z') { ->quux : (id: "a" | "b" | "z") => string | number | undefined +>quux : (id: 'a' | 'b' | 'z') => string | number | undefined > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" | "z" > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index e20de1c2bbd86..44b42100025ef 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -45,7 +45,7 @@ function wrap(value: T): Wrap { } function wrappedFoo(): Wrap<'foo'> { ->wrappedFoo : () => Wrap<"foo"> +>wrappedFoo : () => Wrap<'foo'> > : ^^^^^^ return wrap('foo'); @@ -58,7 +58,7 @@ function wrappedFoo(): Wrap<'foo'> { } function wrapBar(value: 'bar'): Wrap<'bar'> { ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -71,7 +71,7 @@ function wrapBar(value: 'bar'): Wrap<'bar'> { } function wrappedBar(): Wrap<'bar'> { ->wrappedBar : () => Wrap<"bar"> +>wrappedBar : () => Wrap<'bar'> > : ^^^^^^ const value = 'bar'; @@ -85,7 +85,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -95,7 +95,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar('bar') : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >'bar' : "bar" > : ^^^^^ @@ -111,7 +111,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value2) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value2 : string > : ^^^^^^ @@ -126,7 +126,7 @@ function wrappedBar(): Wrap<'bar'> { } function wrappedBaz(): Wrap<'baz'> { ->wrappedBaz : () => Wrap<"baz"> +>wrappedBaz : () => Wrap<'baz'> > : ^^^^^^ const value: 'baz' = 'baz'; @@ -386,7 +386,7 @@ function objectToMap(obj: any) { interface Person { phoneNumbers: { ->phoneNumbers : { __typename: "PhoneNumber"; }[] +>phoneNumbers : { __typename: 'PhoneNumber'; }[] > : ^^^^^^^^^^^^^^ ^^^^^ __typename: 'PhoneNumber'; diff --git a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types index a783ee1e541b5..8b7eca25fb50a 100644 --- a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types +++ b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types @@ -236,7 +236,7 @@ equal(v as string, v as string & { tag: 'foo' } | undefined); > : ^^^^^^ >v : never > : ^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ @@ -248,7 +248,7 @@ equal(v as string & { tag: 'foo' } | undefined, v as string); > : ^^^^ >equal : (a: T, b: T) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ diff --git a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types index 06624e4bebd8b..404e3c8b4cfcc 100644 --- a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types +++ b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types @@ -20,7 +20,7 @@ declare const source: Test1; const target: Test2 = { ...source }; >target : Test2 > : ^^^^^ ->{ ...source } : { toString: null | "string"; } +>{ ...source } : { toString: null | 'string'; } > : ^^^^^^^^^^^^ ^^^ >source : Test1 > : ^^^^^ diff --git a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types index cf04be3a3e2b0..cdd879676deb7 100644 --- a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types +++ b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types @@ -18,7 +18,7 @@ type Ex = T extends U ? T : never; > : ^^^^^^^^ declare let x: Ex ->x : { kind?: "A"; a: string; } +>x : { kind?: 'A'; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >kind : "A" > : ^^^ @@ -26,7 +26,7 @@ declare let x: Ex x.a >x.a : string > : ^^^^^^ ->x : { kind?: "A"; a: string; } +>x : { kind?: 'A'; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/intersectionTypeNormalization.types b/tests/baselines/reference/intersectionTypeNormalization.types index 6c057bd977a62..bcdb37d4d1b14 100644 --- a/tests/baselines/reference/intersectionTypeNormalization.types +++ b/tests/baselines/reference/intersectionTypeNormalization.types @@ -184,7 +184,7 @@ function getValueAsString(value: IntersectionFail): string { > : ^^ >value.num : number > : ^^^^^^ ->value : { kind: "int"; num: number; } & ToString +>value : { kind: 'int'; num: number; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >num : number > : ^^^^^^ @@ -192,7 +192,7 @@ function getValueAsString(value: IntersectionFail): string { return value.str; >value.str : string > : ^^^^^^ ->value : { kind: "string"; str: string; } & ToString +>value : { kind: 'string'; str: string; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >str : string > : ^^^^^^ diff --git a/tests/baselines/reference/intrinsicTypes.types b/tests/baselines/reference/intrinsicTypes.types index 9d681b643e808..7dbdb77786e6e 100644 --- a/tests/baselines/reference/intrinsicTypes.types +++ b/tests/baselines/reference/intrinsicTypes.types @@ -181,7 +181,7 @@ function foo1(s: string, x: Uppercase, y: Uppe } function foo2(x: Uppercase) { ->foo2 : (x: Uppercase) => void +>foo2 : (x: Uppercase) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : Uppercase > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.types b/tests/baselines/reference/invariantGenericErrorElaboration.types index fb17ecd2d4b44..0689a266a7e37 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.types +++ b/tests/baselines/reference/invariantGenericErrorElaboration.types @@ -57,7 +57,7 @@ interface Constraint> extends Runtype { > : ^ check: (x: A['witness']) => void, ->check : (x: A["witness"]) => void +>check : (x: A['witness']) => void > : ^ ^^ ^^^^^ >x : A["witness"] > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsDeclarationsClassImplementsGenericsSerialization.js b/tests/baselines/reference/jsDeclarationsClassImplementsGenericsSerialization.js index 731c668477c80..d72aac7d63501 100644 --- a/tests/baselines/reference/jsDeclarationsClassImplementsGenericsSerialization.js +++ b/tests/baselines/reference/jsDeclarationsClassImplementsGenericsSerialization.js @@ -68,4 +68,4 @@ export class Encoder implements IEncoder { */ encode(value: T): Uint8Array; } -export type IEncoder = import("./interface").Encoder; +export type IEncoder = import('./interface').Encoder; diff --git a/tests/baselines/reference/jsDeclarationsParameterTagReusesInputNodeInEmit2.js b/tests/baselines/reference/jsDeclarationsParameterTagReusesInputNodeInEmit2.js index 3f566b066854c..15357997c00fe 100644 --- a/tests/baselines/reference/jsDeclarationsParameterTagReusesInputNodeInEmit2.js +++ b/tests/baselines/reference/jsDeclarationsParameterTagReusesInputNodeInEmit2.js @@ -63,4 +63,4 @@ declare class Base { * @returns {InstanceType} */ declare function test(base: InstanceType): InstanceType; -type BaseFactory = typeof import("./base"); +type BaseFactory = typeof import('./base'); diff --git a/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js b/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js index 6e90297a1e46e..33df72eb83eb1 100644 --- a/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js +++ b/tests/baselines/reference/jsDeclarationsTypedefPropertyAndExportAssignment.js @@ -104,7 +104,7 @@ module.exports = MainThreadTasks; //// [module.d.ts] -export type TaskGroupIds = "parseHTML" | "styleLayout"; +export type TaskGroupIds = 'parseHTML' | 'styleLayout'; export type TaskGroup = { id: TaskGroupIds; label: string; @@ -148,7 +148,7 @@ declare class MainThreadTasks { declare namespace MainThreadTasks { export { TaskGroup, TaskNode, PriorTaskData }; } -type TaskGroup = import("./module.js").TaskGroup; +type TaskGroup = import('./module.js').TaskGroup; type TaskNode = { children: TaskNode[]; parent: TaskNode | undefined; diff --git a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.js b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.js index 9c929017db4d8..5b931e6291155 100644 --- a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.js +++ b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.js @@ -28,4 +28,4 @@ export type WithSymbol = { * @returns {import('./a').WithSymbol} * @param {import('./a').WithSymbol} value */ -export function b(value: import("./a").WithSymbol): import("./a").WithSymbol; +export function b(value: import('./a').WithSymbol): import('./a').WithSymbol; diff --git a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types index 23fd77525e7fd..efd0cf4b2f061 100644 --- a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types +++ b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types @@ -20,7 +20,7 @@ export const kSymbol = Symbol("my-symbol"); * @param {import('./a').WithSymbol} value */ export function b(value) { ->b : (value: import("./a").WithSymbol) => import("./a").WithSymbol +>b : (value: import('./a').WithSymbol) => import('./a').WithSymbol > : ^ ^^ ^^^^^ >value : import("a").WithSymbol > : ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsDocDeclarationEmitDoesNotUseNodeModulesPathWithoutError.js b/tests/baselines/reference/jsDocDeclarationEmitDoesNotUseNodeModulesPathWithoutError.js index e33afbfb1cec7..1b72a7e2e50c5 100644 --- a/tests/baselines/reference/jsDocDeclarationEmitDoesNotUseNodeModulesPathWithoutError.js +++ b/tests/baselines/reference/jsDocDeclarationEmitDoesNotUseNodeModulesPathWithoutError.js @@ -60,4 +60,4 @@ export class NewAjax { */ case6_unexpectedlyResolvesPathToNodeModules: (init?: LionRequestInit) => void; } -export type LionRequestInit = import("@lion/ajax").LionRequestInit; +export type LionRequestInit = import('@lion/ajax').LionRequestInit; diff --git a/tests/baselines/reference/jsFileFunctionOverloads.js b/tests/baselines/reference/jsFileFunctionOverloads.js index 367ef9c9e309d..21f59c0e42525 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads.js +++ b/tests/baselines/reference/jsFileFunctionOverloads.js @@ -125,19 +125,19 @@ function flatMap(array, iterable) { * @param {number} x * @returns {'number'} */ -declare function getTypeName(x: number): "number"; +declare function getTypeName(x: number): 'number'; /** * @overload * @param {string} x * @returns {'string'} */ -declare function getTypeName(x: string): "string"; +declare function getTypeName(x: string): 'string'; /** * @overload * @param {boolean} x * @returns {'boolean'} */ -declare function getTypeName(x: boolean): "boolean"; +declare function getTypeName(x: boolean): 'boolean'; /** * @template T * @template U diff --git a/tests/baselines/reference/jsFileFunctionOverloads.types b/tests/baselines/reference/jsFileFunctionOverloads.types index 13f9ed2c199f2..adedf2566c232 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads.types +++ b/tests/baselines/reference/jsFileFunctionOverloads.types @@ -21,7 +21,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } +>getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileFunctionOverloads2.js b/tests/baselines/reference/jsFileFunctionOverloads2.js index 2579d96ea4b65..1edaa7342013d 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads2.js +++ b/tests/baselines/reference/jsFileFunctionOverloads2.js @@ -126,7 +126,7 @@ function flatMap(array, iterable) { * @param {unknown} x * @returns {string} */ -declare function getTypeName(x: number): "number"; +declare function getTypeName(x: number): 'number'; /** * @overload * @param {number} x @@ -143,7 +143,7 @@ declare function getTypeName(x: number): "number"; * @param {unknown} x * @returns {string} */ -declare function getTypeName(x: string): "string"; +declare function getTypeName(x: string): 'string'; /** * @overload * @param {number} x @@ -160,7 +160,7 @@ declare function getTypeName(x: string): "string"; * @param {unknown} x * @returns {string} */ -declare function getTypeName(x: boolean): "boolean"; +declare function getTypeName(x: boolean): 'boolean'; /** * @template T * @template U diff --git a/tests/baselines/reference/jsFileFunctionOverloads2.types b/tests/baselines/reference/jsFileFunctionOverloads2.types index d6cd0fb445762..0f8729c306b4a 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads2.types +++ b/tests/baselines/reference/jsFileFunctionOverloads2.types @@ -19,7 +19,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } +>getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileMethodOverloads.js b/tests/baselines/reference/jsFileMethodOverloads.js index 0816b56b3eadb..f27531e3c888d 100644 --- a/tests/baselines/reference/jsFileMethodOverloads.js +++ b/tests/baselines/reference/jsFileMethodOverloads.js @@ -112,13 +112,13 @@ declare class Example { * @param {Example} this * @returns {'number'} */ - getTypeName(this: Example): "number"; + getTypeName(this: Example): 'number'; /** * @overload * @param {Example} this * @returns {'string'} */ - getTypeName(this: Example): "string"; + getTypeName(this: Example): 'string'; /** * @template U * @overload diff --git a/tests/baselines/reference/jsFileMethodOverloads.types b/tests/baselines/reference/jsFileMethodOverloads.types index 1c01554d242d6..8bc928a7b5563 100644 --- a/tests/baselines/reference/jsFileMethodOverloads.types +++ b/tests/baselines/reference/jsFileMethodOverloads.types @@ -41,7 +41,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): "number"; (this: Example): "string"; } +>getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsFileMethodOverloads2.js b/tests/baselines/reference/jsFileMethodOverloads2.js index 66b2297d69e27..ee08aa6560f8a 100644 --- a/tests/baselines/reference/jsFileMethodOverloads2.js +++ b/tests/baselines/reference/jsFileMethodOverloads2.js @@ -112,7 +112,7 @@ declare class Example { * * @returns {string} */ - getTypeName(this: Example): "number"; + getTypeName(this: Example): 'number'; /** * @overload * @param {Example} this @@ -124,7 +124,7 @@ declare class Example { * * @returns {string} */ - getTypeName(this: Example): "string"; + getTypeName(this: Example): 'string'; /** * @template U * @overload diff --git a/tests/baselines/reference/jsFileMethodOverloads2.types b/tests/baselines/reference/jsFileMethodOverloads2.types index cd9cb93ca4337..5d3d6570772b6 100644 --- a/tests/baselines/reference/jsFileMethodOverloads2.types +++ b/tests/baselines/reference/jsFileMethodOverloads2.types @@ -40,7 +40,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): "number"; (this: Example): "string"; } +>getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsdocBracelessTypeTag1.types b/tests/baselines/reference/jsdocBracelessTypeTag1.types index 3f6737aefaeb4..b60450c5d8ff8 100644 --- a/tests/baselines/reference/jsdocBracelessTypeTag1.types +++ b/tests/baselines/reference/jsdocBracelessTypeTag1.types @@ -35,7 +35,7 @@ function fn3(arg) { /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj1 = { type: "foo", prop: 10 }; ->obj1 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } +>obj1 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "foo", prop: 10 } : { type: "foo"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ const obj1 = { type: "foo", prop: 10 }; /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj2 = { type: "other", prop: 10 }; ->obj2 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } +>obj2 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "other", prop: 10 } : { type: "other"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocLiteral.types b/tests/baselines/reference/jsdocLiteral.types index 7ca746bc7dc86..5e24b291692df 100644 --- a/tests/baselines/reference/jsdocLiteral.types +++ b/tests/baselines/reference/jsdocLiteral.types @@ -9,7 +9,7 @@ * @param {12 | true | 'str'} p5 */ function f(p1, p2, p3, p4, p5) { ->f : (p1: "literal", p2: "literal", p3: "literal" | "other", p4: "literal" | number, p5: 12 | true | "str") => string +>f : (p1: 'literal', p2: "literal", p3: 'literal' | 'other', p4: 'literal' | number, p5: 12 | true | 'str') => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^ >p1 : "literal" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocThisType.types b/tests/baselines/reference/jsdocThisType.types index 8f9c7289935bb..9d045562db582 100644 --- a/tests/baselines/reference/jsdocThisType.types +++ b/tests/baselines/reference/jsdocThisType.types @@ -50,9 +50,9 @@ export function f2() { /** @type {(this: import('./types').Foo) => void} */ export const f3 = function() { ->f3 : (this: import("./types").Foo) => void +>f3 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import("./types").Foo) => void +>function() { this.test();} : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -68,7 +68,7 @@ export const f3 = function() { /** @type {(this: import('./types').Foo) => void} */ export function f4() { ->f4 : (this: import("./types").Foo) => void +>f4 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -84,9 +84,9 @@ export function f4() { /** @type {function(this: import('./types').Foo): void} */ export const f5 = function() { ->f5 : (this: import("./types").Foo) => void +>f5 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import("./types").Foo) => void +>function() { this.test();} : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -102,7 +102,7 @@ export const f5 = function() { /** @type {function(this: import('./types').Foo): void} */ export function f6() { ->f6 : (this: import("./types").Foo) => void +>f6 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); diff --git a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types index 95c1f25caba6c..50b4f5283c525 100644 --- a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types +++ b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types @@ -13,7 +13,7 @@ import * as React from "react"; > : ^^^^^^^^^^^^ function SomeComponent(props: { element?: T } & JSX.IntrinsicElements[T]): JSX.Element { ->SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element +>SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >props : { element?: T; } & JSX.IntrinsicElements[T] > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ function SomeComponent(props: { element?: T } & JSX.In } function Test(el: T) { ->Test : (el: T) => JSX.Element +>Test : (el: T) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^ >el : T > : ^ @@ -41,7 +41,7 @@ function Test(el: T) { return > : JSX.Element > : ^^^^^^^^^^^ ->SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element +>SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element > : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^ >element : T > : ^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index ea10cf32f5e50..f01984be13ad3 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -1219,13 +1219,13 @@ declare function f81(obj: T): T["a"]["x"]; +}>(obj: T): T['a']['x']; declare function f82(): void; declare function f83(obj: T, key: K): T[K]["x"]; +}, K extends keyof T>(obj: T, key: K): T[K]['x']; declare function f84(): void; declare class C1 { x: number; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 33fafc02e83a9..d1a30f6d0e2e0 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1676,7 +1676,7 @@ function f80(obj: T) { } function f81(obj: T) { ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >a : { x: any; } > : ^^^^^ ^^^ @@ -1709,7 +1709,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: "hello" } }) : string > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: "hello" } } : { a: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1727,7 +1727,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: 42 } }) : number > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: 42 } } : { a: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1742,7 +1742,7 @@ function f82() { } function f83(obj: T, key: K) { ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : string > : ^^^^^^ @@ -1777,7 +1777,7 @@ function f84() { > : ^^^^^^ >f83({ foo: { x: "hello" } }, "foo") : string > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ foo: { x: "hello" } } : { foo: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1797,7 +1797,7 @@ function f84() { > : ^^^^^^ >f83({ bar: { x: 42 } }, "bar") : number > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ bar: { x: 42 } } : { bar: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2662,7 +2662,7 @@ type MethodDescriptor = { } declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; ->dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] +>dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >name : M["name"] > : ^^^^^^^^^ @@ -2691,7 +2691,7 @@ let result = dispatchMethod("someMethod", ["hello", 35]); > : ^^^^^^^^ >dispatchMethod("someMethod", ["hello", 35]) : string[] > : ^^^^^^^^ ->dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] +>dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >"someMethod" : "someMethod" > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index 526abef4fd1bf..31ea388d72f05 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -5,7 +5,7 @@ Type Count: 1,000 === keyofAndIndexedAccess2.ts === function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') { ->f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: "a", k1: "a" | "b", k2: "a" | "b" | "c") => void +>f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >obj : { a: number; b: 0 | 1; c: string; } > : ^^^^^ ^^^^^ ^^^^^ ^^^ @@ -714,7 +714,7 @@ type B = A<{ [Q in keyof T]: StrictExclude, {}>; }>; // Repros from #30938 function fn} | {elements: Array}>(param: T, cb: (element: T['elements'][number]) => void) { ->fn : ; } | { elements: Array; }>(param: T, cb: (element: T["elements"][number]) => void) => void +>fn : ; } | { elements: Array; }>(param: T, cb: (element: T['elements'][number]) => void) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >elements : string[] > : ^^^^^^^^ @@ -722,7 +722,7 @@ function fn} | {elements: Array}>(par > : ^^^^^^^^ >param : T > : ^ ->cb : (element: T["elements"][number]) => void +>cb : (element: T['elements'][number]) => void > : ^ ^^ ^^^^^ >element : T["elements"][number] > : ^^^^^^^^^^^^^^^^^^^^^ @@ -730,7 +730,7 @@ function fn} | {elements: Array}>(par cb(param.elements[0]); >cb(param.elements[0]) : void > : ^^^^ ->cb : (element: T["elements"][number]) => void +>cb : (element: T['elements'][number]) => void > : ^ ^^ ^^^^^ >param.elements[0] : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).types b/tests/baselines/reference/logicalAssignment2(target=es2015).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).types b/tests/baselines/reference/logicalAssignment2(target=es2020).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).types b/tests/baselines/reference/logicalAssignment2(target=es2021).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2021).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).types b/tests/baselines/reference/logicalAssignment2(target=esnext).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeConstraints.types b/tests/baselines/reference/mappedTypeConstraints.types index b796c17e79844..193ff8aff09ea 100644 --- a/tests/baselines/reference/mappedTypeConstraints.types +++ b/tests/baselines/reference/mappedTypeConstraints.types @@ -2,7 +2,7 @@ === mappedTypeConstraints.ts === function f0(obj: Pick>) { ->f0 : (obj: Pick>) => void +>f0 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -21,7 +21,7 @@ function f0(obj: Pick(obj: Pick>) { ->f1 : (obj: Pick>) => void +>f1 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -102,7 +102,7 @@ function f3(obj: Record | 'c', string>) { ->f4 : (obj: Record | "c", string>) => void +>f4 : (obj: Record | 'c', string>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/mappedTypeContextualTypesApplied.types b/tests/baselines/reference/mappedTypeContextualTypesApplied.types index 25ddfbb721ece..92f1b2490ed15 100644 --- a/tests/baselines/reference/mappedTypeContextualTypesApplied.types +++ b/tests/baselines/reference/mappedTypeContextualTypesApplied.types @@ -52,13 +52,13 @@ declare function mapped7(obj: {[P in K]: TakeString}): void > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped8(obj: {[P in K]: TakeString}): void; ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped9(obj: {[P in K]: TakeString}): void; ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ @@ -178,7 +178,7 @@ mapped7({foo: s => 42}); mapped8({foo: s => 42}); >mapped8({foo: s => 42}) : void > : ^^^^ ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ @@ -194,7 +194,7 @@ mapped8({foo: s => 42}); mapped9({foo: s => 42}); >mapped9({foo: s => 42}) : void > : ^^^^ ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types index 4cb47fadcc2de..a1925ac08399e 100644 --- a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types +++ b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types @@ -121,7 +121,7 @@ type TypesMap = { > : ^^^^^^^^ [0]: { foo: 'bar'; }; ->[0] : { foo: "bar"; } +>[0] : { foo: 'bar'; } > : ^^^^^^^ ^^^ >0 : 0 > : ^ @@ -129,7 +129,7 @@ type TypesMap = { > : ^^^^^ [1]: { a: 'b'; }; ->[1] : { a: "b"; } +>[1] : { a: 'b'; } > : ^^^^^ ^^^ >1 : 1 > : ^ @@ -227,7 +227,7 @@ const onSomeEvent = (p: P) => > : ^^^^^^^^^^^^ >p.t : T > : ^ ->p : { t: T; } & ({ foo: "bar"; } | { a: "b"; }) +>p : { t: T; } & ({ foo: 'bar'; } | { a: 'b'; }) > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^ >t : T > : ^ diff --git a/tests/baselines/reference/mappedTypeProperties.types b/tests/baselines/reference/mappedTypeProperties.types index e9196aa6416e2..63bdec8d79fe9 100644 --- a/tests/baselines/reference/mappedTypeProperties.types +++ b/tests/baselines/reference/mappedTypeProperties.types @@ -49,7 +49,7 @@ type AfterMethod = { [placeType in PlaceType]?: void; model(duration: number): 'hour' | 'day'; ->model : (duration: number) => "hour" | "day" +>model : (duration: number) => 'hour' | 'day' > : ^ ^^ ^^^^^ >duration : number > : ^^^^^^ diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types index bef0bd6187da7..44eded1ac6b56 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -78,19 +78,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -98,7 +98,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -133,19 +133,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -153,7 +153,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: number); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -203,7 +203,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -267,11 +267,11 @@ var r4 = D.bar(''); // error > : ^^^ >D.bar('') : any > : ^^^ ->D.bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>D.bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >D : typeof D > : ^^^^^^^^ ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >'' : "" > : ^^ diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types index 9561281325dcf..0f73b797ba104 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types @@ -26,19 +26,19 @@ class C { >y : any public bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -46,7 +46,7 @@ class C { > : ^^^^^^ public bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -72,19 +72,19 @@ class C { >y : any public static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -92,7 +92,7 @@ class C { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -123,19 +123,19 @@ class D { >y : any public bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -143,7 +143,7 @@ class D { > : ^ public bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -169,19 +169,19 @@ class D { >y : any public static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -189,7 +189,7 @@ class D { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types index 47ca9abf3fc24..444d973ecf083 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -100,19 +100,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -120,7 +120,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -128,19 +128,19 @@ class C { > : ^^^ protected static baz(x: 'hi'); ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static baz(x: string); // error ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ protected static baz(x: number, y: string); ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -148,7 +148,7 @@ class C { > : ^^^^^^ protected static baz(x: any, y?: any) { } ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -203,7 +203,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -255,19 +255,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -275,7 +275,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ diff --git a/tests/baselines/reference/moduleExportAssignment7.types b/tests/baselines/reference/moduleExportAssignment7.types index f1a28a864dbed..eaa6e5a839bdd 100644 --- a/tests/baselines/reference/moduleExportAssignment7.types +++ b/tests/baselines/reference/moduleExportAssignment7.types @@ -227,7 +227,7 @@ function jsvalues(a, b, c, d, e, f, g) { === index.ts === function types( ->types : (a: import("./mod").Thing, b: import("./mod").AnotherThing, c: import("./mod").foo, d: import("./mod").qux, e: import("./mod").baz, f: import("./mod").buz, g: import("./mod").literal) => any +>types : (a: import('./mod').Thing, b: import('./mod').AnotherThing, c: import('./mod').foo, d: import('./mod').qux, e: import('./mod').baz, f: import('./mod').buz, g: import('./mod').literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: import('./mod').Thing, @@ -309,7 +309,7 @@ function types( } function values( ->values : (a: typeof import("./mod").Thing, b: typeof import("./mod").AnotherThing, c: typeof import("./mod").foo, d: typeof import("./mod").qux, e: typeof import("./mod").baz, f: typeof import("./mod").buz, g: typeof import("./mod").literal) => any +>values : (a: typeof import('./mod').Thing, b: typeof import('./mod').AnotherThing, c: typeof import('./mod').foo, d: typeof import('./mod').qux, e: typeof import('./mod').baz, f: typeof import('./mod').buz, g: typeof import('./mod').literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: typeof import('./mod').Thing, diff --git a/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types b/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types index f44f3b61876d7..c0c0d97beb5a7 100644 --- a/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types +++ b/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types @@ -4,7 +4,7 @@ const eslintReact = require('./eslint-plugin-react.js'); >eslintReact : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->require('./eslint-plugin-react.js') : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } +>require('./eslint-plugin-react.js') : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >require : any >'./eslint-plugin-react.js' : "./eslint-plugin-react.js" @@ -65,21 +65,21 @@ module.exports = { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >module : { exports: { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } +>exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } +>{ plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ plugins: { >plugins : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ react: { deprecatedRules, rules: allRules, }, } : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } +>{ react: { deprecatedRules, rules: allRules, }, } : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ react: { >react : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ deprecatedRules, rules: allRules, } : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } +>{ deprecatedRules, rules: allRules, } : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deprecatedRules, @@ -89,7 +89,7 @@ module.exports = { rules: allRules, >rules : { 'no-unsafe': boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->allRules : { 'no-unsafe': boolean; } +>allRules : { "no-unsafe": boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ }, diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types index c1346f70b6de1..4a6b52c77c403 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types @@ -2,7 +2,7 @@ === narrowExceptionVariableInCatchClause.ts === declare function isFooError(x: any): x is { type: 'foo'; dontPanic(); }; ->isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } +>isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >x : any > : ^^^ @@ -25,7 +25,7 @@ function tryCatch() { if (isFooError(err)) { >isFooError(err) : boolean > : ^^^^^^^ ->isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } +>isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >err : any > : ^^^ @@ -35,7 +35,7 @@ function tryCatch() { > : ^^^ >err.dontPanic : () => any > : ^^^^^^^^^ ->err : { type: "foo"; dontPanic(): any; } +>err : { type: 'foo'; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >dontPanic : () => any > : ^^^^^^^^^ @@ -45,7 +45,7 @@ function tryCatch() { > : ^^^ >err.doPanic : any > : ^^^ ->err : { type: "foo"; dontPanic(): any; } +>err : { type: 'foo'; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >doPanic : any > : ^^^ diff --git a/tests/baselines/reference/narrowingByTypeofInSwitch.types b/tests/baselines/reference/narrowingByTypeofInSwitch.types index ef91b62d22aa9..c0ba268379570 100644 --- a/tests/baselines/reference/narrowingByTypeofInSwitch.types +++ b/tests/baselines/reference/narrowingByTypeofInSwitch.types @@ -1358,7 +1358,7 @@ function narrowingNarrows(x: {} | undefined) { } function narrowingNarrows2(x: true | 3 | 'hello' | undefined) { ->narrowingNarrows2 : (x: true | 3 | "hello" | undefined) => void +>narrowingNarrows2 : (x: true | 3 | 'hello' | undefined) => void > : ^ ^^ ^^^^^^^^^ >x : true | 3 | "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/narrowingTypeofDiscriminant.types b/tests/baselines/reference/narrowingTypeofDiscriminant.types index 33e2111a90856..af0319b89cccf 100644 --- a/tests/baselines/reference/narrowingTypeofDiscriminant.types +++ b/tests/baselines/reference/narrowingTypeofDiscriminant.types @@ -2,9 +2,9 @@ === narrowingTypeofDiscriminant.ts === function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { ->f1 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; }) => void +>f1 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" > : ^^^ @@ -22,7 +22,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj.kind : "a" | 1 > : ^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" | 1 > : ^^^^^^^ @@ -30,7 +30,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: "a"; data: string; } +>obj : { kind: 'a'; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { @@ -41,9 +41,9 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { } function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undefined) { ->f2 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined) => void +>f2 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" > : ^^^ @@ -61,7 +61,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj?.kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: "a"; data: string; } +>obj : { kind: 'a'; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { diff --git a/tests/baselines/reference/narrowingUnionToUnion.types b/tests/baselines/reference/narrowingUnionToUnion.types index f090c9357be17..e464b2a081c01 100644 --- a/tests/baselines/reference/narrowingUnionToUnion.types +++ b/tests/baselines/reference/narrowingUnionToUnion.types @@ -271,13 +271,13 @@ v2; // 6 | undefined // #39105 declare function isEmptyString(value: string): value is ''; ->isEmptyString : (value: string) => value is "" +>isEmptyString : (value: string) => value is '' > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ declare function isMaybeEmptyString(value: string | null | undefined): value is '' | null | undefined; ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -321,7 +321,7 @@ const TEST_CASES = [ if (isEmptyString(value)) { >isEmptyString(value) : boolean > : ^^^^^^^ ->isEmptyString : (value: string) => value is "" +>isEmptyString : (value: string) => value is '' > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -338,7 +338,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -362,7 +362,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -795,7 +795,7 @@ isMyDiscriminatedUnion(working) && working.type === 'A' && working.aProp; > : ^^^ >working.aProp : number > : ^^^^^^ ->working : { type: "A"; aProp: number; } +>working : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -823,7 +823,7 @@ isMyDiscriminatedUnion(broken) && broken.type === 'A' && broken.aProp; > : ^^^ >broken.aProp : number > : ^^^^^^ ->broken : { type: "A"; aProp: number; } +>broken : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -851,7 +851,7 @@ isMyDiscriminatedUnion(workingAgain) && workingAgain.type === 'A' && workingAgai > : ^^^ >workingAgain.aProp : number > : ^^^^^^ ->workingAgain : { type: "A"; aProp: number; } +>workingAgain : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -879,7 +879,7 @@ type Union = > : ^^^ function example1(value: Union): { type: 'a'; variant: 2 } | null { ->example1 : (value: Union) => { type: "a"; variant: 2; } | null +>example1 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -907,7 +907,7 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -917,12 +917,12 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example2(value: Union): { type: 'a'; variant: 2 } | null { ->example2 : (value: Union) => { type: "a"; variant: 2; } | null +>example2 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -952,7 +952,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -962,7 +962,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -972,12 +972,12 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example3(value: Union): { type: 'a'; variant: 2 } | null { ->example3 : (value: Union) => { type: "a"; variant: 2; } | null +>example3 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -1005,7 +1005,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -1013,7 +1013,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -1023,7 +1023,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/narrowingUnionWithBang.types b/tests/baselines/reference/narrowingUnionWithBang.types index 6b751d5a69d06..8bc7e3fef0307 100644 --- a/tests/baselines/reference/narrowingUnionWithBang.types +++ b/tests/baselines/reference/narrowingUnionWithBang.types @@ -6,7 +6,7 @@ type WorkingType = { > : ^^^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -83,13 +83,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^^^^ >working.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } +>working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -107,13 +107,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.message : string > : ^^^^^^ ->working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } +>working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined +>working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -130,13 +130,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.id : string > : ^^^^^^ ->working.thing! : { name: "Correct"; id: string; } +>working.thing! : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: "Correct"; id: string; } +>working.thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Correct"; id: string; } +>thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ @@ -147,7 +147,7 @@ type BorkedType = { > : ^^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -218,13 +218,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^^^^ >borked.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } +>borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -242,13 +242,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.message : string > : ^^^^^^ ->borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } +>borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -265,13 +265,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.id : string > : ^^^^^^ ->borked.thing! : { name: "Correct"; id: string; } +>borked.thing! : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: "Correct"; id: string; } | undefined +>borked.thing : { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Correct"; id: string; } | undefined +>thing : { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >id : string > : ^^^^^^ @@ -282,7 +282,7 @@ export type FixedType = { > : ^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -353,11 +353,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^^^^ >fixed.thing?.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -375,13 +375,13 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing!.message : string > : ^^^^^^ ->fixed.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } +>fixed.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -398,11 +398,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing.id : string > : ^^^^^^ ->fixed.thing : { name: "Correct"; id: string; } +>fixed.thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Correct"; id: string; } +>thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ diff --git a/tests/baselines/reference/nestedExcessPropertyChecking.types b/tests/baselines/reference/nestedExcessPropertyChecking.types index 556fe677a74f0..1952900200ae7 100644 --- a/tests/baselines/reference/nestedExcessPropertyChecking.types +++ b/tests/baselines/reference/nestedExcessPropertyChecking.types @@ -169,7 +169,7 @@ type T1 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number, dark: number } }, ->primary : { __typename?: "Feature"; } & { colors: { light: number; dark: number; }; } +>primary : { __typename?: 'Feature'; } & { colors: { light: number; dark: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ @@ -187,7 +187,7 @@ type T2 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number } }, ->primary : { __typename?: "Feature"; } & { colors: { light: number; }; } +>primary : { __typename?: 'Feature'; } & { colors: { light: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types index 57e268fa0127d..1b13ffd8c044e 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: "a"; a: number; } +>foo : { kind: 'a'; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: "a"; a: number; } +>foo : { kind?: 'a'; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types index a951c8c7bca02..761530abbcaf7 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: "a"; a: number; } +>foo : { kind: 'a'; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: "a"; a: number; } +>foo : { kind?: 'a'; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/nodeNextCjsNamespaceImportDefault2.js b/tests/baselines/reference/nodeNextCjsNamespaceImportDefault2.js index d80587fc6a809..c44fa8f46846c 100644 --- a/tests/baselines/reference/nodeNextCjsNamespaceImportDefault2.js +++ b/tests/baselines/reference/nodeNextCjsNamespaceImportDefault2.js @@ -27,7 +27,7 @@ ns.default.a; //// [a.d.cts] export declare const a: number; -declare const _default: "string"; +declare const _default: 'string'; export default _default; //// [foo.d.mts] import d, { a } from './a.cjs'; diff --git a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types index 8047f6e8859d5..9806bfb995775 100644 --- a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types +++ b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types @@ -2,9 +2,9 @@ === objectLiteralComputedNameNoDeclarationError.ts === const Foo = { ->Foo : { BANANA: "banana"; } +>Foo : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ ->{ BANANA: 'banana' as 'banana',} : { BANANA: "banana"; } +>{ BANANA: 'banana' as 'banana',} : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ BANANA: 'banana' as 'banana', @@ -27,7 +27,7 @@ export const Baa = { > : ^^^^^^ >Foo.BANANA : "banana" > : ^^^^^^^^ ->Foo : { BANANA: "banana"; } +>Foo : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ >BANANA : "banana" > : ^^^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types index dc28aaafe6b2d..01c5b4f4faef5 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types @@ -2,11 +2,11 @@ === overloadOnConstAsTypeAnnotation.ts === var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; ->f : (x: "hi") => number +>f : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.types b/tests/baselines/reference/overloadOnConstConstraintChecks1.types index 0435f9c5aa294..af32e16667a4c 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface MyDoc { // Document createElement(tagName: string): Base; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -64,31 +64,31 @@ class D implements MyDoc { > : ^ createElement(tagName:string): Base; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName:any): Base { ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.types b/tests/baselines/reference/overloadOnConstConstraintChecks2.types index fa858c33ac07f..e8464759afddf 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.types @@ -22,25 +22,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.types b/tests/baselines/reference/overloadOnConstConstraintChecks3.types index 2f11866bac12f..bd173b4b4a2e9 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.types @@ -26,25 +26,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.types b/tests/baselines/reference/overloadOnConstConstraintChecks4.types index e952a8b82a8a9..b029c72756175 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.types @@ -32,25 +32,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): Z { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types index d259f9dd7d8eb..b23ef6b4d356b 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types @@ -2,7 +2,7 @@ === overloadOnConstDuplicateOverloads1.ts === function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,14 +18,14 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: any, x: any) { ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any } function foo2(a: 'hi', x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -33,7 +33,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: 'hi', x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -41,7 +41,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: string, x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -49,7 +49,7 @@ function foo2(a: string, x: string); > : ^^^^^^ function foo2(a: any, x: any) { ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types index e7c08aae5eda2..a73cd8ead960a 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types @@ -3,11 +3,11 @@ === overloadOnConstInBaseWithBadImplementationInDerived.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,11 +18,11 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number) { // error ->x1 : (a: number, callback: (x: "hi") => number) => void +>x1 : (a: number, callback: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInCallback1.types b/tests/baselines/reference/overloadOnConstInCallback1.types index d6fbf6618b16d..f6bc02f9e0a99 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.types +++ b/tests/baselines/reference/overloadOnConstInCallback1.types @@ -6,17 +6,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); // error ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types index fd6ec9be0733e..623a66d6bc8e4 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types @@ -3,11 +3,11 @@ === overloadOnConstInObjectLiteralImplementingAnInterface.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -16,15 +16,15 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error >i2 : I > : ^ ->{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: "hi") => number) => void; } +>{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: 'hi') => number) => void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^ ->x1 : (a: number, cb: (x: "hi") => number) => void +>x1 : (a: number, cb: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: "hi") => number) => void +>(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance1.types b/tests/baselines/reference/overloadOnConstInheritance1.types index 3e80860905016..407a32a6f4180 100644 --- a/tests/baselines/reference/overloadOnConstInheritance1.types +++ b/tests/baselines/reference/overloadOnConstInheritance1.types @@ -3,26 +3,26 @@ === overloadOnConstInheritance1.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "bar"): string; } +>addEventListener : { (x: string): any; (x: 'bar'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'bar'): string; ->addEventListener : { (x: string): any; (x: "bar"): string; } +>addEventListener : { (x: string): any; (x: 'bar'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance2.types b/tests/baselines/reference/overloadOnConstInheritance2.types index 844822f06ef40..8ddb696cfeee8 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.types +++ b/tests/baselines/reference/overloadOnConstInheritance2.types @@ -3,20 +3,20 @@ === overloadOnConstInheritance2.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ->addEventListener : (x: "bar") => string +>addEventListener : (x: 'bar') => string > : ^ ^^ ^^^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance3.types b/tests/baselines/reference/overloadOnConstInheritance3.types index 3ea531168275a..2d748590e5939 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.types +++ b/tests/baselines/reference/overloadOnConstInheritance3.types @@ -11,13 +11,13 @@ interface Base { interface Deriver extends Base { // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ->addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance4.types b/tests/baselines/reference/overloadOnConstInheritance4.types index f02d2e8a8f6a8..5ae4d5963d2b2 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.types +++ b/tests/baselines/reference/overloadOnConstInheritance4.types @@ -3,11 +3,11 @@ === overloadOnConstInheritance4.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -17,21 +17,21 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: 'hi') => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types index dfdb13723b2b8..f802972283fb7 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoAnyImplementation.ts === function x1(a: number, cb: (x: 'hi') => number); ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x1(a: number, cb: (x: 'bye') => number); ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "bye") => number +>cb : (x: 'bye') => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x1(a: number, cb: (x: string) => number) { ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -93,7 +93,7 @@ var cb: (number) => number = (x: number) => 1; x1(1, cb); >x1(1, cb) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -103,11 +103,11 @@ x1(1, cb); x1(1, (x: 'hi') => 1); // error >x1(1, (x: 'hi') => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: "hi") => number +>(x: 'hi') => 1 : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -117,7 +117,7 @@ x1(1, (x: 'hi') => 1); // error x1(1, (x: string) => 1); >x1(1, (x: string) => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index 87780c965b643..865419d536ba1 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,6 +1,6 @@ overloadOnConstNoAnyImplementation2.ts(6,5): error TS2394: This overload signature is not compatible with its implementation signature. overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. Types of parameters 'x' and 'x' are incompatible. Type '"hi"' is not assignable to type '"bye"'. overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. @@ -33,7 +33,7 @@ overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: Argument of type '(x c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. !!! error TS2345: Types of parameters 'x' and 'x' are incompatible. !!! error TS2345: Type '"hi"' is not assignable to type '"bye"'. !!! related TS2793 overloadOnConstNoAnyImplementation2.ts:7:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types index f0950110a396e..99b827bfa5ae9 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoAnyImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: string) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: "bye") => number +>(x: 'bye') => { return 1; } : (x: 'bye') => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x) => { return 1; } ); >c.x1(1, (x) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types index 30b541a53b46f..482141bac98d2 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types @@ -6,13 +6,13 @@ class C { > : ^ x1(a: 'hi'); // error, no non-specialized signature in overload list ->x1 : (a: "hi") => any +>x1 : (a: 'hi') => any > : ^ ^^ ^^^^^^^^ >a : "hi" > : ^^^^ x1(a: string) { } ->x1 : (a: "hi") => any +>x1 : (a: 'hi') => any > : ^ ^^ ^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.types b/tests/baselines/reference/overloadOnConstNoStringImplementation.types index b377838889555..aacbb53a4d534 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoStringImplementation.ts === function x2(a: number, cb: (x: 'hi') => number); ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x2(a: number, cb: (x: 'bye') => number); ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "bye") => number +>cb : (x: 'bye') => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x2(a: number, cb: (x: any) => number) { ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -90,7 +90,7 @@ var cb: (number) => number = (x: number) => 1; x2(1, cb); // error >x2(1, cb) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -99,11 +99,11 @@ x2(1, cb); // error x2(1, (x: 'hi') => 1); // error >x2(1, (x: 'hi') => 1) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: "hi") => number +>(x: 'hi') => 1 : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -112,7 +112,7 @@ x2(1, (x: 'hi') => 1); // error x2(1, (x: string) => 1); >x2(1, (x: string) => 1) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt index 89bfe17952419..8b8459673d601 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt @@ -1,4 +1,4 @@ -overloadOnConstNoStringImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +overloadOnConstNoStringImplementation2.ts(18,9): error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. Types of parameters 'x' and 'x' are incompatible. Type '"hi"' is not assignable to type '"bye"'. overloadOnConstNoStringImplementation2.ts(20,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. @@ -26,7 +26,7 @@ overloadOnConstNoStringImplementation2.ts(20,9): error TS2345: Argument of type c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. !!! error TS2345: Types of parameters 'x' and 'x' are incompatible. !!! error TS2345: Type '"hi"' is not assignable to type '"bye"'. !!! related TS2793 overloadOnConstNoStringImplementation2.ts:7:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types index c8994bf9cab05..c0c3a229b3b8b 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoStringImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: "bye") => number +>(x: 'bye') => { return 1; } : (x: 'bye') => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x: string) => { return 1; } ); >c.x1(1, (x: string) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadingOnConstants1.types b/tests/baselines/reference/overloadingOnConstants1.types index d5eaa38fcc370..612f46aca3313 100644 --- a/tests/baselines/reference/overloadingOnConstants1.types +++ b/tests/baselines/reference/overloadingOnConstants1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface Document2 { createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName: string): Base; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ @@ -67,11 +67,11 @@ var htmlElement: Base = d2.createElement("yo") > : ^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -81,11 +81,11 @@ var htmlCanvasElement: Derived1 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -95,11 +95,11 @@ var htmlDivElement: Derived2 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -109,11 +109,11 @@ var htmlSpanElement: Derived3 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ @@ -124,11 +124,11 @@ var htmlElement2: Derived1 = d2.createElement("yo") > : ^^^^^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -138,11 +138,11 @@ var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -152,11 +152,11 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -166,11 +166,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.types b/tests/baselines/reference/overloadingOnConstantsInImplementation.types index 2eb49001e50ca..3fdc703d97080 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.types +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.types @@ -2,7 +2,7 @@ === overloadingOnConstantsInImplementation.ts === function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,7 +18,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: any) { ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ diff --git a/tests/baselines/reference/override2.types b/tests/baselines/reference/override2.types index f2a2b4edf5337..b8e7ee2044a72 100644 --- a/tests/baselines/reference/override2.types +++ b/tests/baselines/reference/override2.types @@ -39,7 +39,7 @@ abstract class AD2 extends AB { > : ^^ abstract foo(v: ''): void // need override? ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -52,7 +52,7 @@ abstract class AD3 extends AB { > : ^^ override foo(v: ''): void { } // need override? ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -73,13 +73,13 @@ class D4 extends AB { > : ^^ override foo(v: ''): void {} ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ override bar(v: ''): void {} ->bar : (v: "") => void +>bar : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ diff --git a/tests/baselines/reference/parserOverloadOnConstants1.types b/tests/baselines/reference/parserOverloadOnConstants1.types index 72d6b1b2091bd..54418697b92be 100644 --- a/tests/baselines/reference/parserOverloadOnConstants1.types +++ b/tests/baselines/reference/parserOverloadOnConstants1.types @@ -3,25 +3,25 @@ === parserOverloadOnConstants1.ts === interface Document { createElement(tagName: string): HTMLElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): HTMLCanvasElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): HTMLDivElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): HTMLSpanElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.types b/tests/baselines/reference/primtiveTypesAreIdentical.types index f91168e1076aa..cf93aa6e470c2 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.types +++ b/tests/baselines/reference/primtiveTypesAreIdentical.types @@ -70,25 +70,25 @@ function foo4(x: any) { } >x : any function foo5(x: 'a'); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: 'a'); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: string); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo5(x: any) { } ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.types b/tests/baselines/reference/ramdaToolsNoInfinite2.types index e4734af9f8f8c..ad503a024bd31 100644 --- a/tests/baselines/reference/ramdaToolsNoInfinite2.types +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.types @@ -562,7 +562,7 @@ declare module "Number/_Internal" { > : ^^^^^^^ 'string': { ->'string' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'string' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; @@ -583,7 +583,7 @@ declare module "Number/_Internal" { }; 'number': { ->'number' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'number' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index f09267bc93ba3..e669804e7a715 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -547,7 +547,7 @@ type Enumerate = number extends N : never; function foo2(value: T): Enumerate { ->foo2 : (value: T) => Enumerate +>foo2 : (value: T) => Enumerate > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : T > : ^ diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.types b/tests/baselines/reference/specializedOverloadWithRestParameters.types index a4ee8a63e0ca4..ee70c4e919684 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.types +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.types @@ -16,7 +16,7 @@ class Derived1 extends Base { bar() { } } > : ^^^^^^^^^^ function f(tagName: 'span', ...args): Derived1; // error ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -24,7 +24,7 @@ function f(tagName: 'span', ...args): Derived1; // error > : ^^^^^ function f(tagName: number, ...args): Base; ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ @@ -32,28 +32,28 @@ function f(tagName: number, ...args): Base; > : ^^^^^ function f(tagName: any): Base { ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : any return null; } function g(tagName: 'span', arg): Derived1; // error ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ >arg : any function g(tagName: number, arg): Base; ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ >arg : any function g(tagName: any): Base { ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt index 234f36b61c230..bdd5f681c2c5e 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -7,7 +7,7 @@ specializedSignatureAsCallbackParameter1.ts(7,1): error TS2769: No overload matc Argument of type 'number' is not assignable to parameter of type 'string'. specializedSignatureAsCallbackParameter1.ts(8,1): error TS2769: No overload matches this call. Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. - Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. + Argument of type '(x: 'hm') => number' is not assignable to parameter of type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type '"hm"'. Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. @@ -34,7 +34,7 @@ specializedSignatureAsCallbackParameter1.ts(8,1): error TS2769: No overload matc ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. -!!! error TS2769: Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. +!!! error TS2769: Argument of type '(x: 'hm') => number' is not assignable to parameter of type '(x: number) => number'. !!! error TS2769: Types of parameters 'x' and 'x' are incompatible. !!! error TS2769: Type 'number' is not assignable to type '"hm"'. !!! error TS2769: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types index 4db6bb86a7213..a91828852cf55 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types @@ -61,7 +61,7 @@ x3(1, (x: 'hm') => 1); > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hm') => 1 : (x: "hm") => number +>(x: 'hm') => 1 : (x: 'hm') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hm" > : ^^^^ diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types index d92de312d36f7..f97ef6b8a4054 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types @@ -2,13 +2,13 @@ === specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts === function foo(x: 'a'); ->foo : (x: "a") => any +>foo : (x: 'a') => any > : ^ ^^ ^^^^^^^^ >x : "a" > : ^^^ function foo(x: number) { } ->foo : (x: "a") => any +>foo : (x: 'a') => any > : ^ ^^ ^^^^^^^^ >x : number > : ^^^^^^ @@ -18,19 +18,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ foo(x: any) { } ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -41,19 +41,19 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -64,19 +64,19 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -92,13 +92,13 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -114,13 +114,13 @@ interface I2 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -136,20 +136,20 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: "a"): any; (x: number): any; foo(x: "a"): any; foo(x: number): any; } +>a : { (x: 'a'): any; (x: number): any; foo(x: 'a'): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -161,20 +161,20 @@ var a: { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } +>a2 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -186,20 +186,20 @@ var a2: { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } +>a3 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -211,13 +211,13 @@ var a3: { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index 98480b9816223..811fe6a98a2df 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -5,19 +5,19 @@ // All the below should not be errors function foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo(x: string); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -26,19 +26,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -48,25 +48,25 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -76,25 +76,25 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -113,19 +113,19 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: number); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -145,19 +145,19 @@ interface I2 { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -177,26 +177,26 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: string): any; (x: "a"): any; (x: number): any; foo(x: string): any; foo(x: "a"): any; foo(x: number): any; } +>a : { (x: string): any; (x: 'a'): any; (x: number): any; foo(x: string): any; foo(x: 'a'): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: string); @@ -212,26 +212,26 @@ var a: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: "a"): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } +>a2 : { (x: 'a'): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -247,26 +247,26 @@ var a2: { > : ^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: "a"): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } +>a3 : { (x: 'a'): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -282,19 +282,19 @@ var a3: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types index 500f68537fdb4..ed49beceb1831 100644 --- a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types +++ b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types @@ -22,7 +22,7 @@ call(function* (a: 'a') { }); // error, 2nd argument required > : ^^^ >call : any>(fn: Fn, ...args: Parameters) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^ ->function* (a: 'a') { } : (a: "a") => {} +>function* (a: 'a') { } : (a: 'a') => {} > : ^ ^^ ^^^^^^^ >a : "a" > : ^^^ diff --git a/tests/baselines/reference/spreadsAndContextualTupleTypes.types b/tests/baselines/reference/spreadsAndContextualTupleTypes.types index a7e2d9aec9a77..a9b82f240dbad 100644 --- a/tests/baselines/reference/spreadsAndContextualTupleTypes.types +++ b/tests/baselines/reference/spreadsAndContextualTupleTypes.types @@ -2,13 +2,13 @@ === spreadsAndContextualTupleTypes.ts === declare function fx1(x: T): T; ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ declare function fx2(x: T): T; ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ @@ -30,7 +30,7 @@ const t3 = ['x', 'y', 'z'] as const; fx1(['x', 'y', 'z', 'a']); >fx1(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ fx1(['x', 'y', 'z', 'a']); fx1([...t3, 'a']); >fx1([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ fx1([...t3, 'a']); fx2(['x', 'y', 'z', 'a']); >fx2(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ fx2(['x', 'y', 'z', 'a']); fx2([...t3, 'a']); >fx2([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/spuriousCircularityOnTypeImport.types b/tests/baselines/reference/spuriousCircularityOnTypeImport.types index 8816b1f1904ab..375666708ce4e 100644 --- a/tests/baselines/reference/spuriousCircularityOnTypeImport.types +++ b/tests/baselines/reference/spuriousCircularityOnTypeImport.types @@ -21,11 +21,11 @@ export type SelectorMap unkno }; export declare const value2: { ->value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } +>value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } > : ^^^^^^^^^^^^^^^^^^ ^^^ sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters }; ->sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } +>sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >selectorsBySlice : FuncMap > : ^^^^^^^ diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index c6182b8e834c1..fb51e3e2459f4 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -660,13 +660,13 @@ declare function doesValueAtDeepPathSatisfy< type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; >Foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ >a : number | undefined > : ^^^^^^^^^^^^^^^^^^ ->value : { type: "B"; } +>value : { type: 'B'; } > : ^^^^^^^^ ^^^ >type : "B" > : ^^^ @@ -674,13 +674,13 @@ type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; > : ^^^^^^^^^^^^^^^^^^ declare function isA(arg: unknown): arg is 'A'; ->isA : (arg: unknown) => arg is "A" +>isA : (arg: unknown) => arg is 'A' > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ declare function isB(arg: unknown): arg is 'B'; ->isB : (arg: unknown) => arg is "B" +>isB : (arg: unknown) => arg is 'B' > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ @@ -692,11 +692,11 @@ declare function assert(condition: boolean): asserts condition; > : ^^^^^^^ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { ->test1 : (foo: Foo) => { value: { type: "A"; }; a?: number; } +>test1 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -720,20 +720,20 @@ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isA : (arg: unknown) => arg is "A" +>isA : (arg: unknown) => arg is 'A' > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: "A"; }; a?: number; } +>foo : { value: { type: 'A'; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } function test2(foo: Foo): {value: {type: 'A'}; a?: number} { ->test2 : (foo: Foo) => { value: { type: "A"; }; a?: number; } +>test2 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -759,11 +759,11 @@ function test2(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isB : (arg: unknown) => arg is "B" +>isB : (arg: unknown) => arg is 'B' > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: "A"; }; a?: number; } +>foo : { value: { type: 'A'; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } diff --git a/tests/baselines/reference/stringLiteralType.types b/tests/baselines/reference/stringLiteralType.types index 6d11b3fc86748..4f43fe8babce8 100644 --- a/tests/baselines/reference/stringLiteralType.types +++ b/tests/baselines/reference/stringLiteralType.types @@ -6,19 +6,19 @@ var x: 'hi'; > : ^^^^ function f(x: 'hi'); ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ function f(x: string); ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f(x: any) { ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types index 1e85210806b21..cdc5dafc4972b 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types @@ -5,157 +5,157 @@ // ok function f1(x: 'a'); ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f1(x: string); ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f1(x: string) { } ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ // ok function f2(x: 'a'); ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f2(x: any); ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f2(x: any) { } ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any // errors function f3(x: 'a'); ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f3(x: Object); ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Object > : ^^^^^^ function f3(x: any) { } ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f4(x: 'a'); ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f4(x: {}); ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : {} > : ^^ function f4(x: any) { } ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f5(x: 'a'); ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f5(x: number); ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ function f5(x: any) { } ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f6(x: 'a'); ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f6(x: boolean); ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : boolean > : ^^^^^^^ function f6(x: any) { } ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f7(x: 'a'); ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f7(x: Date); ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Date > : ^^^^ function f7(x: any) { } ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f8(x: 'a'); ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f8(x: RegExp); ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : RegExp > : ^^^^^^ function f8(x: any) { } ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f9(x: 'a'); ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f9(x: () => {}); ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : () => {} > : ^^^^^^ function f9(x: any) { } ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -289,19 +289,19 @@ class C implements String { // BUG 831846 function f10(x: 'a'); ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f10(x: C); ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : C > : ^ function f10(x: any) { } ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -313,53 +313,53 @@ interface I extends String { // BUG 831846 function f11(x: 'a'); ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f11(x: I); ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : I > : ^ function f11(x: any) { } ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f12(x: 'a'); ->f12 : { (x: "a"): any; (x: T_1): any; } +>f12 : { (x: 'a'): any; (x: T_1): any; } > : ^^^ ^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f12(x: T); ->f12 : { (x: "a"): any; (x: T): any; } +>f12 : { (x: 'a'): any; (x: T): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f12(x: any) { } ->f12 : { (x: "a"): any; (x: T_1): any; } +>f12 : { (x: 'a'): any; (x: T_1): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f13(x: 'a'); ->f13 : { (x: "a"): any; (x: T_1): any; } +>f13 : { (x: 'a'): any; (x: T_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f13(x: T); ->f13 : { (x: "a"): any; (x: T): any; } +>f13 : { (x: 'a'): any; (x: T): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f13(x: any) { } ->f13 : { (x: "a"): any; (x: T_1): any; } +>f13 : { (x: 'a'): any; (x: T_1): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any @@ -370,53 +370,53 @@ enum E { A } > : ^^^ function f14(x: 'a'); ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f14(x: E); ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : E > : ^ function f14(x: any) { } ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f15(x: 'a'); ->f15 : { (x: "a"): any; (x: U_1): any; } +>f15 : { (x: 'a'): any; (x: U_1): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f15(x: U); ->f15 : { (x: "a"): any; (x: U): any; } +>f15 : { (x: 'a'): any; (x: U): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f15(x: any) { } ->f15 : { (x: "a"): any; (x: U_1): any; } +>f15 : { (x: 'a'): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any function f16(x: 'a'); ->f16 : { (x: "a"): any; (x: U_1): any; } +>f16 : { (x: 'a'): any; (x: U_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f16(x: U); ->f16 : { (x: "a"): any; (x: U): any; } +>f16 : { (x: 'a'): any; (x: U): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f16(x: any) { } ->f16 : { (x: "a"): any; (x: U_1): any; } +>f16 : { (x: 'a'): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types index 4c24f9783e035..a6e077ec3da87 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types @@ -4,25 +4,25 @@ // String literal types are only valid in overload signatures function foo(x: 'hi') { } ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f = function foo(x: 'hi') { } ->f : (x: "hi") => void +>f : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->function foo(x: 'hi') { } : (x: "hi") => void +>function foo(x: 'hi') { } : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f2 = (x: 'hi', y: 'hi') => { } ->f2 : (x: "hi", y: "hi") => void +>f2 : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(x: 'hi', y: 'hi') => { } : (x: "hi", y: "hi") => void +>(x: 'hi', y: 'hi') => { } : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -34,7 +34,7 @@ class C { > : ^ foo(x: 'hi') { } ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -46,7 +46,7 @@ interface I { > : ^^^^ foo(x: 'hi', y: 'hi'); ->foo : (x: "hi", y: "hi") => any +>foo : (x: 'hi', y: 'hi') => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ @@ -55,7 +55,7 @@ interface I { } var a: { ->a : { (x: "hi"): any; foo(x: "hi"): any; } +>a : { (x: 'hi'): any; foo(x: 'hi'): any; } > : ^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -63,30 +63,30 @@ var a: { > : ^^^^ foo(x: 'hi'); ->foo : (x: "hi") => any +>foo : (x: 'hi') => any > : ^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ } var b = { ->b : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } +>b : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ->{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } +>{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ foo(x: 'hi') { }, ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ a: function foo(x: 'hi', y: 'hi') { }, ->a : (x: "hi", y: "hi") => void +>a : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->function foo(x: 'hi', y: 'hi') { } : (x: "hi", y: "hi") => void +>function foo(x: 'hi', y: 'hi') { } : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->foo : (x: "hi", y: "hi") => void +>foo : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -94,9 +94,9 @@ var b = { > : ^^^^ b: (x: 'hi') => { } ->b : (x: "hi") => void +>b : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->(x: 'hi') => { } : (x: "hi") => void +>(x: 'hi') => { } : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types index 08407874e06f9..620c731e76782 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types @@ -42,7 +42,7 @@ interface I { > : ^^^^ foo(x: 'a', y: 'a'); ->foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } +>foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ @@ -50,7 +50,7 @@ interface I { > : ^^^ foo(x: 'hi', y: 'hi'); ->foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } +>foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -59,7 +59,7 @@ interface I { } var a: { ->a : { (x: "hi"): any; (x: "a"): any; foo(x: "hi"): any; foo(x: "a"): any; } +>a : { (x: 'hi'): any; (x: 'a'): any; foo(x: 'hi'): any; foo(x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -71,32 +71,32 @@ var a: { > : ^^^ foo(x: 'hi'); ->foo : { (x: "hi"): any; (x: "a"): any; } +>foo : { (x: 'hi'): any; (x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a'); ->foo : { (x: "hi"): any; (x: "a"): any; } +>foo : { (x: 'hi'): any; (x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ } var b = { ->b : { foo(x: "hi"): void; foo(x: "a"): void; } +>b : { foo(x: 'hi'): void; foo(x: 'a'): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ ->{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: "hi"): void; foo(x: "a"): void; } +>{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: 'hi'): void; foo(x: 'a'): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ foo(x: 'hi') { }, ->foo : { (x: "hi"): void; (x: "a"): void; } +>foo : { (x: 'hi'): void; (x: 'a'): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a') { }, ->foo : { (x: "hi"): void; (x: "a"): void; } +>foo : { (x: 'hi'): void; (x: 'a'): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "a" > : ^^^ diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types index 998b51c20d623..d833f4e51bea8 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { (x: "a"): void; (x: string): void; } +>a : { (x: 'a'): void; (x: string): void; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { (x: "a", y: number): void; (x: string, y: number): void; } +>a2 : { (x: 'a', y: number): void; (x: string, y: number): void; } > : ^^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { (x: "a"): number; (x: string): number; } +>a : { (x: 'a'): number; (x: string): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): number; diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types index 3a9928b1f7bd1..ce47939fc27f2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { new (x: "a"): void; new (x: string): void; } +>a : { new (x: 'a'): void; new (x: string): void; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { new (x: "a", y: number): void; new (x: string, y: number): void; } +>a2 : { new (x: 'a', y: number): void; new (x: string, y: number): void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ new (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { new (x: "a"): number; new (x: string): number; } +>a : { new (x: 'a'): number; new (x: string): number; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): number; diff --git a/tests/baselines/reference/switchWithConstrainedTypeVariable.types b/tests/baselines/reference/switchWithConstrainedTypeVariable.types index 478e1899b3203..9966ce9f55d16 100644 --- a/tests/baselines/reference/switchWithConstrainedTypeVariable.types +++ b/tests/baselines/reference/switchWithConstrainedTypeVariable.types @@ -4,7 +4,7 @@ // Repro from #20840 function function1(key: T) { ->function1 : (key: T) => void +>function1 : (key: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >key : T > : ^ diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index d29f030fcae67..0a58babc5438a 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -108,7 +108,7 @@ type TCA2 = Cases<'BAR'>; // 'BAR bar BAR bAR' // Assignability function test(name: `get${Capitalize}`) { ->test : (name: `get${Capitalize}`) => void +>test : (name: `get${Capitalize}`) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >name : `get${Capitalize}` > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes2.types b/tests/baselines/reference/templateLiteralTypes2.types index aa664dda40406..2284ad7fc3668 100644 --- a/tests/baselines/reference/templateLiteralTypes2.types +++ b/tests/baselines/reference/templateLiteralTypes2.types @@ -2,7 +2,7 @@ === templateLiteralTypes2.ts === function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { ->ft1 : (s: string, n: number, u: "foo" | "bar" | "baz", t: T) => void +>ft1 : (s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >s : string > : ^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes3.types b/tests/baselines/reference/templateLiteralTypes3.types index 655a8cee04933..6c3c219b092b5 100644 --- a/tests/baselines/reference/templateLiteralTypes3.types +++ b/tests/baselines/reference/templateLiteralTypes3.types @@ -677,7 +677,7 @@ function ff2(x: `foo-${T}`, y: `${T}-bar`, z: `baz-${T}`) { } function ff3(x: string, y: `foo-${string}` | 'bar') { ->ff3 : (x: string, y: `foo-${string}` | "bar") => void +>ff3 : (x: string, y: `foo-${string}` | 'bar') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ diff --git a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js index 4ccbf914e5dfe..b0a234b450abd 100644 --- a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js +++ b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js @@ -216,12 +216,12 @@ var nominal_1 = require("../common/nominal"); //// [/home/src/workspaces/lib/sub-project/index.d.ts] -export type MyNominal = Nominal; +export type MyNominal = Nominal; import { Nominal } from '../common/nominal'; //// [/home/src/workspaces/lib/sub-project/tsconfig.tsbuildinfo] -{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../common/nominal.d.ts","../../solution/sub-project/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n",{"version":"-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n","signature":"-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n"}],"root":[3],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../solution","skipLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":9,"length":7,"messageText":"'Nominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../common/nominal\").Nominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../common/nominal.d.ts","../../solution/sub-project/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n",{"version":"-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n","signature":"-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n"}],"root":[3],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../solution","skipLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":9,"length":7,"messageText":"'Nominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../common/nominal\").Nominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/lib/sub-project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -252,10 +252,10 @@ import { Nominal } from '../common/nominal'; "../../solution/sub-project/index.js": { "original": { "version": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n", - "signature": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" + "signature": "-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" }, "version": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n", - "signature": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" + "signature": "-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" } }, "root": [ @@ -294,7 +294,7 @@ import { Nominal } from '../common/nominal'; ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1670 + "size": 1667 } //// [/home/src/workspaces/lib/sub-project-2/index.js] @@ -326,7 +326,7 @@ export {}; //// [/home/src/workspaces/lib/sub-project-2/tsconfig.tsbuildinfo] -{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../solution/sub-project-2/index.js"],"fileIdsList":[[2],[3]],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n","-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n",{"version":"9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n","signature":"33013066229-/**\n * @return {keyof typeof variable}\n */\nexport function getVar(): keyof typeof variable;\ndeclare namespace variable {\n let key: MyNominal;\n}\nimport { MyNominal } from '../sub-project/index';\nexport {};\n"}],"root":[4],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../solution","skipLibCheck":true},"referencedMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[[4,[{"start":9,"length":9,"messageText":"'MyNominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../sub-project/index\").MyNominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../solution/sub-project-2/index.js"],"fileIdsList":[[2],[3]],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n","-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n",{"version":"9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n","signature":"33013066229-/**\n * @return {keyof typeof variable}\n */\nexport function getVar(): keyof typeof variable;\ndeclare namespace variable {\n let key: MyNominal;\n}\nimport { MyNominal } from '../sub-project/index';\nexport {};\n"}],"root":[4],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../solution","skipLibCheck":true},"referencedMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[[4,[{"start":9,"length":9,"messageText":"'MyNominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../sub-project/index\").MyNominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/lib/sub-project-2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -359,8 +359,8 @@ export {}; "signature": "-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n" }, "../sub-project/index.d.ts": { - "version": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n", - "signature": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" + "version": "-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n", + "signature": "-6655808763-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" }, "../../solution/sub-project-2/index.js": { "original": { @@ -410,7 +410,7 @@ export {}; ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 2055 + "size": 2052 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js b/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js index fa310f31caeb5..c1e9f3ee91bb5 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js @@ -155,7 +155,7 @@ packages/b/index.js //// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* //// [/home/src/workspaces/project/packages/a/types/index.d.ts] -export const a: "a"; +export const a: 'a'; //// [/home/src/workspaces/project/packages/a/types/test/index.d.ts] @@ -163,7 +163,7 @@ export {}; //// [/home/src/workspaces/project/packages/a/types/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../tslibs/ts/lib/lib.esnext.full.d.ts","../index.js","../test/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-15642581130-export const a = 'a';","signature":"-13259723213-export const a: \"a\";\n","impliedFormat":99},{"version":"-3920874422-import 'a';","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[2,3],"options":{"checkJs":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"module":199,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./test/index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../tslibs/ts/lib/lib.esnext.full.d.ts","../index.js","../test/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-15642581130-export const a = 'a';","signature":"-13253788163-export const a: 'a';\n","impliedFormat":99},{"version":"-3920874422-import 'a';","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[2,3],"options":{"checkJs":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"module":199,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./test/index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/project/packages/a/types/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -192,11 +192,11 @@ export {}; "../index.js": { "original": { "version": "-15642581130-export const a = 'a';", - "signature": "-13259723213-export const a: \"a\";\n", + "signature": "-13253788163-export const a: 'a';\n", "impliedFormat": 99 }, "version": "-15642581130-export const a = 'a';", - "signature": "-13259723213-export const a: \"a\";\n", + "signature": "-13253788163-export const a: 'a';\n", "impliedFormat": "esnext" }, "../test/index.js": { @@ -235,7 +235,7 @@ export {}; }, "latestChangedDtsFile": "./test/index.d.ts", "version": "FakeTSVersion", - "size": 1070 + "size": 1068 } //// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js b/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js index f101000471bf2..9d867788396b6 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js @@ -123,7 +123,7 @@ packages/a/test/index.js //// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* //// [/home/src/workspaces/project/packages/a/types/index.d.ts] -export const a: "a"; +export const a: 'a'; //// [/home/src/workspaces/project/packages/a/types/test/index.d.ts] @@ -131,7 +131,7 @@ export {}; //// [/home/src/workspaces/project/packages/a/types/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../tslibs/ts/lib/lib.esnext.full.d.ts","../index.js","../test/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-15642581130-export const a = 'a';","signature":"-13259723213-export const a: \"a\";\n","impliedFormat":99},{"version":"-3920874422-import 'a';","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[2,3],"options":{"checkJs":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"module":199,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./test/index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../tslibs/ts/lib/lib.esnext.full.d.ts","../index.js","../test/index.js"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-15642581130-export const a = 'a';","signature":"-13253788163-export const a: 'a';\n","impliedFormat":99},{"version":"-3920874422-import 'a';","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[2,3],"options":{"checkJs":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"module":199,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./test/index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/project/packages/a/types/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -160,11 +160,11 @@ export {}; "../index.js": { "original": { "version": "-15642581130-export const a = 'a';", - "signature": "-13259723213-export const a: \"a\";\n", + "signature": "-13253788163-export const a: 'a';\n", "impliedFormat": 99 }, "version": "-15642581130-export const a = 'a';", - "signature": "-13259723213-export const a: \"a\";\n", + "signature": "-13253788163-export const a: 'a';\n", "impliedFormat": "esnext" }, "../test/index.js": { @@ -203,7 +203,7 @@ export {}; }, "latestChangedDtsFile": "./test/index.d.ts", "version": "FakeTSVersion", - "size": 1070 + "size": 1068 } diff --git a/tests/baselines/reference/typeGuardFunctionErrors.types b/tests/baselines/reference/typeGuardFunctionErrors.types index 7fda3c139ac01..1357201b363b3 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.types +++ b/tests/baselines/reference/typeGuardFunctionErrors.types @@ -509,7 +509,7 @@ type KeySet = { [k in T]: true } // expected an error, since Keys doesn't have a 'd' declare function hasKey(x: KeySet): x is KeySet; ->hasKey : (x: KeySet) => x is KeySet +>hasKey : (x: KeySet) => x is KeySet > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : KeySet > : ^^^^^^^^^ diff --git a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types index f88113a869107..220c044cbb496 100644 --- a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types @@ -3,7 +3,7 @@ === typePredicatesCanNarrowByDiscriminant.ts === // #45770 declare const fruit: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -27,7 +27,7 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >fruit.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,18 +43,18 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { fruit.kind >fruit.kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ fruit ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } declare const fruit2: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -68,7 +68,7 @@ const kind = fruit2.kind; > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -92,12 +92,12 @@ if (isOneOf(kind, ['apple', 'banana'] as const)) { fruit2.kind >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fruit2 ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/typeTagOnPropertyAssignment.types b/tests/baselines/reference/typeTagOnPropertyAssignment.types index 4e631da68bad1..8316bffcdbb7b 100644 --- a/tests/baselines/reference/typeTagOnPropertyAssignment.types +++ b/tests/baselines/reference/typeTagOnPropertyAssignment.types @@ -2,9 +2,9 @@ === typeTagOnPropertyAssignment.js === const o = { ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ ->{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => "b"; } +>{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ /** @@ -18,9 +18,9 @@ const o = { /** @type {() => 'b'} */ n: () => 'b' ->n : () => "b" +>n : () => 'b' > : ^^^^^^ ->() => 'b' : () => "b" +>() => 'b' : () => 'b' > : ^^^^^^ >'b' : "b" > : ^^^ @@ -29,16 +29,16 @@ const o = { o.a >o.a : "a" > : ^^^ ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ >a : "a" > : ^^^ o.n ->o.n : () => "b" +>o.n : () => 'b' > : ^^^^^^ ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ ->n : () => "b" +>n : () => 'b' > : ^^^^^^ diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 0bf67da2f7f16..5a44554b69412 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -331,7 +331,7 @@ const optionHandlers: OptionHandlers = { }; function handleOption(option: Options & { kind: K }): string { ->handleOption : (option: Options & { kind: K; }) => string +>handleOption : (option: Options & { kind: K; }) => string > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >option : Options & { kind: K; } > : ^^^^^^^^^^^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/typedefMultipleTypeParameters.types b/tests/baselines/reference/typedefMultipleTypeParameters.types index bde3ca598caf7..86c5c22b5088a 100644 --- a/tests/baselines/reference/typedefMultipleTypeParameters.types +++ b/tests/baselines/reference/typedefMultipleTypeParameters.types @@ -11,7 +11,7 @@ /** @type {Everything<{ a: number, b: 'hi', c: never }, undefined, { c: true, d: 1 }, number, string>} */ var tuvwx; ->tuvwx : Everything<{ a: number; b: "hi"; c: never; }, undefined, { c: true; d: 1; }, number, string> +>tuvwx : Everything<{ a: number; b: 'hi'; c: never; }, undefined, { c: true; d: 1; }, number, string> > : ^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ /** @type {Everything<{ a: number }, undefined, { c: 1, d: 1 }, number, string>} */ diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.types b/tests/baselines/reference/typeofImportInstantiationExpression.types index 84dd63de703b9..e5acd4c163a70 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.types +++ b/tests/baselines/reference/typeofImportInstantiationExpression.types @@ -44,7 +44,7 @@ type T1 = typeof import('./input.js').myFunction; >myFunction : error type T2 = typeof import('./input.js').myFunction; ->T2 : (arg: Arg) => { slug: "hello"; } +>T2 : (arg: Arg) => { slug: 'hello'; } > : ^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ >myFunction : error >slug : "hello" diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.types b/tests/baselines/reference/typesWithSpecializedCallSignatures.types index 43f4a57540b46..94496c3d4f516 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.types @@ -30,25 +30,25 @@ class C { > : ^ foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ foo(x) { ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : any @@ -66,19 +66,19 @@ var c = new C(); interface I { foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -88,23 +88,23 @@ var i: I; > : ^ var a: { ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -120,11 +120,11 @@ c = i; > : ^ c = a; ->c = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>c = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ i = c; @@ -136,17 +136,17 @@ i = c; > : ^ i = a; ->i = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>i = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ a = c; >a = c : C > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ @@ -154,7 +154,7 @@ a = c; a = i; >a = i : I > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -164,11 +164,11 @@ var r1: Derived1 = c.foo('hi'); > : ^^^^^^^^ >c.foo('hi') : Derived1 > : ^^^^^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hi' : "hi" > : ^^^^ @@ -178,11 +178,11 @@ var r2: Derived2 = c.foo('bye'); > : ^^^^^^^^ >c.foo('bye') : Derived2 > : ^^^^^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'bye' : "bye" > : ^^^^^ @@ -192,11 +192,11 @@ var r3: Base = c.foo('hm'); > : ^^^^ >c.foo('hm') : Base > : ^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types index 567c0dd4d86ec..66c6c4ca3b84a 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types @@ -76,7 +76,7 @@ var i: I; > : ^ var a: { ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new(x: 'hi'): Derived1; @@ -102,25 +102,25 @@ c = i; > : ^ c = a; ->c = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>c = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ i = a; ->i = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>i = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ a = i; >a = i : I > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -150,7 +150,7 @@ var r3: Base = new a('hm'); > : ^^^^ >new a('hm') : Base > : ^^^^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types index 4d788cb55640e..38562f6fd984d 100644 --- a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types +++ b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types @@ -44,11 +44,11 @@ if (s.value !== undefined) { > : ^^^^^^^^^ s; ->s : { type: "string"; value: string; } | { type: "number"; value: number; } | { type: "unknown"; value: unknown; } +>s : { type: 'string'; value: string; } | { type: 'number'; value: number; } | { type: 'unknown'; value: unknown; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^ } else { s; ->s : { type: "unknown"; value: unknown; } | { value: undefined; } +>s : { type: 'unknown'; value: unknown; } | { value: undefined; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/unionTypeReduction2.types b/tests/baselines/reference/unionTypeReduction2.types index b8a7e348cddc1..7ae3492ad7ed7 100644 --- a/tests/baselines/reference/unionTypeReduction2.types +++ b/tests/baselines/reference/unionTypeReduction2.types @@ -194,21 +194,21 @@ function f4(x: (x: string | undefined) => void, y: (x?: string) => void) { } function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { ->f5 : (x: (x: string | undefined) => void, y: (x?: "hello") => void) => void +>f5 : (x: (x: string | undefined) => void, y: (x?: 'hello') => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ >x : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->y : (x?: "hello") => void +>y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x?: 'hello') => void ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ ->!!true ? x : y : (x?: "hello") => void +>!!true ? x : y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >!!true : true > : ^^^^ @@ -218,28 +218,28 @@ function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { > : ^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ ->y : (x?: "hello") => void +>y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ f(); >f() : void > : ^^^^ ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ } function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { ->f6 : (x: (x: "hello" | undefined) => void, y: (x?: string) => void) => void +>f6 : (x: (x: 'hello' | undefined) => void, y: (x?: string) => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->x : (x: "hello" | undefined) => void +>x : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -249,9 +249,9 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x: 'hello' | undefined) => void ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ ->!!true ? x : y : (x: "hello" | undefined) => void +>!!true ? x : y : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >!!true : true > : ^^^^ @@ -259,7 +259,7 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^ >true : true > : ^^^^ ->x : (x: "hello" | undefined) => void +>x : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >y : (x?: string) => void > : ^ ^^^ ^^^^^ @@ -267,13 +267,13 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { f(); // Error >f() : void > : ^^^^ ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ diff --git a/tests/cases/fourslash/completionForStringLiteral4.ts b/tests/cases/fourslash/completionForStringLiteral4.ts index 64f3ddeb9acaf..2056db8ad8b7f 100644 --- a/tests/cases/fourslash/completionForStringLiteral4.ts +++ b/tests/cases/fourslash/completionForStringLiteral4.ts @@ -15,7 +15,7 @@ goTo.marker('1'); verify.quickInfoExists(); -verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "other2", p4: "literal" | number, p5: 12 | true): string', 'I am documentation'); +verify.quickInfoIs("function f(p1: 'literal', p2: \"literal\", p3: 'other1' | 'other2', p4: 'literal' | number, p5: 12 | true): string", 'I am documentation'); const replacementSpan = test.ranges()[0] verify.completions({ marker: "2", exact: [ diff --git a/tests/cases/fourslash/overloadOnConstCallSignature.ts b/tests/cases/fourslash/overloadOnConstCallSignature.ts index 61ae8da97cc84..499fbf73087a8 100644 --- a/tests/cases/fourslash/overloadOnConstCallSignature.ts +++ b/tests/cases/fourslash/overloadOnConstCallSignature.ts @@ -12,8 +12,8 @@ verify.signatureHelp({ marker: "1", overloadsCount: 4, - text: 'foo(name: "order"): string', + text: "foo(name: 'order'): string", }) -edit.insert('"hi"'); +edit.insert("'hi'"); verify.quickInfoAt("2", "var x: string"); diff --git a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts index de06e2480c52d..04477812f3389 100644 --- a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts +++ b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts @@ -20,13 +20,13 @@ ////c.x1(1, (x/*10*/x) => { return 1; } ); verify.quickInfos({ - 1: "(method) I.x1(a: number, callback: (x: \"hi\") => number): any", - 2: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", - 3: "(parameter) callback: (x: \"hi\") => number", - 4: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", + 1: "(method) I.x1(a: number, callback: (x: 'hi') => number): any", + 2: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", + 3: "(parameter) callback: (x: 'hi') => number", + 4: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", 5: "(parameter) callback: (x: string) => number", 6: "(parameter) callback: (x: string) => number", - 7: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", + 7: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", 8: "(parameter) xx: \"hi\"", 9: "(parameter) xx: \"bye\"", 10: "(parameter) xx: \"hi\"" diff --git a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts index babc79c79d531..5d66c431528be 100644 --- a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts +++ b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts @@ -12,6 +12,6 @@ verify.signatureHelp( { marker: "1", overloadsCount: 3, parameterName: "z", parameterSpan: "z: string" }, - { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: 'x: "hi"' }, - { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: 'y: "bye"' }, + { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: "x: 'hi'" }, + { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: "y: 'bye'" }, ); From 275f6b919399b6738b15a34f22ca1b5c2c23adf1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 16 Dec 2024 18:32:04 +0000 Subject: [PATCH 2/5] Only preserve string delimiters if we print for declaration files. --- src/compiler/checker.ts | 5 +- src/compiler/transformers/declarations.ts | 3 +- src/compiler/types.ts | 2 + tests/baselines/reference/ambientErrors.types | 4 +- tests/baselines/reference/api/typescript.d.ts | 2 + ...signmentCompatWithDiscriminatedUnion.types | 2 +- ...ObjectMembersStringNumericNames.errors.txt | 48 ++--- .../callSignatureFunctionOverload.types | 4 +- .../callbackArgsDifferByOptionality.types | 8 +- .../reference/callbackCrossModule.types | 2 +- .../reference/checkJsdocTypeTag5.types | 4 +- .../reference/commonTypeIntersection.types | 12 +- ...onRegularTypeFetchingSpeedReasonable.types | 2 +- ...sistentAliasVsNonAliasRecordBehavior.types | 16 +- .../baselines/reference/constAssertions.types | 4 +- .../reference/constantOverloadFunction.types | 10 +- ...nstantOverloadFunctionNoSubtypeError.types | 10 +- ...eBasedOnIntersectionWithAnyInTheMix3.types | 2 +- .../contextualTypedSpecialAssignment.types | 8 +- ...ntextuallyTypedSymbolNamedProperties.types | 4 +- .../controlFlowAliasedDiscriminants.types | 4 +- .../reference/controlFlowAliasing.types | 192 +++++++++--------- .../reference/controlFlowGenericTypes.types | 6 +- .../reference/controlFlowOptionalChain.types | 6 +- .../reference/correlatedUnions.types | 2 +- .../declarationEmitAliasInlineing.types | 20 +- ...itCrossFileCopiedGeneratedImportType.types | 2 +- ...peDistributivityPreservesConstraints.types | 6 +- ...ppedTypePropertyFromNumericStringKey.types | 2 +- ...arationEmitResolveTypesIfNotReusable.types | 16 +- ...rationEmitTopLevelNodeFromCrossFile2.types | 2 +- .../declarationEmitUsingTypeAlias2.types | 4 +- .../deferredLookupTypeResolution.types | 2 +- .../dependentDestructuredVariables.types | 4 +- .../reference/dependentReturnType1.types | 6 +- .../reference/dependentReturnType2.types | 14 +- .../reference/dependentReturnType3.types | 14 +- .../destructuredDeclarationEmit.types | 10 +- .../destructuringParameterDeclaration8.types | 12 +- ...gParameterDeclaration9(strict=false).types | 2 +- ...riminableUnionWithIntersectedMembers.types | 4 +- .../reference/discriminantPropertyCheck.types | 4 +- .../reference/discriminatedUnionTypes2.types | 20 +- ...tyCheckIntersectionWithRecursiveType.types | 4 +- ...rdRefInTypeDeclaration(strict=false).types | 4 +- ...ardRefInTypeDeclaration(strict=true).types | 4 +- .../generatorReturnContextualType.types | 16 +- .../genericObjectSpreadResultInSwitch.types | 8 +- .../identityAndDivergentNormalizedTypes.types | 6 +- .../independentPropertyVariance.types | 4 +- .../indexedAccessTypeConstraints.types | 2 +- .../indexedAccessWithFreshObjectLiteral.types | 6 +- ...inferFromGenericFunctionReturnTypes3.types | 16 +- ...eOfNullableObjectTypesWithCommonBase.types | 4 +- ...nIncludingPropFromGlobalAugmentation.types | 2 +- ...sectionMemberOfUnionNarrowsCorrectly.types | 4 +- .../intersectionTypeNormalization.types | 4 +- .../baselines/reference/intrinsicTypes.types | 2 +- .../invariantGenericErrorElaboration.types | 2 +- .../jsDeclarationsUniqueSymbolUsage.types | 2 +- .../reference/jsFileFunctionOverloads.types | 2 +- .../reference/jsFileFunctionOverloads2.types | 2 +- .../reference/jsFileMethodOverloads.types | 2 +- .../reference/jsFileMethodOverloads2.types | 2 +- .../reference/jsdocBracelessTypeTag1.types | 4 +- tests/baselines/reference/jsdocLiteral.types | 2 +- tests/baselines/reference/jsdocThisType.types | 12 +- .../jsxIntrinsicElementsCompatability.types | 6 +- .../reference/keyofAndIndexedAccess.types | 16 +- .../reference/keyofAndIndexedAccess2.types | 8 +- .../logicalAssignment2(target=es2015).types | 88 ++++---- .../logicalAssignment2(target=es2020).types | 88 ++++---- .../logicalAssignment2(target=es2021).types | 88 ++++---- .../logicalAssignment2(target=esnext).types | 88 ++++---- .../reference/mappedTypeConstraints.types | 6 +- .../mappedTypeContextualTypesApplied.types | 8 +- .../mappedTypeGenericIndexedAccess.types | 6 +- .../reference/mappedTypeProperties.types | 2 +- .../memberFunctionsWithPrivateOverloads.types | 36 ++-- .../memberFunctionsWithPublicOverloads.types | 32 +-- ...rFunctionsWithPublicPrivateOverloads.types | 40 ++-- .../reference/moduleExportAssignment7.types | 4 +- ...essPropertyCheckFromContainedLiteral.types | 12 +- ...narrowExceptionVariableInCatchClause.types | 8 +- .../reference/narrowingByTypeofInSwitch.types | 2 +- .../narrowingTypeofDiscriminant.types | 16 +- .../reference/narrowingUnionToUnion.types | 38 ++-- .../reference/narrowingUnionWithBang.types | 56 ++--- .../nestedExcessPropertyChecking.types | 4 +- ...everAsDiscriminantType(strict=false).types | 4 +- ...neverAsDiscriminantType(strict=true).types | 4 +- ...iteralComputedNameNoDeclarationError.types | 6 +- .../overloadOnConstAsTypeAnnotation.types | 4 +- .../overloadOnConstConstraintChecks1.types | 18 +- .../overloadOnConstConstraintChecks2.types | 8 +- .../overloadOnConstConstraintChecks3.types | 8 +- .../overloadOnConstConstraintChecks4.types | 8 +- .../overloadOnConstDuplicateOverloads1.types | 14 +- ...InBaseWithBadImplementationInDerived.types | 8 +- .../overloadOnConstInCallback1.types | 6 +- ...ObjectLiteralImplementingAnInterface.types | 12 +- .../overloadOnConstInheritance1.types | 8 +- .../overloadOnConstInheritance2.types | 6 +- .../overloadOnConstInheritance3.types | 4 +- .../overloadOnConstInheritance4.types | 12 +- .../overloadOnConstNoAnyImplementation.types | 18 +- ...loadOnConstNoAnyImplementation2.errors.txt | 4 +- .../overloadOnConstNoAnyImplementation2.types | 30 +-- ...loadOnConstNoNonSpecializedSignature.types | 4 +- ...verloadOnConstNoStringImplementation.types | 18 +- ...dOnConstNoStringImplementation2.errors.txt | 4 +- ...erloadOnConstNoStringImplementation2.types | 30 +-- .../reference/overloadingOnConstants1.types | 40 ++-- ...erloadingOnConstantsInImplementation.types | 6 +- tests/baselines/reference/override2.types | 8 +- .../parserOverloadOnConstants1.types | 8 +- .../reference/primtiveTypesAreIdentical.types | 8 +- .../reference/ramdaToolsNoInfinite2.types | 4 +- .../reference/recursiveConditionalTypes.types | 2 +- ...pecializedOverloadWithRestParameters.types | 12 +- ...edSignatureAsCallbackParameter1.errors.txt | 4 +- ...ializedSignatureAsCallbackParameter1.types | 2 +- ...sNotSubtypeOfNonSpecializedSignature.types | 52 ++--- ...reIsSubtypeOfNonSpecializedSignature.types | 70 +++---- ...ramsFromGeneratorMakesRequiredParams.types | 2 +- .../spreadsAndContextualTupleTypes.types | 12 +- .../spuriousCircularityOnTypeImport.types | 4 +- .../reference/strictSubtypeAndNarrowing.types | 24 +-- .../reference/stringLiteralType.types | 6 +- .../stringLiteralTypeIsSubtypeOfString.types | 96 ++++----- ...teralTypesInImplementationSignatures.types | 36 ++-- ...eralTypesInImplementationSignatures2.types | 18 +- ...lSignaturesWithSpecializedSignatures.types | 6 +- ...tSignaturesWithSpecializedSignatures.types | 6 +- .../switchWithConstrainedTypeVariable.types | 2 +- .../reference/templateLiteralTypes1.types | 2 +- .../reference/templateLiteralTypes2.types | 2 +- .../reference/templateLiteralTypes3.types | 2 +- .../reference/typeGuardFunctionErrors.types | 2 +- ...ypePredicatesCanNarrowByDiscriminant.types | 16 +- .../typeTagOnPropertyAssignment.types | 16 +- .../typeVariableConstraintIntersections.types | 2 +- .../typedefMultipleTypeParameters.types | 2 +- .../typeofImportInstantiationExpression.types | 2 +- .../typesWithSpecializedCallSignatures.types | 46 ++--- ...esWithSpecializedConstructSignatures.types | 14 +- ...ntWithUnknown(strictnullchecks=true).types | 4 +- .../reference/unionTypeReduction2.types | 28 +-- .../fourslash/completionForStringLiteral4.ts | 2 +- .../fourslash/overloadOnConstCallSignature.ts | 4 +- .../fourslash/quickInfoForOverloadOnConst1.ts | 10 +- .../signatureHelpOnOverloadOnConst.ts | 4 +- 152 files changed, 1051 insertions(+), 1047 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7bc59b911ff24..cceabf482fa2e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -742,7 +742,6 @@ import { isStatic, isString, isStringANonContextualKeyword, - isStringDoubleQuoted, isStringLiteral, isStringLiteralLike, isStringOrNumericLiteralLike, @@ -6312,9 +6311,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function setTextRange(context: NodeBuilderContext, range: T, location: Node | undefined): T { const nodeSourceFile = getSourceFileOfNode(getOriginalNode(range)); if (!nodeIsSynthesized(range) || !(range.flags & NodeFlags.Synthesized) || !context.enclosingFile || context.enclosingFile !== nodeSourceFile) { - if (range.kind === SyntaxKind.StringLiteral) { + if (context.flags & NodeBuilderFlags.PreserveQuotesForStringLiteralType && range.kind === SyntaxKind.StringLiteral) { const stringLiteral = range as Node as StringLiteral; - range = factory.createStringLiteral(stringLiteral.text, !!nodeSourceFile && !isStringDoubleQuoted(stringLiteral, nodeSourceFile)) as Node as T; + range = factory.createStringLiteralFromNode(stringLiteral) as Node as T; } else { range = factory.cloneNode(range); // if `range` is synthesized or originates in another file, copy it so it definitely has synthetic positions diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 7c41bcccc3e7a..b454c52122af1 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -244,7 +244,8 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals NodeBuilderFlags.UseStructuralFallback | NodeBuilderFlags.AllowEmptyTuple | NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - NodeBuilderFlags.NoTruncation; + NodeBuilderFlags.NoTruncation | + NodeBuilderFlags.PreserveQuotesForStringLiteralType; const declarationEmitInternalNodeBuilderFlags = InternalNodeBuilderFlags.AllowUnresolvedNames; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 46ff57009e7fa..030936f8b2d25 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5490,6 +5490,7 @@ export const enum NodeBuilderFlags { OmitParameterModifiers = 1 << 13, // Omit modifiers on parameters UseAliasDefinedOutsideCurrentScope = 1 << 14, // Allow non-visible aliases UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type + PreserveQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type NoTypeReduction = 1 << 29, // Don't call getReducedType OmitThisParameter = 1 << 25, @@ -5544,6 +5545,7 @@ export const enum TypeFormatFlags { UseAliasDefinedOutsideCurrentScope = 1 << 14, // For a `type T = ... ` defined in a different file, write `T` instead of its value, even though `T` can't be accessed in the current scope. UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type + PreserveQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type NoTypeReduction = 1 << 29, // Don't call getReducedType OmitThisParameter = 1 << 25, diff --git a/tests/baselines/reference/ambientErrors.types b/tests/baselines/reference/ambientErrors.types index d8c2f8874d361..a6745844e6a5b 100644 --- a/tests/baselines/reference/ambientErrors.types +++ b/tests/baselines/reference/ambientErrors.types @@ -10,13 +10,13 @@ declare var x = 4; // Ambient functions with invalid overloads declare function fn(x: number): string; ->fn : { (x: number): string; (x: 'foo'): number; } +>fn : { (x: number): string; (x: "foo"): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : number > : ^^^^^^ declare function fn(x: 'foo'): number; ->fn : { (x: number): string; (x: 'foo'): number; } +>fn : { (x: number): string; (x: "foo"): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 11a12e97d4b2e..737e133f9b45b 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6365,6 +6365,7 @@ declare namespace ts { OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, UseSingleQuotesForStringLiteralType = 268435456, + PreserveQuotesForStringLiteralType = 1073741824, NoTypeReduction = 536870912, OmitThisParameter = 33554432, AllowThisInObjectLiteral = 32768, @@ -6395,6 +6396,7 @@ declare namespace ts { OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, UseSingleQuotesForStringLiteralType = 268435456, + PreserveQuotesForStringLiteralType = 1073741824, NoTypeReduction = 536870912, OmitThisParameter = 33554432, AllowUniqueESSymbolType = 1048576, diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types index fe07add8d6b65..be6617683be64 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types @@ -435,7 +435,7 @@ namespace GH30170 { > : ^^^^^^^^^^^^^ function drawWithColor(currentColor: 'blue' | 'yellow' | undefined) { ->drawWithColor : (currentColor: 'blue' | 'yellow' | undefined) => void +>drawWithColor : (currentColor: "blue" | "yellow" | undefined) => void > : ^ ^^ ^^^^^^^^^ >currentColor : "blue" | "yellow" > : ^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 230a4dd66cced..6c85c052e0336 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -5,28 +5,28 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Prop assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. ==== assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== @@ -82,7 +82,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. a = b; @@ -103,22 +103,22 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = a2; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. +!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. } @@ -153,7 +153,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s2 = b; // ok s2 = a2; // error ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. a = b; // error @@ -174,7 +174,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = a2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = b2; // error ~ @@ -183,22 +183,22 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop a2 = b2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. b2 = a2; // error ~~ -!!! error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. +!!! error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. a2 = b; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureFunctionOverload.types b/tests/baselines/reference/callSignatureFunctionOverload.types index 18b1123d97b46..5d9bb851813f1 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.types +++ b/tests/baselines/reference/callSignatureFunctionOverload.types @@ -2,7 +2,7 @@ === callSignatureFunctionOverload.ts === var foo: { ->foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; } +>foo : { (name: string): string; (name: "order"): string; (name: "content"): string; (name: "done"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; @@ -23,7 +23,7 @@ var foo: { } var foo2: { ->foo2 : { (name: string): string; (name: 'order'): string; (name: 'order'): string; (name: 'done'): string; } +>foo2 : { (name: string): string; (name: "order"): string; (name: "order"): string; (name: "done"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.types b/tests/baselines/reference/callbackArgsDifferByOptionality.types index 88fac714db623..c0c107c1d76cb 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.types +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.types @@ -2,15 +2,15 @@ === callbackArgsDifferByOptionality.ts === function x3(callback: (x?: 'hi') => number); ->x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->callback : (x?: 'hi') => number +>callback : (x?: "hi") => number > : ^ ^^^ ^^^^^ >x : "hi" > : ^^^^ function x3(callback: (x: string) => number); ->x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: string) => number > : ^ ^^ ^^^^^ @@ -18,7 +18,7 @@ function x3(callback: (x: string) => number); > : ^^^^^^ function x3(callback: (x: any) => number) { ->x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: any) => number > : ^ ^^ ^^^^^ diff --git a/tests/baselines/reference/callbackCrossModule.types b/tests/baselines/reference/callbackCrossModule.types index 2e5388420d6bd..062a8a09257d0 100644 --- a/tests/baselines/reference/callbackCrossModule.types +++ b/tests/baselines/reference/callbackCrossModule.types @@ -36,7 +36,7 @@ function C() { === use.js === /** @param {import('./mod1').Con} k */ function f(k) { ->f : (k: import('./mod1').Con) => any +>f : (k: import("./mod1").Con) => any > : ^ ^^ ^^^^^^^^ >k : import("mod1").Con > : ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsdocTypeTag5.types b/tests/baselines/reference/checkJsdocTypeTag5.types index 5afc2c23f6bb6..e7500bc7c59a0 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.types +++ b/tests/baselines/reference/checkJsdocTypeTag5.types @@ -68,7 +68,7 @@ var k = function (x) { return x } /** @typedef {(x: 'hi' | 'bye') => 0 | 1 | 2} Argle */ /** @type {Argle} */ function blargle(s) { ->blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 +>blargle : (x: "hi" | "bye") => 0 | 1 | 2 > : ^ ^^ ^^^^^ >s : "hi" | "bye" > : ^^^^^^^^^^^^ @@ -84,7 +84,7 @@ var zeroonetwo = blargle('hi') > : ^^^^^^^^^ >blargle('hi') : 0 | 1 | 2 > : ^^^^^^^^^ ->blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 +>blargle : (x: "hi" | "bye") => 0 | 1 | 2 > : ^ ^^ ^^^^^ >'hi' : "hi" > : ^^^^ diff --git a/tests/baselines/reference/commonTypeIntersection.types b/tests/baselines/reference/commonTypeIntersection.types index b101079160517..447530c1e1119 100644 --- a/tests/baselines/reference/commonTypeIntersection.types +++ b/tests/baselines/reference/commonTypeIntersection.types @@ -2,7 +2,7 @@ === commonTypeIntersection.ts === declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; ->x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } +>x1 : { __typename?: "TypeTwo"; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ @@ -10,26 +10,26 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; > : ^^^^^^^ let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here ->y1 : { __typename?: 'TypeOne'; } & { a: boolean; } +>y1 : { __typename?: "TypeOne"; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeOne" > : ^^^^^^^^^ >a : boolean > : ^^^^^^^ ->x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } +>x1 : { __typename?: "TypeTwo"; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ declare let x2: { __typename?: 'TypeTwo' } & string; ->x2 : { __typename?: 'TypeTwo'; } & string +>x2 : { __typename?: "TypeTwo"; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ let y2: { __typename?: 'TypeOne' } & string = x2; // should error here ->y2 : { __typename?: 'TypeOne'; } & string +>y2 : { __typename?: "TypeOne"; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeOne" > : ^^^^^^^^^ ->x2 : { __typename?: 'TypeTwo'; } & string +>x2 : { __typename?: "TypeTwo"; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types index c9a53432a91fc..b53132a7c94ba 100644 --- a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types +++ b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types @@ -20024,7 +20024,7 @@ type ChildrenOf = T['children'][number]; > : ^^^^^^^^^^^^^ export function makeThing( ->makeThing : (name: T, children?: ChildrenOf>[]) => void +>makeThing : (name: T, children?: ChildrenOf>[]) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^ name: T, diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types index 814e0c20d3bec..341678572ef89 100644 --- a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types @@ -13,7 +13,7 @@ type Record2 = { }; function defaultRecord(x: Record<'a', string>, y: Record) { ->defaultRecord : (x: Record<'a', string>, y: Record) => void +>defaultRecord : (x: Record<"a", string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ function defaultRecord(x: Record<'a', string>, y: Record) { } function customRecord(x: Record2<'a', string>, y: Record2) { ->customRecord : (x: Record2<'a', string>, y: Record2) => void +>customRecord : (x: Record2<"a", string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ function customRecord(x: Record2<'a', string>, y: Record2) { } function mixed1(x: Record2<'a', string>, y: Record) { ->mixed1 : (x: Record2<'a', string>, y: Record) => void +>mixed1 : (x: Record2<"a", string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -64,7 +64,7 @@ function mixed1(x: Record2<'a', string>, y: Record) { } function mixed2(x: Record<'a', string>, y: Record2) { ->mixed2 : (x: Record<'a', string>, y: Record2) => void +>mixed2 : (x: Record<"a", string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ function mixed2(x: Record<'a', string>, y: Record2) { } function defaultRecord2(x: Record<'a', T>, y: Record) { ->defaultRecord2 : (x: Record<'a', T>, y: Record) => void +>defaultRecord2 : (x: Record<"a", T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ function defaultRecord2(x: Record<'a', T>, y: Record) { } function customRecord2(x: Record2<'a', T>, y: Record2) { ->customRecord2 : (x: Record2<'a', T>, y: Record2) => void +>customRecord2 : (x: Record2<"a", T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ function customRecord2(x: Record2<'a', T>, y: Record2) { } function mixed3(x: Record2<'a', T>, y: Record) { ->mixed3 : (x: Record2<'a', T>, y: Record) => void +>mixed3 : (x: Record2<"a", T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ function mixed3(x: Record2<'a', T>, y: Record) { } function mixed4(x: Record<'a', T>, y: Record2) { ->mixed4 : (x: Record<'a', T>, y: Record2) => void +>mixed4 : (x: Record<"a", T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constAssertions.types b/tests/baselines/reference/constAssertions.types index 3de63430ed042..e64ff4ce6e3fa 100644 --- a/tests/baselines/reference/constAssertions.types +++ b/tests/baselines/reference/constAssertions.types @@ -650,7 +650,7 @@ let t4 = `${`(${t1})`}-${`(${t2})`}` as const; > : ^^^^^ function ff1(x: 'foo' | 'bar', y: 1 | 2) { ->ff1 : (x: 'foo' | 'bar', y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" +>ff1 : (x: "foo" | "bar", y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,7 +754,7 @@ const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); > : ^^^^^^^ function ff3(x: 'foo' | 'bar', y: object) { ->ff3 : (x: 'foo' | 'bar', y: object) => `foo${string}` | `bar${string}` +>ff3 : (x: "foo" | "bar", y: object) => `foo${string}` | `bar${string}` > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constantOverloadFunction.types b/tests/baselines/reference/constantOverloadFunction.types index 461fce96494b9..4a7b2d87e01c3 100644 --- a/tests/baselines/reference/constantOverloadFunction.types +++ b/tests/baselines/reference/constantOverloadFunction.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived1; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived3; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: string): Base; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types index bd7721b2b40fe..c22ff4030d88c 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived3; ->foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived1; ->foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: number): Base; ->foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : number > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types index bba8cc1135813..c5ac24db84967 100644 --- a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types +++ b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types @@ -93,7 +93,7 @@ test2({ type: "foo" }); // https://github.com/microsoft/TypeScript/issues/59473 const x: { ml: any } & { ml: 'edge' } = { ml: 'edge' }; ->x : { ml: any; } & { ml: 'edge'; } +>x : { ml: any; } & { ml: "edge"; } > : ^^^^^^ ^^^^^^^^^^^^ ^^^ >ml : any >ml : "edge" diff --git a/tests/baselines/reference/contextualTypedSpecialAssignment.types b/tests/baselines/reference/contextualTypedSpecialAssignment.types index 05d220458d32e..8c5d1bbc1c6f6 100644 --- a/tests/baselines/reference/contextualTypedSpecialAssignment.types +++ b/tests/baselines/reference/contextualTypedSpecialAssignment.types @@ -289,13 +289,13 @@ F.prototype = { // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { ->module.exports = { status: "done", m(n) { }} : { status: 'done'; m(n: number): void; } +>module.exports = { status: "done", m(n) { }} : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module.exports : { status: 'done'; m(n: number): void; } +>module.exports : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module : { exports: { status: 'done'; m(n: number): void; }; } +>module : { exports: { status: "done"; m(n: number): void; }; } > : ^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^^^^ ->exports : { status: 'done'; m(n: number): void; } +>exports : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ >{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types index cb5debb4d96b1..95e4eb7641d68 100644 --- a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types +++ b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types @@ -48,7 +48,7 @@ declare const ab: Action; > : ^^^^^^ declare function f(action: T, blah: { [K in T['type']]: (p: K) => void }): any; ->f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >type : string | symbol > : ^^^^^^^^^^^^^^^ @@ -61,7 +61,7 @@ declare function f(action: T, blah: { [K in f(ab, { >f(ab, { [A]: ap => { ap.description }, [B]: bp => { bp.description },}) : any ->f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >ab : Action > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowAliasedDiscriminants.types b/tests/baselines/reference/controlFlowAliasedDiscriminants.types index 13d0f182fea7b..9fd6a7949b697 100644 --- a/tests/baselines/reference/controlFlowAliasedDiscriminants.types +++ b/tests/baselines/reference/controlFlowAliasedDiscriminants.types @@ -526,7 +526,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: 'string'; resp: { data: string; }; } +>resp : { type: "string"; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ @@ -586,7 +586,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: 'string'; resp: { data: string; }; } +>resp : { type: "string"; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index 5590b3055b15f..d24919344d519 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -388,9 +388,9 @@ function f18(obj: readonly [string | number]) { } function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f20 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f20 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -408,7 +408,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -422,7 +422,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -431,7 +431,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -439,9 +439,9 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f21 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f21 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -459,7 +459,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -473,7 +473,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo has type annotation >obj.foo : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -482,7 +482,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo has type annotation >obj.bar : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -490,9 +490,9 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f22 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f22 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -510,7 +510,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -524,7 +524,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo is mutable >obj.foo : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -533,7 +533,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo is mutable >obj.bar : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -541,9 +541,9 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f23 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f23 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -561,7 +561,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -569,11 +569,11 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ obj = obj; ->obj = obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj = obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (isFoo) { @@ -583,7 +583,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because obj is assigned in function body >obj.foo : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -592,7 +592,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because obj is assigned in function body >obj.bar : any > : ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -600,9 +600,9 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f24 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f24 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -614,9 +614,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ const obj = arg; ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -626,7 +626,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -640,7 +640,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -649,7 +649,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -657,9 +657,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f25 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f25 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -671,9 +671,9 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ let obj = arg; ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -683,7 +683,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -697,7 +697,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -706,7 +706,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -714,11 +714,11 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void +>f26 : (outer: { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -736,11 +736,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,11 +754,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.foo; >outer.obj.foo : string > : ^^^^^^ ->outer.obj : { kind: 'foo'; foo: string; } +>outer.obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -767,11 +767,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.bar; >outer.obj.bar : number > : ^^^^^^ ->outer.obj : { kind: 'bar'; bar: number; } +>outer.obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -779,11 +779,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' } function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void +>f27 : (outer: { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -801,11 +801,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -819,11 +819,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.foo; // Not narrowed because obj is mutable >outer.obj.foo : any > : ^^^ ->outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -832,11 +832,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.bar; // Not narrowed because obj is mutable >outer.obj.bar : any > : ^^^ ->outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } +>outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -844,9 +844,9 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu } function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f28 : (obj?: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "foo" > : ^^^^^ @@ -862,13 +862,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'foo' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'foo' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -880,13 +880,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'bar' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'bar' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -900,7 +900,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -912,7 +912,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -922,9 +922,9 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) // Narrowing by aliased discriminant property access function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f30 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f30 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -940,7 +940,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -956,7 +956,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -965,7 +965,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -973,9 +973,9 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f31 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f31 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -989,7 +989,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (kind === 'foo') { @@ -1003,7 +1003,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1012,7 +1012,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1020,9 +1020,9 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f32 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f32 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1038,7 +1038,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^ >k : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (k === 'foo') { @@ -1052,7 +1052,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1061,7 +1061,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1069,9 +1069,9 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f33 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f33 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1085,7 +1085,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } +>obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ switch (kind) { @@ -1097,7 +1097,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo: string; } +>obj : { kind: "foo"; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1107,7 +1107,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.bar : number > : ^^^^^^ ->obj : { kind: 'bar'; bar: number; } +>obj : { kind: "bar"; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1282,9 +1282,9 @@ class C11 { // Mixing of aliased discriminants and conditionals function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) { ->f40 : (obj: { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; }) => void +>f40 : (obj: { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } +>obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1298,7 +1298,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } +>obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ const isFoo = kind == 'foo'; @@ -1318,7 +1318,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^^ >obj.foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->obj : { kind: 'foo'; foo?: string; } +>obj : { kind: "foo"; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -1328,7 +1328,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: 'foo'; foo?: string; } +>obj : { kind: "foo"; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1372,7 +1372,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : string > : ^^^^^^ ->obj : { kind: 'str'; payload: string; } +>obj : { kind: "str"; payload: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : string > : ^^^^^^ @@ -1383,7 +1383,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : number > : ^^^^^^ ->obj : { kind: 'num'; payload: number; } +>obj : { kind: "num"; payload: number; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : number > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index a016d450be1e0..34aaf80709138 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -252,13 +252,13 @@ function g4 | undefined>(x: T) { // Repro from #13995 declare function takeA(val: 'A'): void; ->takeA : (val: 'A') => void +>takeA : (val: "A") => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -274,7 +274,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: 'A') => void +>takeA : (val: "A") => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index ced5d4f19bd3e..1be51c8e96277 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -3051,7 +3051,7 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.radius : number > : ^^^^^^ ->shape : { type: 'circle'; radius: number; } +>shape : { type: "circle"; radius: number; } > : ^^^^^^^^ ^^^^^^^^^^ ^^^ >radius : number > : ^^^^^^ @@ -3067,13 +3067,13 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.width : number > : ^^^^^^ ->shape : { type: 'rectangle'; width: number; height: number; } +>shape : { type: "rectangle"; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >width : number > : ^^^^^^ >shape.height : number > : ^^^^^^ ->shape : { type: 'rectangle'; width: number; height: number; } +>shape : { type: "rectangle"; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >height : number > : ^^^^^^ diff --git a/tests/baselines/reference/correlatedUnions.types b/tests/baselines/reference/correlatedUnions.types index d9cca19802a09..82f0b9d082942 100644 --- a/tests/baselines/reference/correlatedUnions.types +++ b/tests/baselines/reference/correlatedUnions.types @@ -1047,7 +1047,7 @@ const ref: MyObj = { }; function func(k: K): MyObj[K]['name'] | undefined { ->func : (k: K) => MyObj[K]['name'] | undefined +>func : (k: K) => MyObj[K]["name"] | undefined > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >k : K > : ^ diff --git a/tests/baselines/reference/declarationEmitAliasInlineing.types b/tests/baselines/reference/declarationEmitAliasInlineing.types index dc255c7728734..a03f57311a4ee 100644 --- a/tests/baselines/reference/declarationEmitAliasInlineing.types +++ b/tests/baselines/reference/declarationEmitAliasInlineing.types @@ -24,9 +24,9 @@ type I = { } export const fn = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fn : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void +>fn : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -61,9 +61,9 @@ export type I = { } export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fnExp : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void +>fnExp : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -76,22 +76,22 @@ export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omitfn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ import {fnExp} from './aExp' ->fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ export const f = fn; ->f : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>f : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ ->fn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ export const fExp = fnExp; ->fExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ ->fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types b/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types index e0e0247452749..ffc3b71256ec0 100644 --- a/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types +++ b/tests/baselines/reference/declarationEmitCrossFileCopiedGeneratedImportType.types @@ -41,7 +41,7 @@ import {e} from "../projC"; export const d = {e}; >d : { e: { f: (foo: import("projA/index").Foo) => boolean; }; } > : ^^^^^^^^^^ ^^^^^^ ->{e} : { e: { f: (foo: import('projA/index').Foo) => boolean; }; } +>{e} : { e: { f: (foo: import("projA/index").Foo) => boolean; }; } > : ^^^^^^^^^^ ^^^^^^ >e : { f: (foo: import("projA/index").Foo) => boolean; } > : ^^^^^ ^^^ diff --git a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types index b18f1527ab1b4..68058b6bb5190 100644 --- a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types +++ b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types @@ -16,7 +16,7 @@ type AllArg = { [K in keyof T]: Parameters }; > : ^^^^^^^^^ function fn }>(sliceIndex: T): AllArg { ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : Map > : ^^^^^^^^^^^ @@ -29,9 +29,9 @@ function fn }>(sliceIndex: T): AllArg { } export default { fn }; ->{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } +>{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^^ ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ === reexport.ts === diff --git a/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types b/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types index a78cf4a837cb1..dfb60de7132df 100644 --- a/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types +++ b/tests/baselines/reference/declarationEmitMappedTypePropertyFromNumericStringKey.types @@ -4,7 +4,7 @@ export const f = ((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}); // Original prop uses string syntax >f : { '0': string | number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}) : { "0": string | number; } +>((arg: {[K in keyof T]: T[K] | string}) => arg)({'0': 0}) : { '0': string | number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >((arg: {[K in keyof T]: T[K] | string}) => arg) : (arg: { [K in keyof T]: T[K] | string; }) => { [K in keyof T]: string | T[K]; } > : ^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types index e846364d28110..4579c067ade2f 100644 --- a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types +++ b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types @@ -37,17 +37,17 @@ const a = { a: "value of a", notNecessary: u } as const export const o1 = (o: A['a']['b']) => {} ->o1 : (o: A['a']['b']) => void +>o1 : (o: A["a"]["b"]) => void > : ^ ^^ ^^^^^^^^^ ->(o: A['a']['b']) => {} : (o: A['a']['b']) => void +>(o: A['a']['b']) => {} : (o: A["a"]["b"]) => void > : ^ ^^ ^^^^^^^^^ >o : "value of b" > : ^^^^^^^^^^^^ export const o2 = (o: (typeof a)['a']) => {} ->o2 : (o: (typeof a)['a']) => void +>o2 : (o: (typeof a)["a"]) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: (typeof a)['a']) => {} : (o: (typeof a)['a']) => void +>(o: (typeof a)['a']) => {} : (o: (typeof a)["a"]) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -55,9 +55,9 @@ export const o2 = (o: (typeof a)['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o3 = (o: typeof a['a']) => {} ->o3 : (o: (typeof a)['a']) => void +>o3 : (o: (typeof a)["a"]) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: typeof a['a']) => {} : (o: (typeof a)['a']) => void +>(o: typeof a['a']) => {} : (o: (typeof a)["a"]) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -65,9 +65,9 @@ export const o3 = (o: typeof a['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o4 = (o: keyof (A['a'])) => {} ->o4 : (o: keyof A['a']) => void +>o4 : (o: keyof A["a"]) => void > : ^ ^^ ^^^^^^^^^ ->(o: keyof (A['a'])) => {} : (o: keyof A['a']) => void +>(o: keyof (A['a'])) => {} : (o: keyof A["a"]) => void > : ^ ^^ ^^^^^^^^^ >o : "b" | "notNecessary" > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types b/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types index 8e64e58331205..5cc1c050264f5 100644 --- a/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types +++ b/tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.types @@ -8,7 +8,7 @@ import { boxedBox } from "./boxedBox"; export const _ = boxedBox; >_ : import("box").Box<{ boxed: import("box").Box; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ->boxedBox : import("box").Box<{ boxed: import('box').Box; }> +>boxedBox : import("box").Box<{ boxed: import("box").Box; }> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ // At index 83 diff --git a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types index 2b531d6c638ed..b99ee19d2b2b1 100644 --- a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types +++ b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types @@ -50,7 +50,7 @@ import { shouldLookupName, reuseDepName, shouldReuseLocalName, shouldBeElided } > : ^^^^^^^^^^^^^ export declare const goodDeclaration: () => () => { ->goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import('./other').shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } +>goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import("./other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } > : ^ ^^^^^^^ /** Other Can't be named in index.ts, but the whole conditional type can be resolved */ @@ -107,7 +107,7 @@ import { goodDeclaration, shouldReuseLocalName, shouldBeElided } from "some-dep" export const bar = goodDeclaration<{}>; >bar : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ->goodDeclaration<{}> : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import('node_modules/some-dep/dist/other').shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } +>goodDeclaration<{}> : () => () => { shouldPrintResult: "N"; shouldPrintResult2: "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >goodDeclaration : () => () => { shouldPrintResult: T extends import("node_modules/some-dep/dist/inner").Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? import("node_modules/some-dep/dist/inner").Other : "N"; shouldLookupName: typeof import("node_modules/some-dep/dist/other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof import("node_modules/some-dep/dist/other").reuseDepName; } > : ^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/deferredLookupTypeResolution.types b/tests/baselines/reference/deferredLookupTypeResolution.types index a45a4870b07ee..81aa562834c02 100644 --- a/tests/baselines/reference/deferredLookupTypeResolution.types +++ b/tests/baselines/reference/deferredLookupTypeResolution.types @@ -62,7 +62,7 @@ function f2(a: A) { } function f3(x: 'a' | 'b') { ->f3 : (x: 'a' | 'b') => { a: any; b: any; x: any; } +>f3 : (x: "a" | "b") => { a: any; b: any; x: any; } > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "a" | "b" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index 36af4eef845aa..1b829f101d426 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -878,7 +878,7 @@ f50((kind, data) => { }); const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => { ->f51 : (...args: ['A', number] | ['B', string]) => void +>f51 : (...args: ["A", number] | ["B", string]) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B", string] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -928,7 +928,7 @@ const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => }; const f52: (...args: ['A', number] | ['B']) => void = (kind, payload?) => { ->f52 : (...args: ['A', number] | ['B']) => void +>f52 : (...args: ["A", number] | ["B"]) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B"] > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType1.types b/tests/baselines/reference/dependentReturnType1.types index 9ec46efcfb0af..96265db6b57be 100644 --- a/tests/baselines/reference/dependentReturnType1.types +++ b/tests/baselines/reference/dependentReturnType1.types @@ -482,13 +482,13 @@ function ftakeA : (val: 'A') => void +>takeA : (val: "A") => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -504,7 +504,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: 'A') => void +>takeA : (val: "A") => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/dependentReturnType2.types b/tests/baselines/reference/dependentReturnType2.types index 2581a01cb7ebf..1adf92c29a8fd 100644 --- a/tests/baselines/reference/dependentReturnType2.types +++ b/tests/baselines/reference/dependentReturnType2.types @@ -827,7 +827,7 @@ class NewAgenda { * @returns {Promise} */ async _createIntervalJob(interval, name, data, options) { ->_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -853,7 +853,7 @@ class NewAgenda { * @returns {Promise | undefined} */ _createIntervalJobs(interval, names, data, options) { ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -878,7 +878,7 @@ class NewAgenda { * @returns {Promise>} */ async newEvery(interval, name, data, options) { ->newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -902,11 +902,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -933,11 +933,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType3.types b/tests/baselines/reference/dependentReturnType3.types index 43ac3d581739c..ac94d85e9b9e3 100644 --- a/tests/baselines/reference/dependentReturnType3.types +++ b/tests/baselines/reference/dependentReturnType3.types @@ -825,7 +825,7 @@ class NewAgenda { > : ^^^^^^^^^ public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise { return undefined as any; } ->_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -841,7 +841,7 @@ class NewAgenda { > : ^^^^^^^^^ private _createIntervalJobs( ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -867,7 +867,7 @@ class NewAgenda { > : ^^^^^^^^^ public async newEvery( ->newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -899,11 +899,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -930,11 +930,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuredDeclarationEmit.types b/tests/baselines/reference/destructuredDeclarationEmit.types index ef7f04b00fed6..5329e83ccc2e4 100644 --- a/tests/baselines/reference/destructuredDeclarationEmit.types +++ b/tests/baselines/reference/destructuredDeclarationEmit.types @@ -32,7 +32,7 @@ const foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } > : ^^^ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]]; ->arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ >def : "def" > : ^^^^^ @@ -72,20 +72,20 @@ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ === index.ts === import { foo, arr } from './foo'; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo; @@ -133,7 +133,7 @@ const [ , one, , [, bee, , [, {sec} ]]] = arr; > : ^^^^^^^^^ >sec : "sec" > : ^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { one, bee, sec }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration8.types b/tests/baselines/reference/destructuringParameterDeclaration8.types index 80dd1b585f02a..54655273fce7b 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration8.types +++ b/tests/baselines/reference/destructuringParameterDeclaration8.types @@ -4,7 +4,7 @@ // explicit type annotation should cause `method` to have type 'x' | 'y' // both inside and outside `test`. function test({ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void > : ^ ^^ ^^^^^^^^^ method = 'z', @@ -27,7 +27,7 @@ function test({ > : ^^^^^^^^^ nested?: { p: 'a' | 'b' } ->nested : { p: 'a' | 'b'; } +>nested : { p: "a" | "b"; } > : ^^^^^ ^^^ >p : "a" | "b" > : ^^^^^^^^^ @@ -46,7 +46,7 @@ function test({ test({}); >test({}) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void > : ^ ^^ ^^^^^^^^^ >{} : {} > : ^^ @@ -54,7 +54,7 @@ test({}); test({ method: 'x', nested: { p: 'a' } }) >test({ method: 'x', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'x', nested: { p: 'a' } } : { method: "x"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ test({ method: 'x', nested: { p: 'a' } }) test({ method: 'z', nested: { p: 'b' } }) >test({ method: 'z', nested: { p: 'b' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -94,7 +94,7 @@ test({ method: 'z', nested: { p: 'b' } }) test({ method: 'one', nested: { p: 'a' } }) >test({ method: 'one', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types index 3d1dd22fe0be6..e827977063d76 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types +++ b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types @@ -6,7 +6,7 @@ * @param {Partial>} [config.additionalFiles] */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void > : ^ ^^^ ^^^ ^ ^^^^^^^^^ additionalFiles: { diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types index 851bd317245c8..eea65063472ed 100644 --- a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types @@ -28,7 +28,7 @@ type X = const x: X = 4 as any as { x: 'x' | 'y', y: number }; >x : X > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 @@ -60,7 +60,7 @@ type Y = const y: Y = 4 as any as { x: 'x' | 'y', y: number }; >y : Y > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 diff --git a/tests/baselines/reference/discriminantPropertyCheck.types b/tests/baselines/reference/discriminantPropertyCheck.types index 85488720e94d7..f92594a3e1fd4 100644 --- a/tests/baselines/reference/discriminantPropertyCheck.types +++ b/tests/baselines/reference/discriminantPropertyCheck.types @@ -649,7 +649,7 @@ export function foo(obj: Obj) { onlyPlus(obj.key); >onlyPlus(obj.key) : "+" > : ^^^ ->onlyPlus : (arg: '+') => "+" +>onlyPlus : (arg: "+") => "+" > : ^ ^^ ^^^^^^^^ >obj.key : "+" > : ^^^ @@ -664,7 +664,7 @@ export function foo(obj: Obj) { } function onlyPlus(arg: '+') { ->onlyPlus : (arg: '+') => "+" +>onlyPlus : (arg: "+") => "+" > : ^ ^^ ^^^^^^^^ >arg : "+" > : ^^^ diff --git a/tests/baselines/reference/discriminatedUnionTypes2.types b/tests/baselines/reference/discriminatedUnionTypes2.types index ce388aacf9544..f67c4ae4daa10 100644 --- a/tests/baselines/reference/discriminatedUnionTypes2.types +++ b/tests/baselines/reference/discriminatedUnionTypes2.types @@ -549,9 +549,9 @@ type RuntimeValue = > : ^^^^^^^ function foo1(x: RuntimeValue & { type: 'number' }) { ->foo1 : (x: RuntimeValue & { type: 'number'; }) => void +>foo1 : (x: RuntimeValue & { type: "number"; }) => void > : ^ ^^ ^^^^^^^^^ ->x : { type: 'number'; value: number; } & { type: 'number'; } +>x : { type: "number"; value: number; } & { type: "number"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -561,7 +561,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { > : ^^^^^^^ >x.type : "number" > : ^^^^^^^^ ->x : { type: 'number'; value: number; } & { type: 'number'; } +>x : { type: "number"; value: number; } & { type: "number"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -571,7 +571,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: 'number'; value: number; } & { type: 'number'; } +>x : { type: "number"; value: number; } & { type: "number"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -580,7 +580,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: 'number'; value: number; } & { type: 'number'; } +>x : { type: "number"; value: number; } & { type: "number"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -588,9 +588,9 @@ function foo1(x: RuntimeValue & { type: 'number' }) { } function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { ->foo2 : (x: RuntimeValue & ({ type: 'number'; } | { type: 'string'; })) => void +>foo2 : (x: RuntimeValue & ({ type: "number"; } | { type: "string"; })) => void > : ^ ^^ ^^^^^^^^^ ->x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) +>x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "number" > : ^^^^^^^^ @@ -602,7 +602,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { > : ^^^^^^^ >x.type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ ->x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) +>x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ @@ -612,7 +612,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: 'number'; value: number; } & { type: 'number'; } +>x : { type: "number"; value: number; } & { type: "number"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -621,7 +621,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // string >x.value : string > : ^^^^^^ ->x : { type: 'string'; value: string; } & { type: 'string'; } +>x : { type: "string"; value: string; } & { type: "string"; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types index 17e007554c208..313700a47e74f 100644 --- a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types +++ b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types @@ -79,7 +79,7 @@ type Schema2 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj2: Schema2 = { ->schemaObj2 : { props: { l1: { props: { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example +>schemaObj2 : { props: { l1: { props: { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ type Schema4 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj4: Schema4 = { ->schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; }; }; } +>schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types index a3876a2c08673..6df385d452429 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: 'c'; } +>obj1 : { c: "c"; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: 'c'; } +>obj1 : { c: "c"; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types index a3876a2c08673..6df385d452429 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: 'c'; } +>obj1 : { c: "c"; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: 'c'; } +>obj1 : { c: "c"; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/generatorReturnContextualType.types b/tests/baselines/reference/generatorReturnContextualType.types index e3fe28c12939f..392d859ed65b0 100644 --- a/tests/baselines/reference/generatorReturnContextualType.types +++ b/tests/baselines/reference/generatorReturnContextualType.types @@ -4,7 +4,7 @@ // #35995 function* f1(): Generator { ->f1 : () => Generator +>f1 : () => Generator > : ^^^^^^ >x : "x" > : ^^^ @@ -19,7 +19,7 @@ function* f1(): Generator { } function* g1(): Iterator { ->g1 : () => Iterator +>g1 : () => Iterator > : ^^^^^^ >x : "x" > : ^^^ @@ -34,7 +34,7 @@ function* g1(): Iterator { } async function* f2(): AsyncGenerator { ->f2 : () => AsyncGenerator +>f2 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -49,7 +49,7 @@ async function* f2(): AsyncGenerator { } async function* g2(): AsyncIterator { ->g2 : () => AsyncIterator +>g2 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -64,7 +64,7 @@ async function* g2(): AsyncIterator { } async function* f3(): AsyncGenerator { ->f3 : () => AsyncGenerator +>f3 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -87,7 +87,7 @@ async function* f3(): AsyncGenerator { } async function* g3(): AsyncIterator { ->g3 : () => AsyncIterator +>g3 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -110,7 +110,7 @@ async function* g3(): AsyncIterator { } async function* f4(): AsyncGenerator { ->f4 : () => AsyncGenerator +>f4 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -139,7 +139,7 @@ async function* f4(): AsyncGenerator { } async function* g4(): AsyncIterator { ->g4 : () => AsyncIterator +>g4 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ diff --git a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types index 408369af28144..1a2cbde5968ed 100644 --- a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types +++ b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types @@ -70,11 +70,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : number > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: 'a'; type: number; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: "a"; type: number; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: 'a'; type: number; } +>params : { foo: string; } & { tag: "a"; type: number; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : number > : ^^^^^^ @@ -92,11 +92,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : string > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: 'b'; type: string; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: "b"; type: string; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: 'b'; type: string; } +>params : { foo: string; } & { tag: "b"; type: string; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : string > : ^^^^^^ diff --git a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types index 24dc18e19c9ac..43c575386ab0e 100644 --- a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types +++ b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types @@ -39,9 +39,9 @@ type PostBody = Extract["body"]; > : ^^^^ const post = ( ->post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ path: PATH, @@ -77,7 +77,7 @@ const tmp = ( post(path, { body }) >post(path, { body }) : void > : ^^^^ ->post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void > : ^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >path : PATH > : ^^^^ diff --git a/tests/baselines/reference/independentPropertyVariance.types b/tests/baselines/reference/independentPropertyVariance.types index 95ff4022c4987..4d846fdc12ec6 100644 --- a/tests/baselines/reference/independentPropertyVariance.types +++ b/tests/baselines/reference/independentPropertyVariance.types @@ -12,7 +12,7 @@ declare const x: { a: 1, b: string }; > : ^^^^^^ declare const y: { a: number, b: 'a' }; ->y : { a: number; b: 'a'; } +>y : { a: number; b: "a"; } > : ^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -24,6 +24,6 @@ x === y; > : ^^^^^^^ >x : { a: 1; b: string; } > : ^^^^^ ^^^^^ ^^^ ->y : { a: number; b: 'a'; } +>y : { a: number; b: "a"; } > : ^^^^^ ^^^^^ ^^^ diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.types b/tests/baselines/reference/indexedAccessTypeConstraints.types index d30d7ddad9b4b..17b5fb66dd175 100644 --- a/tests/baselines/reference/indexedAccessTypeConstraints.types +++ b/tests/baselines/reference/indexedAccessTypeConstraints.types @@ -106,7 +106,7 @@ export class Bar> extends Parent { // Repro from #14557 function foo(x: C, y: T['content']) { ->foo : (x: C, y: T['content']) => void +>foo : (x: C, y: T["content"]) => void > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >content : C > : ^ diff --git a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types index d77f4b930db53..c483b23f65f72 100644 --- a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types +++ b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types @@ -37,7 +37,7 @@ function foo (id: string) { } function bar (id: 'a' | 'b') { ->bar : (id: 'a' | 'b') => string | number +>bar : (id: "a" | "b") => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" > : ^^^^^^^^^ @@ -72,7 +72,7 @@ function bar (id: 'a' | 'b') { } function baz (id: '1' | '2') { ->baz : (id: '1' | '2') => string | number +>baz : (id: "1" | "2") => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "1" | "2" > : ^^^^^^^^^ @@ -142,7 +142,7 @@ function qux (id: 1 | 2) { } function quux (id: 'a' | 'b' | 'z') { ->quux : (id: 'a' | 'b' | 'z') => string | number | undefined +>quux : (id: "a" | "b" | "z") => string | number | undefined > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" | "z" > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index 44b42100025ef..e20de1c2bbd86 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -45,7 +45,7 @@ function wrap(value: T): Wrap { } function wrappedFoo(): Wrap<'foo'> { ->wrappedFoo : () => Wrap<'foo'> +>wrappedFoo : () => Wrap<"foo"> > : ^^^^^^ return wrap('foo'); @@ -58,7 +58,7 @@ function wrappedFoo(): Wrap<'foo'> { } function wrapBar(value: 'bar'): Wrap<'bar'> { ->wrapBar : (value: 'bar') => Wrap<'bar'> +>wrapBar : (value: "bar") => Wrap<"bar"> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -71,7 +71,7 @@ function wrapBar(value: 'bar'): Wrap<'bar'> { } function wrappedBar(): Wrap<'bar'> { ->wrappedBar : () => Wrap<'bar'> +>wrappedBar : () => Wrap<"bar"> > : ^^^^^^ const value = 'bar'; @@ -85,7 +85,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: 'bar') => Wrap<'bar'> +>wrapBar : (value: "bar") => Wrap<"bar"> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -95,7 +95,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar('bar') : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: 'bar') => Wrap<'bar'> +>wrapBar : (value: "bar") => Wrap<"bar"> > : ^ ^^ ^^^^^ >'bar' : "bar" > : ^^^^^ @@ -111,7 +111,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value2) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: 'bar') => Wrap<'bar'> +>wrapBar : (value: "bar") => Wrap<"bar"> > : ^ ^^ ^^^^^ >value2 : string > : ^^^^^^ @@ -126,7 +126,7 @@ function wrappedBar(): Wrap<'bar'> { } function wrappedBaz(): Wrap<'baz'> { ->wrappedBaz : () => Wrap<'baz'> +>wrappedBaz : () => Wrap<"baz"> > : ^^^^^^ const value: 'baz' = 'baz'; @@ -386,7 +386,7 @@ function objectToMap(obj: any) { interface Person { phoneNumbers: { ->phoneNumbers : { __typename: 'PhoneNumber'; }[] +>phoneNumbers : { __typename: "PhoneNumber"; }[] > : ^^^^^^^^^^^^^^ ^^^^^ __typename: 'PhoneNumber'; diff --git a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types index 8b7eca25fb50a..a783ee1e541b5 100644 --- a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types +++ b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types @@ -236,7 +236,7 @@ equal(v as string, v as string & { tag: 'foo' } | undefined); > : ^^^^^^ >v : never > : ^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ @@ -248,7 +248,7 @@ equal(v as string & { tag: 'foo' } | undefined, v as string); > : ^^^^ >equal : (a: T, b: T) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ diff --git a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types index 404e3c8b4cfcc..06624e4bebd8b 100644 --- a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types +++ b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types @@ -20,7 +20,7 @@ declare const source: Test1; const target: Test2 = { ...source }; >target : Test2 > : ^^^^^ ->{ ...source } : { toString: null | 'string'; } +>{ ...source } : { toString: null | "string"; } > : ^^^^^^^^^^^^ ^^^ >source : Test1 > : ^^^^^ diff --git a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types index cdd879676deb7..cf04be3a3e2b0 100644 --- a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types +++ b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types @@ -18,7 +18,7 @@ type Ex = T extends U ? T : never; > : ^^^^^^^^ declare let x: Ex ->x : { kind?: 'A'; a: string; } +>x : { kind?: "A"; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >kind : "A" > : ^^^ @@ -26,7 +26,7 @@ declare let x: Ex x.a >x.a : string > : ^^^^^^ ->x : { kind?: 'A'; a: string; } +>x : { kind?: "A"; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/intersectionTypeNormalization.types b/tests/baselines/reference/intersectionTypeNormalization.types index bcdb37d4d1b14..6c057bd977a62 100644 --- a/tests/baselines/reference/intersectionTypeNormalization.types +++ b/tests/baselines/reference/intersectionTypeNormalization.types @@ -184,7 +184,7 @@ function getValueAsString(value: IntersectionFail): string { > : ^^ >value.num : number > : ^^^^^^ ->value : { kind: 'int'; num: number; } & ToString +>value : { kind: "int"; num: number; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >num : number > : ^^^^^^ @@ -192,7 +192,7 @@ function getValueAsString(value: IntersectionFail): string { return value.str; >value.str : string > : ^^^^^^ ->value : { kind: 'string'; str: string; } & ToString +>value : { kind: "string"; str: string; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >str : string > : ^^^^^^ diff --git a/tests/baselines/reference/intrinsicTypes.types b/tests/baselines/reference/intrinsicTypes.types index 7dbdb77786e6e..9d681b643e808 100644 --- a/tests/baselines/reference/intrinsicTypes.types +++ b/tests/baselines/reference/intrinsicTypes.types @@ -181,7 +181,7 @@ function foo1(s: string, x: Uppercase, y: Uppe } function foo2(x: Uppercase) { ->foo2 : (x: Uppercase) => void +>foo2 : (x: Uppercase) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : Uppercase > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.types b/tests/baselines/reference/invariantGenericErrorElaboration.types index 0689a266a7e37..fb17ecd2d4b44 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.types +++ b/tests/baselines/reference/invariantGenericErrorElaboration.types @@ -57,7 +57,7 @@ interface Constraint> extends Runtype { > : ^ check: (x: A['witness']) => void, ->check : (x: A['witness']) => void +>check : (x: A["witness"]) => void > : ^ ^^ ^^^^^ >x : A["witness"] > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types index efd0cf4b2f061..23fd77525e7fd 100644 --- a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types +++ b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types @@ -20,7 +20,7 @@ export const kSymbol = Symbol("my-symbol"); * @param {import('./a').WithSymbol} value */ export function b(value) { ->b : (value: import('./a').WithSymbol) => import('./a').WithSymbol +>b : (value: import("./a").WithSymbol) => import("./a").WithSymbol > : ^ ^^ ^^^^^ >value : import("a").WithSymbol > : ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsFileFunctionOverloads.types b/tests/baselines/reference/jsFileFunctionOverloads.types index adedf2566c232..13f9ed2c199f2 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads.types +++ b/tests/baselines/reference/jsFileFunctionOverloads.types @@ -21,7 +21,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } +>getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileFunctionOverloads2.types b/tests/baselines/reference/jsFileFunctionOverloads2.types index 0f8729c306b4a..d6cd0fb445762 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads2.types +++ b/tests/baselines/reference/jsFileFunctionOverloads2.types @@ -19,7 +19,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } +>getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileMethodOverloads.types b/tests/baselines/reference/jsFileMethodOverloads.types index 8bc928a7b5563..1c01554d242d6 100644 --- a/tests/baselines/reference/jsFileMethodOverloads.types +++ b/tests/baselines/reference/jsFileMethodOverloads.types @@ -41,7 +41,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } +>getTypeName : { (this: Example): "number"; (this: Example): "string"; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsFileMethodOverloads2.types b/tests/baselines/reference/jsFileMethodOverloads2.types index 5d3d6570772b6..cd9cb93ca4337 100644 --- a/tests/baselines/reference/jsFileMethodOverloads2.types +++ b/tests/baselines/reference/jsFileMethodOverloads2.types @@ -40,7 +40,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } +>getTypeName : { (this: Example): "number"; (this: Example): "string"; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsdocBracelessTypeTag1.types b/tests/baselines/reference/jsdocBracelessTypeTag1.types index b60450c5d8ff8..3f6737aefaeb4 100644 --- a/tests/baselines/reference/jsdocBracelessTypeTag1.types +++ b/tests/baselines/reference/jsdocBracelessTypeTag1.types @@ -35,7 +35,7 @@ function fn3(arg) { /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj1 = { type: "foo", prop: 10 }; ->obj1 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } +>obj1 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "foo", prop: 10 } : { type: "foo"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ const obj1 = { type: "foo", prop: 10 }; /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj2 = { type: "other", prop: 10 }; ->obj2 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } +>obj2 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "other", prop: 10 } : { type: "other"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocLiteral.types b/tests/baselines/reference/jsdocLiteral.types index 5e24b291692df..7ca746bc7dc86 100644 --- a/tests/baselines/reference/jsdocLiteral.types +++ b/tests/baselines/reference/jsdocLiteral.types @@ -9,7 +9,7 @@ * @param {12 | true | 'str'} p5 */ function f(p1, p2, p3, p4, p5) { ->f : (p1: 'literal', p2: "literal", p3: 'literal' | 'other', p4: 'literal' | number, p5: 12 | true | 'str') => string +>f : (p1: "literal", p2: "literal", p3: "literal" | "other", p4: "literal" | number, p5: 12 | true | "str") => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^ >p1 : "literal" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocThisType.types b/tests/baselines/reference/jsdocThisType.types index 9d045562db582..8f9c7289935bb 100644 --- a/tests/baselines/reference/jsdocThisType.types +++ b/tests/baselines/reference/jsdocThisType.types @@ -50,9 +50,9 @@ export function f2() { /** @type {(this: import('./types').Foo) => void} */ export const f3 = function() { ->f3 : (this: import('./types').Foo) => void +>f3 : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import('./types').Foo) => void +>function() { this.test();} : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -68,7 +68,7 @@ export const f3 = function() { /** @type {(this: import('./types').Foo) => void} */ export function f4() { ->f4 : (this: import('./types').Foo) => void +>f4 : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -84,9 +84,9 @@ export function f4() { /** @type {function(this: import('./types').Foo): void} */ export const f5 = function() { ->f5 : (this: import('./types').Foo) => void +>f5 : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import('./types').Foo) => void +>function() { this.test();} : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -102,7 +102,7 @@ export const f5 = function() { /** @type {function(this: import('./types').Foo): void} */ export function f6() { ->f6 : (this: import('./types').Foo) => void +>f6 : (this: import("./types").Foo) => void > : ^ ^^ ^^^^^ this.test(); diff --git a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types index 50b4f5283c525..95c1f25caba6c 100644 --- a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types +++ b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types @@ -13,7 +13,7 @@ import * as React from "react"; > : ^^^^^^^^^^^^ function SomeComponent(props: { element?: T } & JSX.IntrinsicElements[T]): JSX.Element { ->SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element +>SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >props : { element?: T; } & JSX.IntrinsicElements[T] > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ function SomeComponent(props: { element?: T } & JSX.In } function Test(el: T) { ->Test : (el: T) => JSX.Element +>Test : (el: T) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^ >el : T > : ^ @@ -41,7 +41,7 @@ function Test(el: T) { return > : JSX.Element > : ^^^^^^^^^^^ ->SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element +>SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element > : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^ >element : T > : ^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index d1a30f6d0e2e0..33fafc02e83a9 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1676,7 +1676,7 @@ function f80(obj: T) { } function f81(obj: T) { ->f81 : (obj: T) => T['a']['x'] +>f81 : (obj: T) => T["a"]["x"] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >a : { x: any; } > : ^^^^^ ^^^ @@ -1709,7 +1709,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: "hello" } }) : string > : ^^^^^^ ->f81 : (obj: T) => T['a']['x'] +>f81 : (obj: T) => T["a"]["x"] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: "hello" } } : { a: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1727,7 +1727,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: 42 } }) : number > : ^^^^^^ ->f81 : (obj: T) => T['a']['x'] +>f81 : (obj: T) => T["a"]["x"] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: 42 } } : { a: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1742,7 +1742,7 @@ function f82() { } function f83(obj: T, key: K) { ->f83 : (obj: T, key: K) => T[K]['x'] +>f83 : (obj: T, key: K) => T[K]["x"] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : string > : ^^^^^^ @@ -1777,7 +1777,7 @@ function f84() { > : ^^^^^^ >f83({ foo: { x: "hello" } }, "foo") : string > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]['x'] +>f83 : (obj: T, key: K) => T[K]["x"] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ foo: { x: "hello" } } : { foo: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1797,7 +1797,7 @@ function f84() { > : ^^^^^^ >f83({ bar: { x: 42 } }, "bar") : number > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]['x'] +>f83 : (obj: T, key: K) => T[K]["x"] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ bar: { x: 42 } } : { bar: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2662,7 +2662,7 @@ type MethodDescriptor = { } declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; ->dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] +>dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >name : M["name"] > : ^^^^^^^^^ @@ -2691,7 +2691,7 @@ let result = dispatchMethod("someMethod", ["hello", 35]); > : ^^^^^^^^ >dispatchMethod("someMethod", ["hello", 35]) : string[] > : ^^^^^^^^ ->dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] +>dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >"someMethod" : "someMethod" > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index 31ea388d72f05..526abef4fd1bf 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -5,7 +5,7 @@ Type Count: 1,000 === keyofAndIndexedAccess2.ts === function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') { ->f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') => void +>f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: "a", k1: "a" | "b", k2: "a" | "b" | "c") => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >obj : { a: number; b: 0 | 1; c: string; } > : ^^^^^ ^^^^^ ^^^^^ ^^^ @@ -714,7 +714,7 @@ type B = A<{ [Q in keyof T]: StrictExclude, {}>; }>; // Repros from #30938 function fn} | {elements: Array}>(param: T, cb: (element: T['elements'][number]) => void) { ->fn : ; } | { elements: Array; }>(param: T, cb: (element: T['elements'][number]) => void) => void +>fn : ; } | { elements: Array; }>(param: T, cb: (element: T["elements"][number]) => void) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >elements : string[] > : ^^^^^^^^ @@ -722,7 +722,7 @@ function fn} | {elements: Array}>(par > : ^^^^^^^^ >param : T > : ^ ->cb : (element: T['elements'][number]) => void +>cb : (element: T["elements"][number]) => void > : ^ ^^ ^^^^^ >element : T["elements"][number] > : ^^^^^^^^^^^^^^^^^^^^^ @@ -730,7 +730,7 @@ function fn} | {elements: Array}>(par cb(param.elements[0]); >cb(param.elements[0]) : void > : ^^^^ ->cb : (element: T['elements'][number]) => void +>cb : (element: T["elements"][number]) => void > : ^ ^^ ^^^^^ >param.elements[0] : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).types b/tests/baselines/reference/logicalAssignment2(target=es2015).types index c3e7547ef76c6..fc36053a8b0fc 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).types b/tests/baselines/reference/logicalAssignment2(target=es2020).types index c3e7547ef76c6..fc36053a8b0fc 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).types b/tests/baselines/reference/logicalAssignment2(target=es2021).types index c3e7547ef76c6..fc36053a8b0fc 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2021).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).types b/tests/baselines/reference/logicalAssignment2(target=esnext).types index c3e7547ef76c6..fc36053a8b0fc 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ''; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ""; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeConstraints.types b/tests/baselines/reference/mappedTypeConstraints.types index 193ff8aff09ea..b796c17e79844 100644 --- a/tests/baselines/reference/mappedTypeConstraints.types +++ b/tests/baselines/reference/mappedTypeConstraints.types @@ -2,7 +2,7 @@ === mappedTypeConstraints.ts === function f0(obj: Pick>) { ->f0 : (obj: Pick>) => void +>f0 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -21,7 +21,7 @@ function f0(obj: Pick(obj: Pick>) { ->f1 : (obj: Pick>) => void +>f1 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -102,7 +102,7 @@ function f3(obj: Record | 'c', string>) { ->f4 : (obj: Record | 'c', string>) => void +>f4 : (obj: Record | "c", string>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/mappedTypeContextualTypesApplied.types b/tests/baselines/reference/mappedTypeContextualTypesApplied.types index 92f1b2490ed15..25ddfbb721ece 100644 --- a/tests/baselines/reference/mappedTypeContextualTypesApplied.types +++ b/tests/baselines/reference/mappedTypeContextualTypesApplied.types @@ -52,13 +52,13 @@ declare function mapped7(obj: {[P in K]: TakeString}): void > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped8(obj: {[P in K]: TakeString}): void; ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped9(obj: {[P in K]: TakeString}): void; ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ @@ -178,7 +178,7 @@ mapped7({foo: s => 42}); mapped8({foo: s => 42}); >mapped8({foo: s => 42}) : void > : ^^^^ ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ @@ -194,7 +194,7 @@ mapped8({foo: s => 42}); mapped9({foo: s => 42}); >mapped9({foo: s => 42}) : void > : ^^^^ ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types index a1925ac08399e..4cb47fadcc2de 100644 --- a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types +++ b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types @@ -121,7 +121,7 @@ type TypesMap = { > : ^^^^^^^^ [0]: { foo: 'bar'; }; ->[0] : { foo: 'bar'; } +>[0] : { foo: "bar"; } > : ^^^^^^^ ^^^ >0 : 0 > : ^ @@ -129,7 +129,7 @@ type TypesMap = { > : ^^^^^ [1]: { a: 'b'; }; ->[1] : { a: 'b'; } +>[1] : { a: "b"; } > : ^^^^^ ^^^ >1 : 1 > : ^ @@ -227,7 +227,7 @@ const onSomeEvent = (p: P) => > : ^^^^^^^^^^^^ >p.t : T > : ^ ->p : { t: T; } & ({ foo: 'bar'; } | { a: 'b'; }) +>p : { t: T; } & ({ foo: "bar"; } | { a: "b"; }) > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^ >t : T > : ^ diff --git a/tests/baselines/reference/mappedTypeProperties.types b/tests/baselines/reference/mappedTypeProperties.types index 63bdec8d79fe9..e9196aa6416e2 100644 --- a/tests/baselines/reference/mappedTypeProperties.types +++ b/tests/baselines/reference/mappedTypeProperties.types @@ -49,7 +49,7 @@ type AfterMethod = { [placeType in PlaceType]?: void; model(duration: number): 'hour' | 'day'; ->model : (duration: number) => 'hour' | 'day' +>model : (duration: number) => "hour" | "day" > : ^ ^^ ^^^^^ >duration : number > : ^^^^^^ diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types index 44eded1ac6b56..bef0bd6187da7 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -78,19 +78,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -98,7 +98,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -133,19 +133,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -153,7 +153,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: number); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -203,7 +203,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -267,11 +267,11 @@ var r4 = D.bar(''); // error > : ^^^ >D.bar('') : any > : ^^^ ->D.bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>D.bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >D : typeof D > : ^^^^^^^^ ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >'' : "" > : ^^ diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types index 0f73b797ba104..9561281325dcf 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types @@ -26,19 +26,19 @@ class C { >y : any public bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -46,7 +46,7 @@ class C { > : ^^^^^^ public bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -72,19 +72,19 @@ class C { >y : any public static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -92,7 +92,7 @@ class C { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -123,19 +123,19 @@ class D { >y : any public bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: T, y: T); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -143,7 +143,7 @@ class D { > : ^ public bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -169,19 +169,19 @@ class D { >y : any public static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -189,7 +189,7 @@ class D { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types index 444d973ecf083..47ca9abf3fc24 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -100,19 +100,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -120,7 +120,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -128,19 +128,19 @@ class C { > : ^^^ protected static baz(x: 'hi'); ->baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static baz(x: string); // error ->baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ protected static baz(x: number, y: string); ->baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -148,7 +148,7 @@ class C { > : ^^^^^^ protected static baz(x: any, y?: any) { } ->baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -203,7 +203,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -255,19 +255,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -275,7 +275,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ diff --git a/tests/baselines/reference/moduleExportAssignment7.types b/tests/baselines/reference/moduleExportAssignment7.types index eaa6e5a839bdd..f1a28a864dbed 100644 --- a/tests/baselines/reference/moduleExportAssignment7.types +++ b/tests/baselines/reference/moduleExportAssignment7.types @@ -227,7 +227,7 @@ function jsvalues(a, b, c, d, e, f, g) { === index.ts === function types( ->types : (a: import('./mod').Thing, b: import('./mod').AnotherThing, c: import('./mod').foo, d: import('./mod').qux, e: import('./mod').baz, f: import('./mod').buz, g: import('./mod').literal) => any +>types : (a: import("./mod").Thing, b: import("./mod").AnotherThing, c: import("./mod").foo, d: import("./mod").qux, e: import("./mod").baz, f: import("./mod").buz, g: import("./mod").literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: import('./mod').Thing, @@ -309,7 +309,7 @@ function types( } function values( ->values : (a: typeof import('./mod').Thing, b: typeof import('./mod').AnotherThing, c: typeof import('./mod').foo, d: typeof import('./mod').qux, e: typeof import('./mod').baz, f: typeof import('./mod').buz, g: typeof import('./mod').literal) => any +>values : (a: typeof import("./mod").Thing, b: typeof import("./mod").AnotherThing, c: typeof import("./mod").foo, d: typeof import("./mod").qux, e: typeof import("./mod").baz, f: typeof import("./mod").buz, g: typeof import("./mod").literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: typeof import('./mod').Thing, diff --git a/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types b/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types index c0c0d97beb5a7..f44f3b61876d7 100644 --- a/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types +++ b/tests/baselines/reference/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.types @@ -4,7 +4,7 @@ const eslintReact = require('./eslint-plugin-react.js'); >eslintReact : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->require('./eslint-plugin-react.js') : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } +>require('./eslint-plugin-react.js') : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >require : any >'./eslint-plugin-react.js' : "./eslint-plugin-react.js" @@ -65,21 +65,21 @@ module.exports = { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >module : { exports: { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } +>exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; }; } +>{ plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ plugins: { >plugins : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ react: { deprecatedRules, rules: allRules, }, } : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; }; } +>{ react: { deprecatedRules, rules: allRules, }, } : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ react: { >react : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ deprecatedRules, rules: allRules, } : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { "no-unsafe": boolean; }; } +>{ deprecatedRules, rules: allRules, } : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deprecatedRules, @@ -89,7 +89,7 @@ module.exports = { rules: allRules, >rules : { 'no-unsafe': boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->allRules : { "no-unsafe": boolean; } +>allRules : { 'no-unsafe': boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ }, diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types index 4a6b52c77c403..c1346f70b6de1 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types @@ -2,7 +2,7 @@ === narrowExceptionVariableInCatchClause.ts === declare function isFooError(x: any): x is { type: 'foo'; dontPanic(); }; ->isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } +>isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >x : any > : ^^^ @@ -25,7 +25,7 @@ function tryCatch() { if (isFooError(err)) { >isFooError(err) : boolean > : ^^^^^^^ ->isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } +>isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >err : any > : ^^^ @@ -35,7 +35,7 @@ function tryCatch() { > : ^^^ >err.dontPanic : () => any > : ^^^^^^^^^ ->err : { type: 'foo'; dontPanic(): any; } +>err : { type: "foo"; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >dontPanic : () => any > : ^^^^^^^^^ @@ -45,7 +45,7 @@ function tryCatch() { > : ^^^ >err.doPanic : any > : ^^^ ->err : { type: 'foo'; dontPanic(): any; } +>err : { type: "foo"; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >doPanic : any > : ^^^ diff --git a/tests/baselines/reference/narrowingByTypeofInSwitch.types b/tests/baselines/reference/narrowingByTypeofInSwitch.types index c0ba268379570..ef91b62d22aa9 100644 --- a/tests/baselines/reference/narrowingByTypeofInSwitch.types +++ b/tests/baselines/reference/narrowingByTypeofInSwitch.types @@ -1358,7 +1358,7 @@ function narrowingNarrows(x: {} | undefined) { } function narrowingNarrows2(x: true | 3 | 'hello' | undefined) { ->narrowingNarrows2 : (x: true | 3 | 'hello' | undefined) => void +>narrowingNarrows2 : (x: true | 3 | "hello" | undefined) => void > : ^ ^^ ^^^^^^^^^ >x : true | 3 | "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/narrowingTypeofDiscriminant.types b/tests/baselines/reference/narrowingTypeofDiscriminant.types index af0319b89cccf..33e2111a90856 100644 --- a/tests/baselines/reference/narrowingTypeofDiscriminant.types +++ b/tests/baselines/reference/narrowingTypeofDiscriminant.types @@ -2,9 +2,9 @@ === narrowingTypeofDiscriminant.ts === function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { ->f1 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; }) => void +>f1 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } +>obj : { kind: "a"; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" > : ^^^ @@ -22,7 +22,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj.kind : "a" | 1 > : ^^^^^^^ ->obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } +>obj : { kind: "a"; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" | 1 > : ^^^^^^^ @@ -30,7 +30,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: 'a'; data: string; } +>obj : { kind: "a"; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { @@ -41,9 +41,9 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { } function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undefined) { ->f2 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined) => void +>f2 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" > : ^^^ @@ -61,7 +61,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj?.kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: 'a'; data: string; } +>obj : { kind: "a"; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { diff --git a/tests/baselines/reference/narrowingUnionToUnion.types b/tests/baselines/reference/narrowingUnionToUnion.types index e464b2a081c01..f090c9357be17 100644 --- a/tests/baselines/reference/narrowingUnionToUnion.types +++ b/tests/baselines/reference/narrowingUnionToUnion.types @@ -271,13 +271,13 @@ v2; // 6 | undefined // #39105 declare function isEmptyString(value: string): value is ''; ->isEmptyString : (value: string) => value is '' +>isEmptyString : (value: string) => value is "" > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ declare function isMaybeEmptyString(value: string | null | undefined): value is '' | null | undefined; ->isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined > : ^ ^^ ^^^^^ >value : string | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -321,7 +321,7 @@ const TEST_CASES = [ if (isEmptyString(value)) { >isEmptyString(value) : boolean > : ^^^^^^^ ->isEmptyString : (value: string) => value is '' +>isEmptyString : (value: string) => value is "" > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -338,7 +338,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -362,7 +362,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined > : ^ ^^ ^^^^^ >value : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -795,7 +795,7 @@ isMyDiscriminatedUnion(working) && working.type === 'A' && working.aProp; > : ^^^ >working.aProp : number > : ^^^^^^ ->working : { type: 'A'; aProp: number; } +>working : { type: "A"; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -823,7 +823,7 @@ isMyDiscriminatedUnion(broken) && broken.type === 'A' && broken.aProp; > : ^^^ >broken.aProp : number > : ^^^^^^ ->broken : { type: 'A'; aProp: number; } +>broken : { type: "A"; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -851,7 +851,7 @@ isMyDiscriminatedUnion(workingAgain) && workingAgain.type === 'A' && workingAgai > : ^^^ >workingAgain.aProp : number > : ^^^^^^ ->workingAgain : { type: 'A'; aProp: number; } +>workingAgain : { type: "A"; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -879,7 +879,7 @@ type Union = > : ^^^ function example1(value: Union): { type: 'a'; variant: 2 } | null { ->example1 : (value: Union) => { type: 'a'; variant: 2; } | null +>example1 : (value: Union) => { type: "a"; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -907,7 +907,7 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -917,12 +917,12 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example2(value: Union): { type: 'a'; variant: 2 } | null { ->example2 : (value: Union) => { type: 'a'; variant: 2; } | null +>example2 : (value: Union) => { type: "a"; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -952,7 +952,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -962,7 +962,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -972,12 +972,12 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example3(value: Union): { type: 'a'; variant: 2 } | null { ->example3 : (value: Union) => { type: 'a'; variant: 2; } | null +>example3 : (value: Union) => { type: "a"; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -1005,7 +1005,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -1013,7 +1013,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -1023,7 +1023,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: 'a'; variant: 2; } +>value : { type: "a"; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/narrowingUnionWithBang.types b/tests/baselines/reference/narrowingUnionWithBang.types index 8bc7e3fef0307..6b751d5a69d06 100644 --- a/tests/baselines/reference/narrowingUnionWithBang.types +++ b/tests/baselines/reference/narrowingUnionWithBang.types @@ -6,7 +6,7 @@ type WorkingType = { > : ^^^^^^^^^^^ thing?: ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -83,13 +83,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^^^^ >working.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } +>working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined +>working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -107,13 +107,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.message : string > : ^^^^^^ ->working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } +>working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined +>working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -130,13 +130,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.id : string > : ^^^^^^ ->working.thing! : { name: 'Correct'; id: string; } +>working.thing! : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: 'Correct'; id: string; } +>working.thing : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: 'Correct'; id: string; } +>thing : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ @@ -147,7 +147,7 @@ type BorkedType = { > : ^^^^^^^^^^ thing?: ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -218,13 +218,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^^^^ >borked.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } +>borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -242,13 +242,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.message : string > : ^^^^^^ ->borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } +>borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined +>borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -265,13 +265,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.id : string > : ^^^^^^ ->borked.thing! : { name: 'Correct'; id: string; } +>borked.thing! : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: 'Correct'; id: string; } | undefined +>borked.thing : { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: 'Correct'; id: string; } | undefined +>thing : { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >id : string > : ^^^^^^ @@ -282,7 +282,7 @@ export type FixedType = { > : ^^^^^^^^^ thing?: ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -353,11 +353,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^^^^ >fixed.thing?.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -375,13 +375,13 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing!.message : string > : ^^^^^^ ->fixed.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } +>fixed.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined +>fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined +>thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -398,11 +398,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing.id : string > : ^^^^^^ ->fixed.thing : { name: 'Correct'; id: string; } +>fixed.thing : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: 'Correct'; id: string; } +>thing : { name: "Correct"; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ diff --git a/tests/baselines/reference/nestedExcessPropertyChecking.types b/tests/baselines/reference/nestedExcessPropertyChecking.types index 1952900200ae7..556fe677a74f0 100644 --- a/tests/baselines/reference/nestedExcessPropertyChecking.types +++ b/tests/baselines/reference/nestedExcessPropertyChecking.types @@ -169,7 +169,7 @@ type T1 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number, dark: number } }, ->primary : { __typename?: 'Feature'; } & { colors: { light: number; dark: number; }; } +>primary : { __typename?: "Feature"; } & { colors: { light: number; dark: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ @@ -187,7 +187,7 @@ type T2 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number } }, ->primary : { __typename?: 'Feature'; } & { colors: { light: number; }; } +>primary : { __typename?: "Feature"; } & { colors: { light: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types index 1b13ffd8c044e..57e268fa0127d 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: 'a'; a: number; } +>foo : { kind: "a"; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: 'a'; a: number; } +>foo : { kind?: "a"; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types index 761530abbcaf7..a951c8c7bca02 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: 'a'; a: number; } +>foo : { kind: "a"; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: 'a'; a: number; } +>foo : { kind?: "a"; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types index 9806bfb995775..8047f6e8859d5 100644 --- a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types +++ b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types @@ -2,9 +2,9 @@ === objectLiteralComputedNameNoDeclarationError.ts === const Foo = { ->Foo : { BANANA: 'banana'; } +>Foo : { BANANA: "banana"; } > : ^^^^^^^^^^ ^^^ ->{ BANANA: 'banana' as 'banana',} : { BANANA: 'banana'; } +>{ BANANA: 'banana' as 'banana',} : { BANANA: "banana"; } > : ^^^^^^^^^^ ^^^ BANANA: 'banana' as 'banana', @@ -27,7 +27,7 @@ export const Baa = { > : ^^^^^^ >Foo.BANANA : "banana" > : ^^^^^^^^ ->Foo : { BANANA: 'banana'; } +>Foo : { BANANA: "banana"; } > : ^^^^^^^^^^ ^^^ >BANANA : "banana" > : ^^^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types index 01c5b4f4faef5..dc28aaafe6b2d 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types @@ -2,11 +2,11 @@ === overloadOnConstAsTypeAnnotation.ts === var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; ->f : (x: 'hi') => number +>f : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ ->(x: 'hi') => { return 1; } : (x: 'hi') => number +>(x: 'hi') => { return 1; } : (x: "hi") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.types b/tests/baselines/reference/overloadOnConstConstraintChecks1.types index af32e16667a4c..0435f9c5aa294 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface MyDoc { // Document createElement(tagName: string): Base; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -64,31 +64,31 @@ class D implements MyDoc { > : ^ createElement(tagName:string): Base; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName:any): Base { ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.types b/tests/baselines/reference/overloadOnConstConstraintChecks2.types index e8464759afddf..fa858c33ac07f 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.types @@ -22,25 +22,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.types b/tests/baselines/reference/overloadOnConstConstraintChecks3.types index bd173b4b4a2e9..2f11866bac12f 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.types @@ -26,25 +26,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.types b/tests/baselines/reference/overloadOnConstConstraintChecks4.types index b029c72756175..e952a8b82a8a9 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.types @@ -32,25 +32,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): Z { ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types index b23ef6b4d356b..d259f9dd7d8eb 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types @@ -2,7 +2,7 @@ === overloadOnConstDuplicateOverloads1.ts === function foo(a: 'hi', x: string); ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,14 +18,14 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: any, x: any) { ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any } function foo2(a: 'hi', x: string); ->foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -33,7 +33,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: 'hi', x: string); ->foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -41,7 +41,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: string, x: string); ->foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -49,7 +49,7 @@ function foo2(a: string, x: string); > : ^^^^^^ function foo2(a: any, x: any) { ->foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types index a73cd8ead960a..e7c08aae5eda2 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types @@ -3,11 +3,11 @@ === overloadOnConstInBaseWithBadImplementationInDerived.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,11 +18,11 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number) { // error ->x1 : (a: number, callback: (x: 'hi') => number) => void +>x1 : (a: number, callback: (x: "hi") => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInCallback1.types b/tests/baselines/reference/overloadOnConstInCallback1.types index f6bc02f9e0a99..d6fbf6618b16d 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.types +++ b/tests/baselines/reference/overloadOnConstInCallback1.types @@ -6,17 +6,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); // error ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types index 623a66d6bc8e4..fd6ec9be0733e 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types @@ -3,11 +3,11 @@ === overloadOnConstInObjectLiteralImplementingAnInterface.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -16,15 +16,15 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error >i2 : I > : ^ ->{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: 'hi') => number) => void; } +>{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: "hi") => number) => void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^ ->x1 : (a: number, cb: (x: 'hi') => number) => void +>x1 : (a: number, cb: (x: "hi") => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: 'hi') => number) => void +>(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: "hi") => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: 'hi') => number +>cb : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance1.types b/tests/baselines/reference/overloadOnConstInheritance1.types index 407a32a6f4180..3e80860905016 100644 --- a/tests/baselines/reference/overloadOnConstInheritance1.types +++ b/tests/baselines/reference/overloadOnConstInheritance1.types @@ -3,26 +3,26 @@ === overloadOnConstInheritance1.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: 'foo'): string; } +>addEventListener : { (x: string): any; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: 'foo'): string; } +>addEventListener : { (x: string): any; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: 'bar'): string; } +>addEventListener : { (x: string): any; (x: "bar"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'bar'): string; ->addEventListener : { (x: string): any; (x: 'bar'): string; } +>addEventListener : { (x: string): any; (x: "bar"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance2.types b/tests/baselines/reference/overloadOnConstInheritance2.types index 8ddb696cfeee8..844822f06ef40 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.types +++ b/tests/baselines/reference/overloadOnConstInheritance2.types @@ -3,20 +3,20 @@ === overloadOnConstInheritance2.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: 'foo'): string; } +>addEventListener : { (x: string): any; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: 'foo'): string; } +>addEventListener : { (x: string): any; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ->addEventListener : (x: 'bar') => string +>addEventListener : (x: "bar") => string > : ^ ^^ ^^^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance3.types b/tests/baselines/reference/overloadOnConstInheritance3.types index 2d748590e5939..3ea531168275a 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.types +++ b/tests/baselines/reference/overloadOnConstInheritance3.types @@ -11,13 +11,13 @@ interface Base { interface Deriver extends Base { // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ->addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } +>addEventListener : { (x: "bar"): string; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } +>addEventListener : { (x: "bar"): string; (x: "foo"): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance4.types b/tests/baselines/reference/overloadOnConstInheritance4.types index 5ae4d5963d2b2..f02d2e8a8f6a8 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.types +++ b/tests/baselines/reference/overloadOnConstInheritance4.types @@ -3,11 +3,11 @@ === overloadOnConstInheritance4.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -17,21 +17,21 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: 'hi') => number) { ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types index f802972283fb7..dfdb13723b2b8 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoAnyImplementation.ts === function x1(a: number, cb: (x: 'hi') => number); ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: 'hi') => number +>cb : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x1(a: number, cb: (x: 'bye') => number); ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: 'bye') => number +>cb : (x: "bye") => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x1(a: number, cb: (x: string) => number) { ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -93,7 +93,7 @@ var cb: (number) => number = (x: number) => 1; x1(1, cb); >x1(1, cb) : any > : ^^^ ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -103,11 +103,11 @@ x1(1, cb); x1(1, (x: 'hi') => 1); // error >x1(1, (x: 'hi') => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: 'hi') => number +>(x: 'hi') => 1 : (x: "hi") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -117,7 +117,7 @@ x1(1, (x: 'hi') => 1); // error x1(1, (x: string) => 1); >x1(1, (x: string) => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index 865419d536ba1..87780c965b643 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,6 +1,6 @@ overloadOnConstNoAnyImplementation2.ts(6,5): error TS2394: This overload signature is not compatible with its implementation signature. overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. +overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. Types of parameters 'x' and 'x' are incompatible. Type '"hi"' is not assignable to type '"bye"'. overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. @@ -33,7 +33,7 @@ overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: Argument of type '(x c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. !!! error TS2345: Types of parameters 'x' and 'x' are incompatible. !!! error TS2345: Type '"hi"' is not assignable to type '"bye"'. !!! related TS2793 overloadOnConstNoAnyImplementation2.ts:7:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types index 99b827bfa5ae9..f0950110a396e 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoAnyImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: string) => number) { ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: 'hi') => number +>(x: 'hi') => { return 1; } : (x: "hi") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: 'bye') => number +>(x: 'bye') => { return 1; } : (x: "bye") => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x) => { return 1; } ); >c.x1(1, (x) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types index 482141bac98d2..30b541a53b46f 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types @@ -6,13 +6,13 @@ class C { > : ^ x1(a: 'hi'); // error, no non-specialized signature in overload list ->x1 : (a: 'hi') => any +>x1 : (a: "hi") => any > : ^ ^^ ^^^^^^^^ >a : "hi" > : ^^^^ x1(a: string) { } ->x1 : (a: 'hi') => any +>x1 : (a: "hi") => any > : ^ ^^ ^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.types b/tests/baselines/reference/overloadOnConstNoStringImplementation.types index aacbb53a4d534..b377838889555 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoStringImplementation.ts === function x2(a: number, cb: (x: 'hi') => number); ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: 'hi') => number +>cb : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x2(a: number, cb: (x: 'bye') => number); ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: 'bye') => number +>cb : (x: "bye") => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x2(a: number, cb: (x: any) => number) { ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -90,7 +90,7 @@ var cb: (number) => number = (x: number) => 1; x2(1, cb); // error >x2(1, cb) : any ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -99,11 +99,11 @@ x2(1, cb); // error x2(1, (x: 'hi') => 1); // error >x2(1, (x: 'hi') => 1) : any ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: 'hi') => number +>(x: 'hi') => 1 : (x: "hi") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -112,7 +112,7 @@ x2(1, (x: 'hi') => 1); // error x2(1, (x: string) => 1); >x2(1, (x: string) => 1) : any ->x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt index 8b8459673d601..89bfe17952419 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt @@ -1,4 +1,4 @@ -overloadOnConstNoStringImplementation2.ts(18,9): error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. +overloadOnConstNoStringImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. Types of parameters 'x' and 'x' are incompatible. Type '"hi"' is not assignable to type '"bye"'. overloadOnConstNoStringImplementation2.ts(20,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. @@ -26,7 +26,7 @@ overloadOnConstNoStringImplementation2.ts(20,9): error TS2345: Argument of type c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: 'bye') => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. !!! error TS2345: Types of parameters 'x' and 'x' are incompatible. !!! error TS2345: Type '"hi"' is not assignable to type '"bye"'. !!! related TS2793 overloadOnConstNoStringImplementation2.ts:7:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types index c0c3a229b3b8b..c8994bf9cab05 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoStringImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: 'hi') => number +>callback : (x: "hi") => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: 'hi') => number +>(x: 'hi') => { return 1; } : (x: "hi") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: 'bye') => number +>(x: 'bye') => { return 1; } : (x: "bye") => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x: string) => { return 1; } ); >c.x1(1, (x: string) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: 'hi') => number) => any +>c.x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: 'hi') => number) => any +>x1 : (a: number, callback: (x: "hi") => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadingOnConstants1.types b/tests/baselines/reference/overloadingOnConstants1.types index 612f46aca3313..d5eaa38fcc370 100644 --- a/tests/baselines/reference/overloadingOnConstants1.types +++ b/tests/baselines/reference/overloadingOnConstants1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface Document2 { createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName: string): Base; ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ @@ -67,11 +67,11 @@ var htmlElement: Base = d2.createElement("yo") > : ^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -81,11 +81,11 @@ var htmlCanvasElement: Derived1 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -95,11 +95,11 @@ var htmlDivElement: Derived2 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -109,11 +109,11 @@ var htmlSpanElement: Derived3 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ @@ -124,11 +124,11 @@ var htmlElement2: Derived1 = d2.createElement("yo") > : ^^^^^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -138,11 +138,11 @@ var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -152,11 +152,11 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -166,11 +166,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.types b/tests/baselines/reference/overloadingOnConstantsInImplementation.types index 3fdc703d97080..2eb49001e50ca 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.types +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.types @@ -2,7 +2,7 @@ === overloadingOnConstantsInImplementation.ts === function foo(a: 'hi', x: string); ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,7 +18,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: any) { ->foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ diff --git a/tests/baselines/reference/override2.types b/tests/baselines/reference/override2.types index b8e7ee2044a72..f2a2b4edf5337 100644 --- a/tests/baselines/reference/override2.types +++ b/tests/baselines/reference/override2.types @@ -39,7 +39,7 @@ abstract class AD2 extends AB { > : ^^ abstract foo(v: ''): void // need override? ->foo : (v: '') => void +>foo : (v: "") => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -52,7 +52,7 @@ abstract class AD3 extends AB { > : ^^ override foo(v: ''): void { } // need override? ->foo : (v: '') => void +>foo : (v: "") => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -73,13 +73,13 @@ class D4 extends AB { > : ^^ override foo(v: ''): void {} ->foo : (v: '') => void +>foo : (v: "") => void > : ^ ^^ ^^^^^ >v : "" > : ^^ override bar(v: ''): void {} ->bar : (v: '') => void +>bar : (v: "") => void > : ^ ^^ ^^^^^ >v : "" > : ^^ diff --git a/tests/baselines/reference/parserOverloadOnConstants1.types b/tests/baselines/reference/parserOverloadOnConstants1.types index 54418697b92be..72d6b1b2091bd 100644 --- a/tests/baselines/reference/parserOverloadOnConstants1.types +++ b/tests/baselines/reference/parserOverloadOnConstants1.types @@ -3,25 +3,25 @@ === parserOverloadOnConstants1.ts === interface Document { createElement(tagName: string): HTMLElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): HTMLCanvasElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): HTMLDivElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): HTMLSpanElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.types b/tests/baselines/reference/primtiveTypesAreIdentical.types index cf93aa6e470c2..f91168e1076aa 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.types +++ b/tests/baselines/reference/primtiveTypesAreIdentical.types @@ -70,25 +70,25 @@ function foo4(x: any) { } >x : any function foo5(x: 'a'); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: 'a'); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: string); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo5(x: any) { } ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.types b/tests/baselines/reference/ramdaToolsNoInfinite2.types index ad503a024bd31..e4734af9f8f8c 100644 --- a/tests/baselines/reference/ramdaToolsNoInfinite2.types +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.types @@ -562,7 +562,7 @@ declare module "Number/_Internal" { > : ^^^^^^^ 'string': { ->'string' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'string' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; @@ -583,7 +583,7 @@ declare module "Number/_Internal" { }; 'number': { ->'number' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'number' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index e669804e7a715..f09267bc93ba3 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -547,7 +547,7 @@ type Enumerate = number extends N : never; function foo2(value: T): Enumerate { ->foo2 : (value: T) => Enumerate +>foo2 : (value: T) => Enumerate > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : T > : ^ diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.types b/tests/baselines/reference/specializedOverloadWithRestParameters.types index ee70c4e919684..a4ee8a63e0ca4 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.types +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.types @@ -16,7 +16,7 @@ class Derived1 extends Base { bar() { } } > : ^^^^^^^^^^ function f(tagName: 'span', ...args): Derived1; // error ->f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -24,7 +24,7 @@ function f(tagName: 'span', ...args): Derived1; // error > : ^^^^^ function f(tagName: number, ...args): Base; ->f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ @@ -32,28 +32,28 @@ function f(tagName: number, ...args): Base; > : ^^^^^ function f(tagName: any): Base { ->f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : any return null; } function g(tagName: 'span', arg): Derived1; // error ->g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ >arg : any function g(tagName: number, arg): Base; ->g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ >arg : any function g(tagName: any): Base { ->g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt index bdd5f681c2c5e..234f36b61c230 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -7,7 +7,7 @@ specializedSignatureAsCallbackParameter1.ts(7,1): error TS2769: No overload matc Argument of type 'number' is not assignable to parameter of type 'string'. specializedSignatureAsCallbackParameter1.ts(8,1): error TS2769: No overload matches this call. Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. - Argument of type '(x: 'hm') => number' is not assignable to parameter of type '(x: number) => number'. + Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type '"hm"'. Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. @@ -34,7 +34,7 @@ specializedSignatureAsCallbackParameter1.ts(8,1): error TS2769: No overload matc ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. -!!! error TS2769: Argument of type '(x: 'hm') => number' is not assignable to parameter of type '(x: number) => number'. +!!! error TS2769: Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. !!! error TS2769: Types of parameters 'x' and 'x' are incompatible. !!! error TS2769: Type 'number' is not assignable to type '"hm"'. !!! error TS2769: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types index a91828852cf55..4db6bb86a7213 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types @@ -61,7 +61,7 @@ x3(1, (x: 'hm') => 1); > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hm') => 1 : (x: 'hm') => number +>(x: 'hm') => 1 : (x: "hm") => number > : ^ ^^ ^^^^^^^^^^^ >x : "hm" > : ^^^^ diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types index f97ef6b8a4054..d92de312d36f7 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types @@ -2,13 +2,13 @@ === specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts === function foo(x: 'a'); ->foo : (x: 'a') => any +>foo : (x: "a") => any > : ^ ^^ ^^^^^^^^ >x : "a" > : ^^^ function foo(x: number) { } ->foo : (x: 'a') => any +>foo : (x: "a") => any > : ^ ^^ ^^^^^^^^ >x : number > : ^^^^^^ @@ -18,19 +18,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -41,19 +41,19 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -64,19 +64,19 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -92,13 +92,13 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -114,13 +114,13 @@ interface I2 { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -136,20 +136,20 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: 'a'): any; (x: number): any; foo(x: 'a'): any; foo(x: number): any; } +>a : { (x: "a"): any; (x: number): any; foo(x: "a"): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -161,20 +161,20 @@ var a: { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: 'a'): any; (x: number): any; } +>foo : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } +>a2 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -186,20 +186,20 @@ var a2: { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } +>a3 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -211,13 +211,13 @@ var a3: { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: T): any; } +>foo : { (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index 811fe6a98a2df..98480b9816223 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -5,19 +5,19 @@ // All the below should not be errors function foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -26,19 +26,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -48,25 +48,25 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -76,25 +76,25 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -113,19 +113,19 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: number); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -145,19 +145,19 @@ interface I2 { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -177,26 +177,26 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: string): any; (x: 'a'): any; (x: number): any; foo(x: string): any; foo(x: 'a'): any; foo(x: number): any; } +>a : { (x: string): any; (x: "a"): any; (x: number): any; foo(x: string): any; foo(x: "a"): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: string); @@ -212,26 +212,26 @@ var a: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: 'a'): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } +>a2 : { (x: "a"): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -247,26 +247,26 @@ var a2: { > : ^ foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: 'a'): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } +>a3 : { (x: "a"): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -282,19 +282,19 @@ var a3: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types index ed49beceb1831..500f68537fdb4 100644 --- a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types +++ b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types @@ -22,7 +22,7 @@ call(function* (a: 'a') { }); // error, 2nd argument required > : ^^^ >call : any>(fn: Fn, ...args: Parameters) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^ ->function* (a: 'a') { } : (a: 'a') => {} +>function* (a: 'a') { } : (a: "a") => {} > : ^ ^^ ^^^^^^^ >a : "a" > : ^^^ diff --git a/tests/baselines/reference/spreadsAndContextualTupleTypes.types b/tests/baselines/reference/spreadsAndContextualTupleTypes.types index a9b82f240dbad..a7e2d9aec9a77 100644 --- a/tests/baselines/reference/spreadsAndContextualTupleTypes.types +++ b/tests/baselines/reference/spreadsAndContextualTupleTypes.types @@ -2,13 +2,13 @@ === spreadsAndContextualTupleTypes.ts === declare function fx1(x: T): T; ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ declare function fx2(x: T): T; ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ @@ -30,7 +30,7 @@ const t3 = ['x', 'y', 'z'] as const; fx1(['x', 'y', 'z', 'a']); >fx1(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ fx1(['x', 'y', 'z', 'a']); fx1([...t3, 'a']); >fx1([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ fx1([...t3, 'a']); fx2(['x', 'y', 'z', 'a']); >fx2(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ fx2(['x', 'y', 'z', 'a']); fx2([...t3, 'a']); >fx2([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/spuriousCircularityOnTypeImport.types b/tests/baselines/reference/spuriousCircularityOnTypeImport.types index 375666708ce4e..8816b1f1904ab 100644 --- a/tests/baselines/reference/spuriousCircularityOnTypeImport.types +++ b/tests/baselines/reference/spuriousCircularityOnTypeImport.types @@ -21,11 +21,11 @@ export type SelectorMap unkno }; export declare const value2: { ->value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } +>value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } > : ^^^^^^^^^^^^^^^^^^ ^^^ sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters }; ->sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } +>sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >selectorsBySlice : FuncMap > : ^^^^^^^ diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index fb51e3e2459f4..c6182b8e834c1 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -660,13 +660,13 @@ declare function doesValueAtDeepPathSatisfy< type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; >Foo : Foo > : ^^^ ->value : { type: 'A'; } +>value : { type: "A"; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ >a : number | undefined > : ^^^^^^^^^^^^^^^^^^ ->value : { type: 'B'; } +>value : { type: "B"; } > : ^^^^^^^^ ^^^ >type : "B" > : ^^^ @@ -674,13 +674,13 @@ type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; > : ^^^^^^^^^^^^^^^^^^ declare function isA(arg: unknown): arg is 'A'; ->isA : (arg: unknown) => arg is 'A' +>isA : (arg: unknown) => arg is "A" > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ declare function isB(arg: unknown): arg is 'B'; ->isB : (arg: unknown) => arg is 'B' +>isB : (arg: unknown) => arg is "B" > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ @@ -692,11 +692,11 @@ declare function assert(condition: boolean): asserts condition; > : ^^^^^^^ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { ->test1 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } +>test1 : (foo: Foo) => { value: { type: "A"; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: 'A'; } +>value : { type: "A"; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -720,20 +720,20 @@ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isA : (arg: unknown) => arg is 'A' +>isA : (arg: unknown) => arg is "A" > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: 'A'; }; a?: number; } +>foo : { value: { type: "A"; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } function test2(foo: Foo): {value: {type: 'A'}; a?: number} { ->test2 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } +>test2 : (foo: Foo) => { value: { type: "A"; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: 'A'; } +>value : { type: "A"; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -759,11 +759,11 @@ function test2(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isB : (arg: unknown) => arg is 'B' +>isB : (arg: unknown) => arg is "B" > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: 'A'; }; a?: number; } +>foo : { value: { type: "A"; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } diff --git a/tests/baselines/reference/stringLiteralType.types b/tests/baselines/reference/stringLiteralType.types index 4f43fe8babce8..6d11b3fc86748 100644 --- a/tests/baselines/reference/stringLiteralType.types +++ b/tests/baselines/reference/stringLiteralType.types @@ -6,19 +6,19 @@ var x: 'hi'; > : ^^^^ function f(x: 'hi'); ->f : { (x: 'hi'): any; (x: string): any; } +>f : { (x: "hi"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ function f(x: string); ->f : { (x: 'hi'): any; (x: string): any; } +>f : { (x: "hi"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f(x: any) { ->f : { (x: 'hi'): any; (x: string): any; } +>f : { (x: "hi"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types index cdc5dafc4972b..1e85210806b21 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types @@ -5,157 +5,157 @@ // ok function f1(x: 'a'); ->f1 : { (x: 'a'): any; (x: string): any; } +>f1 : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f1(x: string); ->f1 : { (x: 'a'): any; (x: string): any; } +>f1 : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f1(x: string) { } ->f1 : { (x: 'a'): any; (x: string): any; } +>f1 : { (x: "a"): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ // ok function f2(x: 'a'); ->f2 : { (x: 'a'): any; (x: any): any; } +>f2 : { (x: "a"): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f2(x: any); ->f2 : { (x: 'a'): any; (x: any): any; } +>f2 : { (x: "a"): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f2(x: any) { } ->f2 : { (x: 'a'): any; (x: any): any; } +>f2 : { (x: "a"): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any // errors function f3(x: 'a'); ->f3 : { (x: 'a'): any; (x: Object): any; } +>f3 : { (x: "a"): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f3(x: Object); ->f3 : { (x: 'a'): any; (x: Object): any; } +>f3 : { (x: "a"): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Object > : ^^^^^^ function f3(x: any) { } ->f3 : { (x: 'a'): any; (x: Object): any; } +>f3 : { (x: "a"): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f4(x: 'a'); ->f4 : { (x: 'a'): any; (x: {}): any; } +>f4 : { (x: "a"): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f4(x: {}); ->f4 : { (x: 'a'): any; (x: {}): any; } +>f4 : { (x: "a"): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : {} > : ^^ function f4(x: any) { } ->f4 : { (x: 'a'): any; (x: {}): any; } +>f4 : { (x: "a"): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f5(x: 'a'); ->f5 : { (x: 'a'): any; (x: number): any; } +>f5 : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f5(x: number); ->f5 : { (x: 'a'): any; (x: number): any; } +>f5 : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ function f5(x: any) { } ->f5 : { (x: 'a'): any; (x: number): any; } +>f5 : { (x: "a"): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f6(x: 'a'); ->f6 : { (x: 'a'): any; (x: boolean): any; } +>f6 : { (x: "a"): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f6(x: boolean); ->f6 : { (x: 'a'): any; (x: boolean): any; } +>f6 : { (x: "a"): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : boolean > : ^^^^^^^ function f6(x: any) { } ->f6 : { (x: 'a'): any; (x: boolean): any; } +>f6 : { (x: "a"): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f7(x: 'a'); ->f7 : { (x: 'a'): any; (x: Date): any; } +>f7 : { (x: "a"): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f7(x: Date); ->f7 : { (x: 'a'): any; (x: Date): any; } +>f7 : { (x: "a"): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Date > : ^^^^ function f7(x: any) { } ->f7 : { (x: 'a'): any; (x: Date): any; } +>f7 : { (x: "a"): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f8(x: 'a'); ->f8 : { (x: 'a'): any; (x: RegExp): any; } +>f8 : { (x: "a"): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f8(x: RegExp); ->f8 : { (x: 'a'): any; (x: RegExp): any; } +>f8 : { (x: "a"): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : RegExp > : ^^^^^^ function f8(x: any) { } ->f8 : { (x: 'a'): any; (x: RegExp): any; } +>f8 : { (x: "a"): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f9(x: 'a'); ->f9 : { (x: 'a'): any; (x: () => {}): any; } +>f9 : { (x: "a"): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f9(x: () => {}); ->f9 : { (x: 'a'): any; (x: () => {}): any; } +>f9 : { (x: "a"): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : () => {} > : ^^^^^^ function f9(x: any) { } ->f9 : { (x: 'a'): any; (x: () => {}): any; } +>f9 : { (x: "a"): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -289,19 +289,19 @@ class C implements String { // BUG 831846 function f10(x: 'a'); ->f10 : { (x: 'a'): any; (x: C): any; } +>f10 : { (x: "a"): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f10(x: C); ->f10 : { (x: 'a'): any; (x: C): any; } +>f10 : { (x: "a"): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : C > : ^ function f10(x: any) { } ->f10 : { (x: 'a'): any; (x: C): any; } +>f10 : { (x: "a"): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -313,53 +313,53 @@ interface I extends String { // BUG 831846 function f11(x: 'a'); ->f11 : { (x: 'a'): any; (x: I): any; } +>f11 : { (x: "a"): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f11(x: I); ->f11 : { (x: 'a'): any; (x: I): any; } +>f11 : { (x: "a"): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : I > : ^ function f11(x: any) { } ->f11 : { (x: 'a'): any; (x: I): any; } +>f11 : { (x: "a"): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f12(x: 'a'); ->f12 : { (x: 'a'): any; (x: T_1): any; } +>f12 : { (x: "a"): any; (x: T_1): any; } > : ^^^ ^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f12(x: T); ->f12 : { (x: 'a'): any; (x: T): any; } +>f12 : { (x: "a"): any; (x: T): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f12(x: any) { } ->f12 : { (x: 'a'): any; (x: T_1): any; } +>f12 : { (x: "a"): any; (x: T_1): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f13(x: 'a'); ->f13 : { (x: 'a'): any; (x: T_1): any; } +>f13 : { (x: "a"): any; (x: T_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f13(x: T); ->f13 : { (x: 'a'): any; (x: T): any; } +>f13 : { (x: "a"): any; (x: T): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f13(x: any) { } ->f13 : { (x: 'a'): any; (x: T_1): any; } +>f13 : { (x: "a"): any; (x: T_1): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any @@ -370,53 +370,53 @@ enum E { A } > : ^^^ function f14(x: 'a'); ->f14 : { (x: 'a'): any; (x: E): any; } +>f14 : { (x: "a"): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f14(x: E); ->f14 : { (x: 'a'): any; (x: E): any; } +>f14 : { (x: "a"): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : E > : ^ function f14(x: any) { } ->f14 : { (x: 'a'): any; (x: E): any; } +>f14 : { (x: "a"): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f15(x: 'a'); ->f15 : { (x: 'a'): any; (x: U_1): any; } +>f15 : { (x: "a"): any; (x: U_1): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f15(x: U); ->f15 : { (x: 'a'): any; (x: U): any; } +>f15 : { (x: "a"): any; (x: U): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f15(x: any) { } ->f15 : { (x: 'a'): any; (x: U_1): any; } +>f15 : { (x: "a"): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any function f16(x: 'a'); ->f16 : { (x: 'a'): any; (x: U_1): any; } +>f16 : { (x: "a"): any; (x: U_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f16(x: U); ->f16 : { (x: 'a'): any; (x: U): any; } +>f16 : { (x: "a"): any; (x: U): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f16(x: any) { } ->f16 : { (x: 'a'): any; (x: U_1): any; } +>f16 : { (x: "a"): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types index a6e077ec3da87..4c24f9783e035 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types @@ -4,25 +4,25 @@ // String literal types are only valid in overload signatures function foo(x: 'hi') { } ->foo : (x: 'hi') => void +>foo : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f = function foo(x: 'hi') { } ->f : (x: 'hi') => void +>f : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ ->function foo(x: 'hi') { } : (x: 'hi') => void +>function foo(x: 'hi') { } : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ ->foo : (x: 'hi') => void +>foo : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f2 = (x: 'hi', y: 'hi') => { } ->f2 : (x: 'hi', y: 'hi') => void +>f2 : (x: "hi", y: "hi") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(x: 'hi', y: 'hi') => { } : (x: 'hi', y: 'hi') => void +>(x: 'hi', y: 'hi') => { } : (x: "hi", y: "hi") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -34,7 +34,7 @@ class C { > : ^ foo(x: 'hi') { } ->foo : (x: 'hi') => void +>foo : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -46,7 +46,7 @@ interface I { > : ^^^^ foo(x: 'hi', y: 'hi'); ->foo : (x: 'hi', y: 'hi') => any +>foo : (x: "hi", y: "hi") => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ @@ -55,7 +55,7 @@ interface I { } var a: { ->a : { (x: 'hi'): any; foo(x: 'hi'): any; } +>a : { (x: "hi"): any; foo(x: "hi"): any; } > : ^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -63,30 +63,30 @@ var a: { > : ^^^^ foo(x: 'hi'); ->foo : (x: 'hi') => any +>foo : (x: "hi") => any > : ^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ } var b = { ->b : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } +>b : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ->{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } +>{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ foo(x: 'hi') { }, ->foo : (x: 'hi') => void +>foo : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ a: function foo(x: 'hi', y: 'hi') { }, ->a : (x: 'hi', y: 'hi') => void +>a : (x: "hi", y: "hi") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->function foo(x: 'hi', y: 'hi') { } : (x: 'hi', y: 'hi') => void +>function foo(x: 'hi', y: 'hi') { } : (x: "hi", y: "hi") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->foo : (x: 'hi', y: 'hi') => void +>foo : (x: "hi", y: "hi") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -94,9 +94,9 @@ var b = { > : ^^^^ b: (x: 'hi') => { } ->b : (x: 'hi') => void +>b : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ ->(x: 'hi') => { } : (x: 'hi') => void +>(x: 'hi') => { } : (x: "hi") => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types index 620c731e76782..08407874e06f9 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types @@ -42,7 +42,7 @@ interface I { > : ^^^^ foo(x: 'a', y: 'a'); ->foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } +>foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ @@ -50,7 +50,7 @@ interface I { > : ^^^ foo(x: 'hi', y: 'hi'); ->foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } +>foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -59,7 +59,7 @@ interface I { } var a: { ->a : { (x: 'hi'): any; (x: 'a'): any; foo(x: 'hi'): any; foo(x: 'a'): any; } +>a : { (x: "hi"): any; (x: "a"): any; foo(x: "hi"): any; foo(x: "a"): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -71,32 +71,32 @@ var a: { > : ^^^ foo(x: 'hi'); ->foo : { (x: 'hi'): any; (x: 'a'): any; } +>foo : { (x: "hi"): any; (x: "a"): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a'); ->foo : { (x: 'hi'): any; (x: 'a'): any; } +>foo : { (x: "hi"): any; (x: "a"): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ } var b = { ->b : { foo(x: 'hi'): void; foo(x: 'a'): void; } +>b : { foo(x: "hi"): void; foo(x: "a"): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ ->{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: 'hi'): void; foo(x: 'a'): void; } +>{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: "hi"): void; foo(x: "a"): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ foo(x: 'hi') { }, ->foo : { (x: 'hi'): void; (x: 'a'): void; } +>foo : { (x: "hi"): void; (x: "a"): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a') { }, ->foo : { (x: 'hi'): void; (x: 'a'): void; } +>foo : { (x: "hi"): void; (x: "a"): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "a" > : ^^^ diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types index d833f4e51bea8..998b51c20d623 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { (x: 'a'): void; (x: string): void; } +>a : { (x: "a"): void; (x: string): void; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { (x: 'a', y: number): void; (x: string, y: number): void; } +>a2 : { (x: "a", y: number): void; (x: string, y: number): void; } > : ^^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { (x: 'a'): number; (x: string): number; } +>a : { (x: "a"): number; (x: string): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): number; diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types index ce47939fc27f2..3a9928b1f7bd1 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { new (x: 'a'): void; new (x: string): void; } +>a : { new (x: "a"): void; new (x: string): void; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { new (x: 'a', y: number): void; new (x: string, y: number): void; } +>a2 : { new (x: "a", y: number): void; new (x: string, y: number): void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ new (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { new (x: 'a'): number; new (x: string): number; } +>a : { new (x: "a"): number; new (x: string): number; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): number; diff --git a/tests/baselines/reference/switchWithConstrainedTypeVariable.types b/tests/baselines/reference/switchWithConstrainedTypeVariable.types index 9966ce9f55d16..478e1899b3203 100644 --- a/tests/baselines/reference/switchWithConstrainedTypeVariable.types +++ b/tests/baselines/reference/switchWithConstrainedTypeVariable.types @@ -4,7 +4,7 @@ // Repro from #20840 function function1(key: T) { ->function1 : (key: T) => void +>function1 : (key: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >key : T > : ^ diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index 0a58babc5438a..d29f030fcae67 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -108,7 +108,7 @@ type TCA2 = Cases<'BAR'>; // 'BAR bar BAR bAR' // Assignability function test(name: `get${Capitalize}`) { ->test : (name: `get${Capitalize}`) => void +>test : (name: `get${Capitalize}`) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >name : `get${Capitalize}` > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes2.types b/tests/baselines/reference/templateLiteralTypes2.types index 2284ad7fc3668..aa664dda40406 100644 --- a/tests/baselines/reference/templateLiteralTypes2.types +++ b/tests/baselines/reference/templateLiteralTypes2.types @@ -2,7 +2,7 @@ === templateLiteralTypes2.ts === function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { ->ft1 : (s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) => void +>ft1 : (s: string, n: number, u: "foo" | "bar" | "baz", t: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >s : string > : ^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes3.types b/tests/baselines/reference/templateLiteralTypes3.types index 6c3c219b092b5..655a8cee04933 100644 --- a/tests/baselines/reference/templateLiteralTypes3.types +++ b/tests/baselines/reference/templateLiteralTypes3.types @@ -677,7 +677,7 @@ function ff2(x: `foo-${T}`, y: `${T}-bar`, z: `baz-${T}`) { } function ff3(x: string, y: `foo-${string}` | 'bar') { ->ff3 : (x: string, y: `foo-${string}` | 'bar') => void +>ff3 : (x: string, y: `foo-${string}` | "bar") => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardFunctionErrors.types b/tests/baselines/reference/typeGuardFunctionErrors.types index 1357201b363b3..7fda3c139ac01 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.types +++ b/tests/baselines/reference/typeGuardFunctionErrors.types @@ -509,7 +509,7 @@ type KeySet = { [k in T]: true } // expected an error, since Keys doesn't have a 'd' declare function hasKey(x: KeySet): x is KeySet; ->hasKey : (x: KeySet) => x is KeySet +>hasKey : (x: KeySet) => x is KeySet > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : KeySet > : ^^^^^^^^^ diff --git a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types index 220c044cbb496..f88113a869107 100644 --- a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types @@ -3,7 +3,7 @@ === typePredicatesCanNarrowByDiscriminant.ts === // #45770 declare const fruit: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -27,7 +27,7 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >fruit.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,18 +43,18 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { fruit.kind >fruit.kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ ->fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ fruit ->fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } declare const fruit2: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -68,7 +68,7 @@ const kind = fruit2.kind; > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -92,12 +92,12 @@ if (isOneOf(kind, ['apple', 'banana'] as const)) { fruit2.kind >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fruit2 ->fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } +>fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/typeTagOnPropertyAssignment.types b/tests/baselines/reference/typeTagOnPropertyAssignment.types index 8316bffcdbb7b..4e631da68bad1 100644 --- a/tests/baselines/reference/typeTagOnPropertyAssignment.types +++ b/tests/baselines/reference/typeTagOnPropertyAssignment.types @@ -2,9 +2,9 @@ === typeTagOnPropertyAssignment.js === const o = { ->o : { a: "a"; n: () => 'b'; } +>o : { a: "a"; n: () => "b"; } > : ^^^^^ ^^^^^ ^^^ ->{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => 'b'; } +>{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => "b"; } > : ^^^^^ ^^^^^ ^^^ /** @@ -18,9 +18,9 @@ const o = { /** @type {() => 'b'} */ n: () => 'b' ->n : () => 'b' +>n : () => "b" > : ^^^^^^ ->() => 'b' : () => 'b' +>() => 'b' : () => "b" > : ^^^^^^ >'b' : "b" > : ^^^ @@ -29,16 +29,16 @@ const o = { o.a >o.a : "a" > : ^^^ ->o : { a: "a"; n: () => 'b'; } +>o : { a: "a"; n: () => "b"; } > : ^^^^^ ^^^^^ ^^^ >a : "a" > : ^^^ o.n ->o.n : () => 'b' +>o.n : () => "b" > : ^^^^^^ ->o : { a: "a"; n: () => 'b'; } +>o : { a: "a"; n: () => "b"; } > : ^^^^^ ^^^^^ ^^^ ->n : () => 'b' +>n : () => "b" > : ^^^^^^ diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 5a44554b69412..0bf67da2f7f16 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -331,7 +331,7 @@ const optionHandlers: OptionHandlers = { }; function handleOption(option: Options & { kind: K }): string { ->handleOption : (option: Options & { kind: K; }) => string +>handleOption : (option: Options & { kind: K; }) => string > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >option : Options & { kind: K; } > : ^^^^^^^^^^^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/typedefMultipleTypeParameters.types b/tests/baselines/reference/typedefMultipleTypeParameters.types index 86c5c22b5088a..bde3ca598caf7 100644 --- a/tests/baselines/reference/typedefMultipleTypeParameters.types +++ b/tests/baselines/reference/typedefMultipleTypeParameters.types @@ -11,7 +11,7 @@ /** @type {Everything<{ a: number, b: 'hi', c: never }, undefined, { c: true, d: 1 }, number, string>} */ var tuvwx; ->tuvwx : Everything<{ a: number; b: 'hi'; c: never; }, undefined, { c: true; d: 1; }, number, string> +>tuvwx : Everything<{ a: number; b: "hi"; c: never; }, undefined, { c: true; d: 1; }, number, string> > : ^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ /** @type {Everything<{ a: number }, undefined, { c: 1, d: 1 }, number, string>} */ diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.types b/tests/baselines/reference/typeofImportInstantiationExpression.types index e5acd4c163a70..84dd63de703b9 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.types +++ b/tests/baselines/reference/typeofImportInstantiationExpression.types @@ -44,7 +44,7 @@ type T1 = typeof import('./input.js').myFunction; >myFunction : error type T2 = typeof import('./input.js').myFunction; ->T2 : (arg: Arg) => { slug: 'hello'; } +>T2 : (arg: Arg) => { slug: "hello"; } > : ^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ >myFunction : error >slug : "hello" diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.types b/tests/baselines/reference/typesWithSpecializedCallSignatures.types index 94496c3d4f516..43f4a57540b46 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.types @@ -30,25 +30,25 @@ class C { > : ^ foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ foo(x) { ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : any @@ -66,19 +66,19 @@ var c = new C(); interface I { foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -88,23 +88,23 @@ var i: I; > : ^ var a: { ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -120,11 +120,11 @@ c = i; > : ^ c = a; ->c = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>c = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ i = c; @@ -136,17 +136,17 @@ i = c; > : ^ i = a; ->i = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>i = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ a = c; >a = c : C > : ^ ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ @@ -154,7 +154,7 @@ a = c; a = i; >a = i : I > : ^ ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -164,11 +164,11 @@ var r1: Derived1 = c.foo('hi'); > : ^^^^^^^^ >c.foo('hi') : Derived1 > : ^^^^^^^^ ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hi' : "hi" > : ^^^^ @@ -178,11 +178,11 @@ var r2: Derived2 = c.foo('bye'); > : ^^^^^^^^ >c.foo('bye') : Derived2 > : ^^^^^^^^ ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'bye' : "bye" > : ^^^^^ @@ -192,11 +192,11 @@ var r3: Base = c.foo('hm'); > : ^^^^ >c.foo('hm') : Base > : ^^^^ ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types index 66c6c4ca3b84a..567c0dd4d86ec 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types @@ -76,7 +76,7 @@ var i: I; > : ^ var a: { ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new(x: 'hi'): Derived1; @@ -102,25 +102,25 @@ c = i; > : ^ c = a; ->c = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>c = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ i = a; ->i = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>i = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ a = i; >a = i : I > : ^ ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -150,7 +150,7 @@ var r3: Base = new a('hm'); > : ^^^^ >new a('hm') : Base > : ^^^^ ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types index 38562f6fd984d..4d788cb55640e 100644 --- a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types +++ b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types @@ -44,11 +44,11 @@ if (s.value !== undefined) { > : ^^^^^^^^^ s; ->s : { type: 'string'; value: string; } | { type: 'number'; value: number; } | { type: 'unknown'; value: unknown; } +>s : { type: "string"; value: string; } | { type: "number"; value: number; } | { type: "unknown"; value: unknown; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^ } else { s; ->s : { type: 'unknown'; value: unknown; } | { value: undefined; } +>s : { type: "unknown"; value: unknown; } | { value: undefined; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/unionTypeReduction2.types b/tests/baselines/reference/unionTypeReduction2.types index 7ae3492ad7ed7..b8a7e348cddc1 100644 --- a/tests/baselines/reference/unionTypeReduction2.types +++ b/tests/baselines/reference/unionTypeReduction2.types @@ -194,21 +194,21 @@ function f4(x: (x: string | undefined) => void, y: (x?: string) => void) { } function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { ->f5 : (x: (x: string | undefined) => void, y: (x?: 'hello') => void) => void +>f5 : (x: (x: string | undefined) => void, y: (x?: "hello") => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ >x : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->y : (x?: 'hello') => void +>y : (x?: "hello") => void > : ^ ^^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x?: 'hello') => void ->f : (x?: 'hello') => void +>f : (x?: "hello") => void > : ^ ^^^ ^^^^^ ->!!true ? x : y : (x?: 'hello') => void +>!!true ? x : y : (x?: "hello") => void > : ^ ^^^ ^^^^^ >!!true : true > : ^^^^ @@ -218,28 +218,28 @@ function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { > : ^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ ->y : (x?: 'hello') => void +>y : (x?: "hello") => void > : ^ ^^^ ^^^^^ f(); >f() : void > : ^^^^ ->f : (x?: 'hello') => void +>f : (x?: "hello") => void > : ^ ^^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x?: 'hello') => void +>f : (x?: "hello") => void > : ^ ^^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ } function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { ->f6 : (x: (x: 'hello' | undefined) => void, y: (x?: string) => void) => void +>f6 : (x: (x: "hello" | undefined) => void, y: (x?: string) => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->x : (x: 'hello' | undefined) => void +>x : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -249,9 +249,9 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x: 'hello' | undefined) => void ->f : (x: 'hello' | undefined) => void +>f : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ ->!!true ? x : y : (x: 'hello' | undefined) => void +>!!true ? x : y : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ >!!true : true > : ^^^^ @@ -259,7 +259,7 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^ >true : true > : ^^^^ ->x : (x: 'hello' | undefined) => void +>x : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ >y : (x?: string) => void > : ^ ^^^ ^^^^^ @@ -267,13 +267,13 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { f(); // Error >f() : void > : ^^^^ ->f : (x: 'hello' | undefined) => void +>f : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x: 'hello' | undefined) => void +>f : (x: "hello" | undefined) => void > : ^ ^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ diff --git a/tests/cases/fourslash/completionForStringLiteral4.ts b/tests/cases/fourslash/completionForStringLiteral4.ts index 2056db8ad8b7f..64f3ddeb9acaf 100644 --- a/tests/cases/fourslash/completionForStringLiteral4.ts +++ b/tests/cases/fourslash/completionForStringLiteral4.ts @@ -15,7 +15,7 @@ goTo.marker('1'); verify.quickInfoExists(); -verify.quickInfoIs("function f(p1: 'literal', p2: \"literal\", p3: 'other1' | 'other2', p4: 'literal' | number, p5: 12 | true): string", 'I am documentation'); +verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "other2", p4: "literal" | number, p5: 12 | true): string', 'I am documentation'); const replacementSpan = test.ranges()[0] verify.completions({ marker: "2", exact: [ diff --git a/tests/cases/fourslash/overloadOnConstCallSignature.ts b/tests/cases/fourslash/overloadOnConstCallSignature.ts index 499fbf73087a8..61ae8da97cc84 100644 --- a/tests/cases/fourslash/overloadOnConstCallSignature.ts +++ b/tests/cases/fourslash/overloadOnConstCallSignature.ts @@ -12,8 +12,8 @@ verify.signatureHelp({ marker: "1", overloadsCount: 4, - text: "foo(name: 'order'): string", + text: 'foo(name: "order"): string', }) -edit.insert("'hi'"); +edit.insert('"hi"'); verify.quickInfoAt("2", "var x: string"); diff --git a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts index 04477812f3389..de06e2480c52d 100644 --- a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts +++ b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts @@ -20,13 +20,13 @@ ////c.x1(1, (x/*10*/x) => { return 1; } ); verify.quickInfos({ - 1: "(method) I.x1(a: number, callback: (x: 'hi') => number): any", - 2: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", - 3: "(parameter) callback: (x: 'hi') => number", - 4: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", + 1: "(method) I.x1(a: number, callback: (x: \"hi\") => number): any", + 2: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", + 3: "(parameter) callback: (x: \"hi\") => number", + 4: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", 5: "(parameter) callback: (x: string) => number", 6: "(parameter) callback: (x: string) => number", - 7: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", + 7: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", 8: "(parameter) xx: \"hi\"", 9: "(parameter) xx: \"bye\"", 10: "(parameter) xx: \"hi\"" diff --git a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts index 5d66c431528be..babc79c79d531 100644 --- a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts +++ b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts @@ -12,6 +12,6 @@ verify.signatureHelp( { marker: "1", overloadsCount: 3, parameterName: "z", parameterSpan: "z: string" }, - { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: "x: 'hi'" }, - { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: "y: 'bye'" }, + { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: 'x: "hi"' }, + { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: 'y: "bye"' }, ); From 638ceeacff4b8bc10590169ffd72e8967a60b041 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 18 Dec 2024 11:02:08 +0000 Subject: [PATCH 3/5] Preserve original quotes in all except errors. --- src/compiler/checker.ts | 36 +++- src/compiler/expressionToTypeNode.ts | 11 +- src/compiler/transformers/declarations.ts | 3 +- src/compiler/types.ts | 8 +- tests/baselines/reference/ambientErrors.types | 4 +- tests/baselines/reference/api/typescript.d.ts | 6 +- ...signmentCompatWithDiscriminatedUnion.types | 2 +- ...ObjectMembersStringNumericNames.errors.txt | 96 ++++----- .../callSignatureFunctionOverload.types | 4 +- .../callbackArgsDifferByOptionality.types | 8 +- .../reference/callbackCrossModule.types | 2 +- .../reference/checkJsdocTypeTag5.types | 4 +- .../reference/commonTypeIntersection.types | 12 +- ...onRegularTypeFetchingSpeedReasonable.types | 2 +- ...sistentAliasVsNonAliasRecordBehavior.types | 16 +- .../baselines/reference/constAssertions.types | 4 +- .../reference/constantOverloadFunction.types | 10 +- ...nstantOverloadFunctionNoSubtypeError.types | 10 +- ...eBasedOnIntersectionWithAnyInTheMix3.types | 2 +- .../contextualTypedSpecialAssignment.types | 8 +- ...ntextuallyTypedSymbolNamedProperties.types | 4 +- .../controlFlowAliasedDiscriminants.types | 4 +- .../reference/controlFlowAliasing.types | 192 +++++++++--------- .../reference/controlFlowGenericTypes.types | 6 +- .../reference/controlFlowOptionalChain.types | 6 +- .../reference/correlatedUnions.types | 2 +- .../declarationEmitAliasInlineing.types | 20 +- ...peDistributivityPreservesConstraints.types | 6 +- ...arationEmitResolveTypesIfNotReusable.types | 16 +- .../declarationEmitUsingTypeAlias2.types | 2 +- .../deferredLookupTypeResolution.types | 2 +- .../dependentDestructuredVariables.types | 4 +- .../reference/dependentReturnType1.types | 6 +- .../reference/dependentReturnType2.types | 14 +- .../reference/dependentReturnType3.types | 14 +- .../destructuredDeclarationEmit.types | 10 +- .../destructuringParameterDeclaration8.types | 12 +- ...gParameterDeclaration9(strict=false).types | 2 +- ...riminableUnionWithIntersectedMembers.types | 4 +- .../reference/discriminantPropertyCheck.types | 4 +- .../reference/discriminatedUnionTypes2.types | 20 +- ...tyCheckIntersectionWithRecursiveType.types | 4 +- ...rdRefInTypeDeclaration(strict=false).types | 4 +- ...ardRefInTypeDeclaration(strict=true).types | 4 +- .../generatorReturnContextualType.types | 16 +- .../genericObjectSpreadResultInSwitch.types | 8 +- .../identityAndDivergentNormalizedTypes.types | 6 +- .../independentPropertyVariance.types | 4 +- .../indexedAccessTypeConstraints.types | 2 +- .../indexedAccessWithFreshObjectLiteral.types | 6 +- ...inferFromGenericFunctionReturnTypes3.types | 16 +- ...eOfNullableObjectTypesWithCommonBase.types | 4 +- ...nIncludingPropFromGlobalAugmentation.types | 2 +- ...sectionMemberOfUnionNarrowsCorrectly.types | 4 +- .../intersectionTypeNormalization.types | 4 +- .../baselines/reference/intrinsicTypes.types | 2 +- .../invariantGenericErrorElaboration.types | 2 +- .../jsDeclarationsUniqueSymbolUsage.types | 2 +- .../reference/jsFileFunctionOverloads.types | 2 +- .../reference/jsFileFunctionOverloads2.types | 2 +- .../reference/jsFileMethodOverloads.types | 2 +- .../reference/jsFileMethodOverloads2.types | 2 +- .../reference/jsdocBracelessTypeTag1.types | 4 +- tests/baselines/reference/jsdocLiteral.types | 2 +- tests/baselines/reference/jsdocThisType.types | 12 +- .../jsxIntrinsicElementsCompatability.types | 6 +- .../reference/keyofAndIndexedAccess.types | 16 +- .../reference/keyofAndIndexedAccess2.types | 8 +- .../logicalAssignment2(target=es2015).types | 88 ++++---- .../logicalAssignment2(target=es2020).types | 88 ++++---- .../logicalAssignment2(target=es2021).types | 88 ++++---- .../logicalAssignment2(target=esnext).types | 88 ++++---- .../reference/mappedTypeConstraints.types | 6 +- .../mappedTypeContextualTypesApplied.types | 8 +- .../mappedTypeGenericIndexedAccess.types | 6 +- .../reference/mappedTypeProperties.types | 2 +- .../memberFunctionsWithPrivateOverloads.types | 36 ++-- .../memberFunctionsWithPublicOverloads.types | 32 +-- ...rFunctionsWithPublicPrivateOverloads.types | 40 ++-- .../reference/moduleExportAssignment7.types | 4 +- ...narrowExceptionVariableInCatchClause.types | 8 +- .../reference/narrowingByTypeofInSwitch.types | 2 +- .../narrowingTypeofDiscriminant.types | 16 +- .../reference/narrowingUnionToUnion.types | 38 ++-- .../reference/narrowingUnionWithBang.types | 56 ++--- .../nestedExcessPropertyChecking.types | 4 +- ...everAsDiscriminantType(strict=false).types | 4 +- ...neverAsDiscriminantType(strict=true).types | 4 +- ...iteralComputedNameNoDeclarationError.types | 6 +- .../overloadOnConstAsTypeAnnotation.types | 4 +- .../overloadOnConstConstraintChecks1.types | 18 +- .../overloadOnConstConstraintChecks2.types | 8 +- .../overloadOnConstConstraintChecks3.types | 8 +- .../overloadOnConstConstraintChecks4.types | 8 +- .../overloadOnConstDuplicateOverloads1.types | 14 +- ...InBaseWithBadImplementationInDerived.types | 8 +- .../overloadOnConstInCallback1.types | 6 +- ...ObjectLiteralImplementingAnInterface.types | 12 +- .../overloadOnConstInheritance1.types | 8 +- .../overloadOnConstInheritance2.types | 6 +- .../overloadOnConstInheritance3.types | 4 +- .../overloadOnConstInheritance4.types | 12 +- .../overloadOnConstNoAnyImplementation.types | 18 +- .../overloadOnConstNoAnyImplementation2.types | 30 +-- ...loadOnConstNoNonSpecializedSignature.types | 4 +- ...verloadOnConstNoStringImplementation.types | 18 +- ...erloadOnConstNoStringImplementation2.types | 30 +-- .../reference/overloadingOnConstants1.types | 40 ++-- ...erloadingOnConstantsInImplementation.types | 6 +- tests/baselines/reference/override2.types | 8 +- .../parserOverloadOnConstants1.types | 8 +- .../reference/primtiveTypesAreIdentical.types | 8 +- .../reference/propertyAccess.errors.txt | 4 +- .../reference/ramdaToolsNoInfinite2.types | 4 +- .../reference/recursiveConditionalTypes.types | 2 +- ...pecializedOverloadWithRestParameters.types | 12 +- ...ializedSignatureAsCallbackParameter1.types | 2 +- ...sNotSubtypeOfNonSpecializedSignature.types | 52 ++--- ...reIsSubtypeOfNonSpecializedSignature.types | 70 +++---- ...ramsFromGeneratorMakesRequiredParams.types | 2 +- .../spreadsAndContextualTupleTypes.types | 12 +- .../spuriousCircularityOnTypeImport.types | 4 +- .../reference/strictSubtypeAndNarrowing.types | 24 +-- .../reference/stringLiteralType.types | 6 +- .../stringLiteralTypeIsSubtypeOfString.types | 96 ++++----- ...teralTypesInImplementationSignatures.types | 36 ++-- ...eralTypesInImplementationSignatures2.types | 18 +- ...lSignaturesWithSpecializedSignatures.types | 6 +- ...tSignaturesWithSpecializedSignatures.types | 6 +- .../switchWithConstrainedTypeVariable.types | 2 +- .../reference/templateLiteralTypes1.types | 2 +- .../reference/templateLiteralTypes2.types | 2 +- .../reference/templateLiteralTypes3.types | 2 +- .../reference/typeGuardFunctionErrors.types | 2 +- .../reference/typeOfOnTypeArg.errors.txt | 4 +- ...ypePredicatesCanNarrowByDiscriminant.types | 16 +- .../typeTagOnPropertyAssignment.types | 16 +- .../typeVariableConstraintIntersections.types | 2 +- .../typedefMultipleTypeParameters.types | 2 +- .../typeofImportInstantiationExpression.types | 2 +- .../typesWithSpecializedCallSignatures.types | 46 ++--- ...esWithSpecializedConstructSignatures.types | 14 +- ...ntWithUnknown(strictnullchecks=true).types | 4 +- .../reference/unionTypeReduction2.types | 28 +-- .../fourslash/completionForStringLiteral4.ts | 2 +- .../fourslash/overloadOnConstCallSignature.ts | 2 +- .../fourslash/quickInfoForOverloadOnConst1.ts | 10 +- .../signatureHelpOnOverloadOnConst.ts | 4 +- 148 files changed, 1098 insertions(+), 1074 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cceabf482fa2e..e7004090c580b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1707,7 +1707,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind); }, typeToString: (type, enclosingDeclaration, flags) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags); + return typeToStringWorker(type, getParseTreeNode(enclosingDeclaration), flags); }, symbolToString: (symbol, enclosingDeclaration, meaning, flags) => { return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags); @@ -1719,7 +1719,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer); }, writeType: (type, enclosingDeclaration, flags, writer, verbosityLevel, out) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer, verbosityLevel, out); + return typeToStringWorker(type, getParseTreeNode(enclosingDeclaration), flags, writer, verbosityLevel, out); }, writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); @@ -5988,7 +5988,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags: SymbolFormatFlags = SymbolFormatFlags.AllowAnyNodeKind, writer?: EmitTextWriter): string { - let nodeFlags = NodeBuilderFlags.IgnoreErrors; + let nodeFlags = NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType; let internalNodeFlags = InternalNodeBuilderFlags.None; if (flags & SymbolFormatFlags.UseOnlyExternalAliasing) { nodeFlags |= NodeBuilderFlags.UseOnlyExternalAliasing; @@ -6039,6 +6039,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } + /** + * Prints a type, forcing the conversion of string delimiters to " + * This should usually be used for errors, since in errors printed types are inclosed in ' + */ function typeToString( type: Type, enclosingDeclaration?: Node, @@ -6046,6 +6050,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { writer: EmitTextWriter = createTextWriter(""), verbosityLevel?: number, out?: WriterContextOut, + ): string { + return typeToStringWorker(type, enclosingDeclaration, flags | TypeFormatFlags.UseDoubleQuotesForStringLiteralType, writer, verbosityLevel, out); + } + + function typeToStringWorker( + type: Type, + enclosingDeclaration?: Node, + flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, + writer: EmitTextWriter = createTextWriter(""), + verbosityLevel?: number, + out?: WriterContextOut, ): string { const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation || verbosityLevel !== undefined; const typeNode = nodeBuilder.typeToTypeNode( @@ -6311,9 +6326,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function setTextRange(context: NodeBuilderContext, range: T, location: Node | undefined): T { const nodeSourceFile = getSourceFileOfNode(getOriginalNode(range)); if (!nodeIsSynthesized(range) || !(range.flags & NodeFlags.Synthesized) || !context.enclosingFile || context.enclosingFile !== nodeSourceFile) { - if (context.flags & NodeBuilderFlags.PreserveQuotesForStringLiteralType && range.kind === SyntaxKind.StringLiteral) { - const stringLiteral = range as Node as StringLiteral; - range = factory.createStringLiteralFromNode(stringLiteral) as Node as T; + if (range.kind === SyntaxKind.StringLiteral) { + const node = range as Node as StringLiteral; + return setOriginalNode( + context.flags & (NodeBuilderFlags.UseSingleQuotesForStringLiteralType | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) ? + factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)): + factory.createStringLiteralFromNode(node), + node + ) as Node as T; } else { range = factory.cloneNode(range); // if `range` is synthesized or originates in another file, copy it so it definitely has synthetic positions @@ -8579,7 +8599,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getPropertyNameNodeForSymbol(symbol: Symbol, context: NodeBuilderContext) { const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); - const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); + const singleQuote = context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType ? true: + context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType ? false : + !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); const isMethod = !!(symbol.flags & SymbolFlags.Method); const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod); if (fromNameType) { diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index 41b76c856bc7f..45a730e4ef0d0 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -531,10 +531,13 @@ export function createSyntacticTypeNodeBuilder( setEmitFlags(clone, flags | (context.flags & NodeBuilderFlags.MultilineObjectLiterals && isTypeLiteralNode(node) ? 0 : EmitFlags.SingleLine)); return clone; } - if (isStringLiteral(node) && !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType) && !node.singleQuote) { - const clone = factory.cloneNode(node); - (clone as Mutable).singleQuote = true; - return clone; + if (isStringLiteral(node)) { + return setOriginalNode( + context.flags & (NodeBuilderFlags.UseSingleQuotesForStringLiteralType | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) ? + factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)): + factory.createStringLiteralFromNode(node), + node + ); } if (isConditionalTypeNode(node)) { const checkType = visitNode(node.checkType, visitExistingNodeTreeSymbols, isTypeNode)!; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index b454c52122af1..7c41bcccc3e7a 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -244,8 +244,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals NodeBuilderFlags.UseStructuralFallback | NodeBuilderFlags.AllowEmptyTuple | NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - NodeBuilderFlags.NoTruncation | - NodeBuilderFlags.PreserveQuotesForStringLiteralType; + NodeBuilderFlags.NoTruncation; const declarationEmitInternalNodeBuilderFlags = InternalNodeBuilderFlags.AllowUnresolvedNames; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 030936f8b2d25..e6d98d361dde8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5489,8 +5489,8 @@ export const enum NodeBuilderFlags { UseTypeOfFunction = 1 << 12, // Build using typeof instead of function type literal OmitParameterModifiers = 1 << 13, // Omit modifiers on parameters UseAliasDefinedOutsideCurrentScope = 1 << 14, // Allow non-visible aliases - UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type - PreserveQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type + UseSingleQuotesForStringLiteralType = 1 << 28, // Force single quotes for string literal type or preserve source delimiters + UseDoubleQuotesForStringLiteralType = 1 << 30, // Force double quotes for string literal type or preserve source delimiters NoTypeReduction = 1 << 29, // Don't call getReducedType OmitThisParameter = 1 << 25, @@ -5545,7 +5545,7 @@ export const enum TypeFormatFlags { UseAliasDefinedOutsideCurrentScope = 1 << 14, // For a `type T = ... ` defined in a different file, write `T` instead of its value, even though `T` can't be accessed in the current scope. UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type - PreserveQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type + UseDoubleQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type NoTypeReduction = 1 << 29, // Don't call getReducedType OmitThisParameter = 1 << 25, @@ -5565,7 +5565,7 @@ export const enum TypeFormatFlags { NodeBuilderFlagsMask = NoTruncation | WriteArrayAsGenericType | GenerateNamesForShadowedTypeParams | UseStructuralFallback | WriteTypeArgumentsOfSignature | UseFullyQualifiedType | SuppressAnyReturnType | MultilineObjectLiterals | WriteClassExpressionAsTypeLiteral | UseTypeOfFunction | OmitParameterModifiers | UseAliasDefinedOutsideCurrentScope | AllowUniqueESSymbolType | InTypeAlias | - UseSingleQuotesForStringLiteralType | NoTypeReduction | OmitThisParameter, + UseSingleQuotesForStringLiteralType | UseDoubleQuotesForStringLiteralType | NoTypeReduction | OmitThisParameter, } // dprint-ignore diff --git a/tests/baselines/reference/ambientErrors.types b/tests/baselines/reference/ambientErrors.types index a6745844e6a5b..d8c2f8874d361 100644 --- a/tests/baselines/reference/ambientErrors.types +++ b/tests/baselines/reference/ambientErrors.types @@ -10,13 +10,13 @@ declare var x = 4; // Ambient functions with invalid overloads declare function fn(x: number): string; ->fn : { (x: number): string; (x: "foo"): number; } +>fn : { (x: number): string; (x: 'foo'): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : number > : ^^^^^^ declare function fn(x: 'foo'): number; ->fn : { (x: number): string; (x: "foo"): number; } +>fn : { (x: number): string; (x: 'foo'): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 737e133f9b45b..2b04b641cb894 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6365,7 +6365,7 @@ declare namespace ts { OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, UseSingleQuotesForStringLiteralType = 268435456, - PreserveQuotesForStringLiteralType = 1073741824, + UseDoubleQuotesForStringLiteralType = 1073741824, NoTypeReduction = 536870912, OmitThisParameter = 33554432, AllowThisInObjectLiteral = 32768, @@ -6396,7 +6396,7 @@ declare namespace ts { OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, UseSingleQuotesForStringLiteralType = 268435456, - PreserveQuotesForStringLiteralType = 1073741824, + UseDoubleQuotesForStringLiteralType = 1073741824, NoTypeReduction = 536870912, OmitThisParameter = 33554432, AllowUniqueESSymbolType = 1048576, @@ -6406,7 +6406,7 @@ declare namespace ts { InElementType = 2097152, InFirstTypeArgument = 4194304, InTypeAlias = 8388608, - NodeBuilderFlagsMask = 848330095, + NodeBuilderFlagsMask = 1922071919, } enum SymbolFormatFlags { None = 0, diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types index be6617683be64..fe07add8d6b65 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types @@ -435,7 +435,7 @@ namespace GH30170 { > : ^^^^^^^^^^^^^ function drawWithColor(currentColor: 'blue' | 'yellow' | undefined) { ->drawWithColor : (currentColor: "blue" | "yellow" | undefined) => void +>drawWithColor : (currentColor: 'blue' | 'yellow' | undefined) => void > : ^ ^^ ^^^^^^^^^ >currentColor : "blue" | "yellow" > : ^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 6c85c052e0336..c57ab82b66abb 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -1,32 +1,32 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. -assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. ==== assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== @@ -61,7 +61,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s = s2; // ok s = a2; ~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. s2 = t2; @@ -78,47 +78,47 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = b; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. a = b; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. b = a; ~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. a = s; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = s2; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = a2; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. } @@ -144,7 +144,7 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s = s2; // ok s = a2; // error ~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: ''1'' is declared here. s2 = t2; // ok @@ -153,52 +153,52 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s2 = b; // ok s2 = a2; // error ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. a = b; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. b = a; // error ~ -!!! error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. +!!! error TS2741: Property '1.0' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. a = s; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = s2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = a2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = b2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a2 = b2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. b2 = a2; // error ~~ -!!! error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +!!! error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. a2 = b; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureFunctionOverload.types b/tests/baselines/reference/callSignatureFunctionOverload.types index 5d9bb851813f1..18b1123d97b46 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.types +++ b/tests/baselines/reference/callSignatureFunctionOverload.types @@ -2,7 +2,7 @@ === callSignatureFunctionOverload.ts === var foo: { ->foo : { (name: string): string; (name: "order"): string; (name: "content"): string; (name: "done"): string; } +>foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; @@ -23,7 +23,7 @@ var foo: { } var foo2: { ->foo2 : { (name: string): string; (name: "order"): string; (name: "order"): string; (name: "done"): string; } +>foo2 : { (name: string): string; (name: 'order'): string; (name: 'order'): string; (name: 'done'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (name: string): string; diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.types b/tests/baselines/reference/callbackArgsDifferByOptionality.types index c0c107c1d76cb..88fac714db623 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.types +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.types @@ -2,15 +2,15 @@ === callbackArgsDifferByOptionality.ts === function x3(callback: (x?: 'hi') => number); ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->callback : (x?: "hi") => number +>callback : (x?: 'hi') => number > : ^ ^^^ ^^^^^ >x : "hi" > : ^^^^ function x3(callback: (x: string) => number); ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: string) => number > : ^ ^^ ^^^^^ @@ -18,7 +18,7 @@ function x3(callback: (x: string) => number); > : ^^^^^^ function x3(callback: (x: any) => number) { ->x3 : { (callback: (x?: "hi") => number): any; (callback: (x: string) => number): any; } +>x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >callback : (x: any) => number > : ^ ^^ ^^^^^ diff --git a/tests/baselines/reference/callbackCrossModule.types b/tests/baselines/reference/callbackCrossModule.types index 062a8a09257d0..2e5388420d6bd 100644 --- a/tests/baselines/reference/callbackCrossModule.types +++ b/tests/baselines/reference/callbackCrossModule.types @@ -36,7 +36,7 @@ function C() { === use.js === /** @param {import('./mod1').Con} k */ function f(k) { ->f : (k: import("./mod1").Con) => any +>f : (k: import('./mod1').Con) => any > : ^ ^^ ^^^^^^^^ >k : import("mod1").Con > : ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsdocTypeTag5.types b/tests/baselines/reference/checkJsdocTypeTag5.types index e7500bc7c59a0..5afc2c23f6bb6 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.types +++ b/tests/baselines/reference/checkJsdocTypeTag5.types @@ -68,7 +68,7 @@ var k = function (x) { return x } /** @typedef {(x: 'hi' | 'bye') => 0 | 1 | 2} Argle */ /** @type {Argle} */ function blargle(s) { ->blargle : (x: "hi" | "bye") => 0 | 1 | 2 +>blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 > : ^ ^^ ^^^^^ >s : "hi" | "bye" > : ^^^^^^^^^^^^ @@ -84,7 +84,7 @@ var zeroonetwo = blargle('hi') > : ^^^^^^^^^ >blargle('hi') : 0 | 1 | 2 > : ^^^^^^^^^ ->blargle : (x: "hi" | "bye") => 0 | 1 | 2 +>blargle : (x: 'hi' | 'bye') => 0 | 1 | 2 > : ^ ^^ ^^^^^ >'hi' : "hi" > : ^^^^ diff --git a/tests/baselines/reference/commonTypeIntersection.types b/tests/baselines/reference/commonTypeIntersection.types index 447530c1e1119..b101079160517 100644 --- a/tests/baselines/reference/commonTypeIntersection.types +++ b/tests/baselines/reference/commonTypeIntersection.types @@ -2,7 +2,7 @@ === commonTypeIntersection.ts === declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; ->x1 : { __typename?: "TypeTwo"; } & { a: boolean; } +>x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ @@ -10,26 +10,26 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; > : ^^^^^^^ let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here ->y1 : { __typename?: "TypeOne"; } & { a: boolean; } +>y1 : { __typename?: 'TypeOne'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >__typename : "TypeOne" > : ^^^^^^^^^ >a : boolean > : ^^^^^^^ ->x1 : { __typename?: "TypeTwo"; } & { a: boolean; } +>x1 : { __typename?: 'TypeTwo'; } & { a: boolean; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ declare let x2: { __typename?: 'TypeTwo' } & string; ->x2 : { __typename?: "TypeTwo"; } & string +>x2 : { __typename?: 'TypeTwo'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeTwo" > : ^^^^^^^^^ let y2: { __typename?: 'TypeOne' } & string = x2; // should error here ->y2 : { __typename?: "TypeOne"; } & string +>y2 : { __typename?: 'TypeOne'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ >__typename : "TypeOne" > : ^^^^^^^^^ ->x2 : { __typename?: "TypeTwo"; } & string +>x2 : { __typename?: 'TypeTwo'; } & string > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types index b53132a7c94ba..c9a53432a91fc 100644 --- a/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types +++ b/tests/baselines/reference/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types @@ -20024,7 +20024,7 @@ type ChildrenOf = T['children'][number]; > : ^^^^^^^^^^^^^ export function makeThing( ->makeThing : (name: T, children?: ChildrenOf>[]) => void +>makeThing : (name: T, children?: ChildrenOf>[]) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^ name: T, diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types index 341678572ef89..814e0c20d3bec 100644 --- a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types @@ -13,7 +13,7 @@ type Record2 = { }; function defaultRecord(x: Record<'a', string>, y: Record) { ->defaultRecord : (x: Record<"a", string>, y: Record) => void +>defaultRecord : (x: Record<'a', string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ function defaultRecord(x: Record<'a', string>, y: Record) { } function customRecord(x: Record2<'a', string>, y: Record2) { ->customRecord : (x: Record2<"a", string>, y: Record2) => void +>customRecord : (x: Record2<'a', string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ function customRecord(x: Record2<'a', string>, y: Record2) { } function mixed1(x: Record2<'a', string>, y: Record) { ->mixed1 : (x: Record2<"a", string>, y: Record) => void +>mixed1 : (x: Record2<'a', string>, y: Record) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", string> > : ^^^^^^^^^^^^^^^^^^^^ @@ -64,7 +64,7 @@ function mixed1(x: Record2<'a', string>, y: Record) { } function mixed2(x: Record<'a', string>, y: Record2) { ->mixed2 : (x: Record<"a", string>, y: Record2) => void +>mixed2 : (x: Record<'a', string>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", string> > : ^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ function mixed2(x: Record<'a', string>, y: Record2) { } function defaultRecord2(x: Record<'a', T>, y: Record) { ->defaultRecord2 : (x: Record<"a", T>, y: Record) => void +>defaultRecord2 : (x: Record<'a', T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ function defaultRecord2(x: Record<'a', T>, y: Record) { } function customRecord2(x: Record2<'a', T>, y: Record2) { ->customRecord2 : (x: Record2<"a", T>, y: Record2) => void +>customRecord2 : (x: Record2<'a', T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ function customRecord2(x: Record2<'a', T>, y: Record2) { } function mixed3(x: Record2<'a', T>, y: Record) { ->mixed3 : (x: Record2<"a", T>, y: Record) => void +>mixed3 : (x: Record2<'a', T>, y: Record) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record2<"a", T> > : ^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ function mixed3(x: Record2<'a', T>, y: Record) { } function mixed4(x: Record<'a', T>, y: Record2) { ->mixed4 : (x: Record<"a", T>, y: Record2) => void +>mixed4 : (x: Record<'a', T>, y: Record2) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >x : Record<"a", T> > : ^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constAssertions.types b/tests/baselines/reference/constAssertions.types index e64ff4ce6e3fa..3de63430ed042 100644 --- a/tests/baselines/reference/constAssertions.types +++ b/tests/baselines/reference/constAssertions.types @@ -650,7 +650,7 @@ let t4 = `${`(${t1})`}-${`(${t2})`}` as const; > : ^^^^^ function ff1(x: 'foo' | 'bar', y: 1 | 2) { ->ff1 : (x: "foo" | "bar", y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" +>ff1 : (x: 'foo' | 'bar', y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,7 +754,7 @@ const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); > : ^^^^^^^ function ff3(x: 'foo' | 'bar', y: object) { ->ff3 : (x: "foo" | "bar", y: object) => `foo${string}` | `bar${string}` +>ff3 : (x: 'foo' | 'bar', y: object) => `foo${string}` | `bar${string}` > : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "foo" | "bar" > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/constantOverloadFunction.types b/tests/baselines/reference/constantOverloadFunction.types index 4a7b2d87e01c3..461fce96494b9 100644 --- a/tests/baselines/reference/constantOverloadFunction.types +++ b/tests/baselines/reference/constantOverloadFunction.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived1; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived3; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: string): Base; ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types index c22ff4030d88c..bd7721b2b40fe 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types @@ -32,31 +32,31 @@ class Derived3 extends Base { biz() { } } > : ^^^^^^^^^^ function foo(tagName: 'canvas'): Derived3; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ function foo(tagName: 'div'): Derived2; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ function foo(tagName: 'span'): Derived1; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ function foo(tagName: number): Base; ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : number > : ^^^^^^ function foo(tagName: any): Base { ->foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>foo : { (tagName: 'canvas'): Derived3; (tagName: 'div'): Derived2; (tagName: 'span'): Derived1; (tagName: number): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types index c5ac24db84967..bba8cc1135813 100644 --- a/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types +++ b/tests/baselines/reference/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types @@ -93,7 +93,7 @@ test2({ type: "foo" }); // https://github.com/microsoft/TypeScript/issues/59473 const x: { ml: any } & { ml: 'edge' } = { ml: 'edge' }; ->x : { ml: any; } & { ml: "edge"; } +>x : { ml: any; } & { ml: 'edge'; } > : ^^^^^^ ^^^^^^^^^^^^ ^^^ >ml : any >ml : "edge" diff --git a/tests/baselines/reference/contextualTypedSpecialAssignment.types b/tests/baselines/reference/contextualTypedSpecialAssignment.types index 8c5d1bbc1c6f6..05d220458d32e 100644 --- a/tests/baselines/reference/contextualTypedSpecialAssignment.types +++ b/tests/baselines/reference/contextualTypedSpecialAssignment.types @@ -289,13 +289,13 @@ F.prototype = { // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { ->module.exports = { status: "done", m(n) { }} : { status: "done"; m(n: number): void; } +>module.exports = { status: "done", m(n) { }} : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module.exports : { status: "done"; m(n: number): void; } +>module.exports : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ ->module : { exports: { status: "done"; m(n: number): void; }; } +>module : { exports: { status: 'done'; m(n: number): void; }; } > : ^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^^^^ ->exports : { status: "done"; m(n: number): void; } +>exports : { status: 'done'; m(n: number): void; } > : ^^^^^^^^^^ ^^^^ ^^ ^^^ ^^^ >{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types index 95e4eb7641d68..cb5debb4d96b1 100644 --- a/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types +++ b/tests/baselines/reference/contextuallyTypedSymbolNamedProperties.types @@ -48,7 +48,7 @@ declare const ab: Action; > : ^^^^^^ declare function f(action: T, blah: { [K in T['type']]: (p: K) => void }): any; ->f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >type : string | symbol > : ^^^^^^^^^^^^^^^ @@ -61,7 +61,7 @@ declare function f(action: T, blah: { [K in f(ab, { >f(ab, { [A]: ap => { ap.description }, [B]: bp => { bp.description },}) : any ->f : (action: T, blah: { [K in T["type"]]: (p: K) => void; }) => any +>f : (action: T, blah: { [K in T['type']]: (p: K) => void; }) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >ab : Action > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowAliasedDiscriminants.types b/tests/baselines/reference/controlFlowAliasedDiscriminants.types index 9fd6a7949b697..13d0f182fea7b 100644 --- a/tests/baselines/reference/controlFlowAliasedDiscriminants.types +++ b/tests/baselines/reference/controlFlowAliasedDiscriminants.types @@ -526,7 +526,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: "string"; resp: { data: string; }; } +>resp : { type: 'string'; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ @@ -586,7 +586,7 @@ type Nested = { > : ^^^^^^ >resp.resp : { data: string; } > : ^^^^^^^^ ^^^ ->resp : { type: "string"; resp: { data: string; }; } +>resp : { type: 'string'; resp: { data: string; }; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >resp : { data: string; } > : ^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index d24919344d519..5590b3055b15f 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -388,9 +388,9 @@ function f18(obj: readonly [string | number]) { } function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f20 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f20 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -408,7 +408,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -422,7 +422,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -431,7 +431,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -439,9 +439,9 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f21 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f21 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -459,7 +459,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -473,7 +473,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo has type annotation >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -482,7 +482,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo has type annotation >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -490,9 +490,9 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f22 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f22 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -510,7 +510,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -524,7 +524,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because isFoo is mutable >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -533,7 +533,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because isFoo is mutable >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -541,9 +541,9 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f23 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f23 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -561,7 +561,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -569,11 +569,11 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ obj = obj; ->obj = obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj = obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (isFoo) { @@ -583,7 +583,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; // Not narrowed because obj is assigned in function body >obj.foo : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -592,7 +592,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; // Not narrowed because obj is assigned in function body >obj.bar : any > : ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -600,9 +600,9 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f24 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f24 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -614,9 +614,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ const obj = arg; ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -626,7 +626,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -640,7 +640,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -649,7 +649,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -657,9 +657,9 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f25 : (arg: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f25 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -671,9 +671,9 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^ let obj = arg; ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->arg : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ const isFoo = obj.kind === 'foo'; @@ -683,7 +683,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -697,7 +697,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -706,7 +706,7 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -714,11 +714,11 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f26 : (outer: { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void +>f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -736,11 +736,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -754,11 +754,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.foo; >outer.obj.foo : string > : ^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } +>outer.obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -767,11 +767,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' outer.obj.bar; >outer.obj.bar : number > : ^^^^^^ ->outer.obj : { kind: "bar"; bar: number; } +>outer.obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ ->outer : { readonly obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^^^^^^^^^^ ^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -779,11 +779,11 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' } function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f27 : (outer: { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; }) => void +>f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void > : ^ ^^ ^^^^^^^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -801,11 +801,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu > : ^^^^^^^ >outer.obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -819,11 +819,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.foo; // Not narrowed because obj is mutable >outer.obj.foo : any > : ^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >foo : any > : ^^^ @@ -832,11 +832,11 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu outer.obj.bar; // Not narrowed because obj is mutable >outer.obj.bar : any > : ^^^ ->outer.obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>outer.obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ ->outer : { obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }; } +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } > : ^^^^^^^ ^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >bar : any > : ^^^ @@ -844,9 +844,9 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu } function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f28 : (obj?: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "foo" > : ^^^^^ @@ -862,13 +862,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'foo' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'foo' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -880,13 +880,13 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) > : ^^^^^^^^^^^^^^^^^^^ >obj && obj.kind === 'bar' : boolean | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } | undefined +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ >obj.kind === 'bar' : boolean > : ^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -900,7 +900,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -912,7 +912,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -922,9 +922,9 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) // Narrowing by aliased discriminant property access function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f30 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f30 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -940,7 +940,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^^^^^^^^^ >obj.kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ @@ -956,7 +956,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -965,7 +965,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -973,9 +973,9 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f31 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f31 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -989,7 +989,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (kind === 'foo') { @@ -1003,7 +1003,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1012,7 +1012,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1020,9 +1020,9 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f32 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f32 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1038,7 +1038,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^ >k : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ if (k === 'foo') { @@ -1052,7 +1052,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.foo; >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1061,7 +1061,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { obj.bar; >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1069,9 +1069,9 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f33 : (obj: { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; }) => void +>f33 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1085,7 +1085,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo: string; } | { kind: "bar"; bar: number; } +>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^ ^^^ switch (kind) { @@ -1097,7 +1097,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo: string; } +>obj : { kind: 'foo'; foo: string; } > : ^^^^^^^^ ^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1107,7 +1107,7 @@ function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { > : ^^^^^ >obj.bar : number > : ^^^^^^ ->obj : { kind: "bar"; bar: number; } +>obj : { kind: 'bar'; bar: number; } > : ^^^^^^^^ ^^^^^^^ ^^^ >bar : number > : ^^^^^^ @@ -1282,9 +1282,9 @@ class C11 { // Mixing of aliased discriminants and conditionals function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) { ->f40 : (obj: { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; }) => void +>f40 : (obj: { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } +>obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "foo" > : ^^^^^ @@ -1298,7 +1298,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) const { kind } = obj; >kind : "foo" | "bar" > : ^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } | { kind: "bar"; bar?: number; } +>obj : { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ const isFoo = kind == 'foo'; @@ -1318,7 +1318,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^^ >obj.foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->obj : { kind: "foo"; foo?: string; } +>obj : { kind: 'foo'; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -1328,7 +1328,7 @@ function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) > : ^^^^^^ >obj.foo : string > : ^^^^^^ ->obj : { kind: "foo"; foo?: string; } +>obj : { kind: 'foo'; foo?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >foo : string > : ^^^^^^ @@ -1372,7 +1372,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : string > : ^^^^^^ ->obj : { kind: "str"; payload: string; } +>obj : { kind: 'str'; payload: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : string > : ^^^^^^ @@ -1383,7 +1383,7 @@ function gg2(obj: Data) { > : ^^^^^^ >obj.payload : number > : ^^^^^^ ->obj : { kind: "num"; payload: number; } +>obj : { kind: 'num'; payload: number; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ >payload : number > : ^^^^^^ diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index 34aaf80709138..a016d450be1e0 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -252,13 +252,13 @@ function g4 | undefined>(x: T) { // Repro from #13995 declare function takeA(val: 'A'): void; ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -274,7 +274,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index 1be51c8e96277..ced5d4f19bd3e 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -3051,7 +3051,7 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.radius : number > : ^^^^^^ ->shape : { type: "circle"; radius: number; } +>shape : { type: 'circle'; radius: number; } > : ^^^^^^^^ ^^^^^^^^^^ ^^^ >radius : number > : ^^^^^^ @@ -3067,13 +3067,13 @@ function getArea(shape?: Shape) { > : ^^^^^^ >shape.width : number > : ^^^^^^ ->shape : { type: "rectangle"; width: number; height: number; } +>shape : { type: 'rectangle'; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >width : number > : ^^^^^^ >shape.height : number > : ^^^^^^ ->shape : { type: "rectangle"; width: number; height: number; } +>shape : { type: 'rectangle'; width: number; height: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ >height : number > : ^^^^^^ diff --git a/tests/baselines/reference/correlatedUnions.types b/tests/baselines/reference/correlatedUnions.types index 82f0b9d082942..d9cca19802a09 100644 --- a/tests/baselines/reference/correlatedUnions.types +++ b/tests/baselines/reference/correlatedUnions.types @@ -1047,7 +1047,7 @@ const ref: MyObj = { }; function func(k: K): MyObj[K]['name'] | undefined { ->func : (k: K) => MyObj[K]["name"] | undefined +>func : (k: K) => MyObj[K]['name'] | undefined > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >k : K > : ^ diff --git a/tests/baselines/reference/declarationEmitAliasInlineing.types b/tests/baselines/reference/declarationEmitAliasInlineing.types index a03f57311a4ee..dc255c7728734 100644 --- a/tests/baselines/reference/declarationEmitAliasInlineing.types +++ b/tests/baselines/reference/declarationEmitAliasInlineing.types @@ -24,9 +24,9 @@ type I = { } export const fn = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fn : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>fn : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -61,9 +61,9 @@ export type I = { } export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {}; ->fnExp : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>fnExp : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O["prop"], p: Omit, key: keyof O, p2: Omit) => void +>(v: O['prop'], p: Omit, key: keyof O, p2: Omit) => {} : (v: O['prop'], p: Omit, key: keyof O, p2: Omit) => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >v : string > : ^^^^^^ @@ -76,22 +76,22 @@ export const fnExp = (v: O['prop'], p: Omit, key: keyof O, p2: Omitfn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ import {fnExp} from './aExp' ->fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ export const f = fn; ->f : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>f : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ ->fn : (v: string, p: Omit<{ prop: string; prop2: string; }, "prop">, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void +>fn : (v: string, p: Omit<{ prop: string; prop2: string; }, 'prop'>, key: keyof { prop: string; prop2: string; }, p2: Omit<{ prop: string; prop2: string; }, "prop">) => void > : ^ ^^^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^^^^ export const fExp = fnExp; ->fExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ ->fnExp : (v: import("aExp").O["prop"], p: Omit, key: keyof import("aExp").O, p2: Omit) => void +>fnExp : (v: import("aExp").O['prop'], p: Omit, key: keyof import("aExp").O, p2: Omit) => void > : ^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^ ^^ ^^ ^^^^^^ ^^^ ^^ ^^^^^^ ^ ^^^^^^ ^ ^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types index 68058b6bb5190..b18f1527ab1b4 100644 --- a/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types +++ b/tests/baselines/reference/declarationEmitMappedTypeDistributivityPreservesConstraints.types @@ -16,7 +16,7 @@ type AllArg = { [K in keyof T]: Parameters }; > : ^^^^^^^^^ function fn }>(sliceIndex: T): AllArg { ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : Map > : ^^^^^^^^^^^ @@ -29,9 +29,9 @@ function fn }>(sliceIndex: T): AllArg { } export default { fn }; ->{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } +>{ fn } : { fn: ; }>(sliceIndex: T) => AllArg; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^^ ->fn : ; }>(sliceIndex: T) => AllArg +>fn : ; }>(sliceIndex: T) => AllArg > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ === reexport.ts === diff --git a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types index 4579c067ade2f..e846364d28110 100644 --- a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types +++ b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types @@ -37,17 +37,17 @@ const a = { a: "value of a", notNecessary: u } as const export const o1 = (o: A['a']['b']) => {} ->o1 : (o: A["a"]["b"]) => void +>o1 : (o: A['a']['b']) => void > : ^ ^^ ^^^^^^^^^ ->(o: A['a']['b']) => {} : (o: A["a"]["b"]) => void +>(o: A['a']['b']) => {} : (o: A['a']['b']) => void > : ^ ^^ ^^^^^^^^^ >o : "value of b" > : ^^^^^^^^^^^^ export const o2 = (o: (typeof a)['a']) => {} ->o2 : (o: (typeof a)["a"]) => void +>o2 : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: (typeof a)['a']) => {} : (o: (typeof a)["a"]) => void +>(o: (typeof a)['a']) => {} : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -55,9 +55,9 @@ export const o2 = (o: (typeof a)['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o3 = (o: typeof a['a']) => {} ->o3 : (o: (typeof a)["a"]) => void +>o3 : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ ->(o: typeof a['a']) => {} : (o: (typeof a)["a"]) => void +>(o: typeof a['a']) => {} : (o: (typeof a)['a']) => void > : ^ ^^^ ^ ^^^^^^^^^ >o : "value of a" > : ^^^^^^^^^^^^ @@ -65,9 +65,9 @@ export const o3 = (o: typeof a['a']) => {} > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const o4 = (o: keyof (A['a'])) => {} ->o4 : (o: keyof A["a"]) => void +>o4 : (o: keyof A['a']) => void > : ^ ^^ ^^^^^^^^^ ->(o: keyof (A['a'])) => {} : (o: keyof A["a"]) => void +>(o: keyof (A['a'])) => {} : (o: keyof A['a']) => void > : ^ ^^ ^^^^^^^^^ >o : "b" | "notNecessary" > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types index b99ee19d2b2b1..116d339dfa209 100644 --- a/tests/baselines/reference/declarationEmitUsingTypeAlias2.types +++ b/tests/baselines/reference/declarationEmitUsingTypeAlias2.types @@ -50,7 +50,7 @@ import { shouldLookupName, reuseDepName, shouldReuseLocalName, shouldBeElided } > : ^^^^^^^^^^^^^ export declare const goodDeclaration: () => () => { ->goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import("./other").shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } +>goodDeclaration : () => () => { shouldPrintResult: T extends Other ? "O" : "N"; shouldPrintResult2: T extends typeof shouldBeElided ? Other : "N"; shouldLookupName: typeof import('./other').shouldLookupName; shouldReuseLocalName: typeof shouldReuseLocalName; reuseDepName: typeof reuseDepName; } > : ^ ^^^^^^^ /** Other Can't be named in index.ts, but the whole conditional type can be resolved */ diff --git a/tests/baselines/reference/deferredLookupTypeResolution.types b/tests/baselines/reference/deferredLookupTypeResolution.types index 81aa562834c02..a45a4870b07ee 100644 --- a/tests/baselines/reference/deferredLookupTypeResolution.types +++ b/tests/baselines/reference/deferredLookupTypeResolution.types @@ -62,7 +62,7 @@ function f2(a: A) { } function f3(x: 'a' | 'b') { ->f3 : (x: "a" | "b") => { a: any; b: any; x: any; } +>f3 : (x: 'a' | 'b') => { a: any; b: any; x: any; } > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : "a" | "b" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index 1b829f101d426..36af4eef845aa 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -878,7 +878,7 @@ f50((kind, data) => { }); const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => { ->f51 : (...args: ["A", number] | ["B", string]) => void +>f51 : (...args: ['A', number] | ['B', string]) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B", string] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -928,7 +928,7 @@ const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => }; const f52: (...args: ['A', number] | ['B']) => void = (kind, payload?) => { ->f52 : (...args: ["A", number] | ["B"]) => void +>f52 : (...args: ['A', number] | ['B']) => void > : ^^^^ ^^ ^^^^^ >args : ["A", number] | ["B"] > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType1.types b/tests/baselines/reference/dependentReturnType1.types index 96265db6b57be..9ec46efcfb0af 100644 --- a/tests/baselines/reference/dependentReturnType1.types +++ b/tests/baselines/reference/dependentReturnType1.types @@ -482,13 +482,13 @@ function ftakeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >val : "A" > : ^^^ export function bounceAndTakeIfA(value: AB): AB { ->bounceAndTakeIfA : (value: AB) => AB +>bounceAndTakeIfA : (value: AB) => AB > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : AB > : ^^ @@ -504,7 +504,7 @@ export function bounceAndTakeIfA(value: AB): AB { takeA(value); >takeA(value) : void > : ^^^^ ->takeA : (val: "A") => void +>takeA : (val: 'A') => void > : ^ ^^ ^^^^^ >value : "A" > : ^^^ diff --git a/tests/baselines/reference/dependentReturnType2.types b/tests/baselines/reference/dependentReturnType2.types index 1adf92c29a8fd..2581a01cb7ebf 100644 --- a/tests/baselines/reference/dependentReturnType2.types +++ b/tests/baselines/reference/dependentReturnType2.types @@ -827,7 +827,7 @@ class NewAgenda { * @returns {Promise} */ async _createIntervalJob(interval, name, data, options) { ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -853,7 +853,7 @@ class NewAgenda { * @returns {Promise | undefined} */ _createIntervalJobs(interval, names, data, options) { ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -878,7 +878,7 @@ class NewAgenda { * @returns {Promise>} */ async newEvery(interval, name, data, options) { ->newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -902,11 +902,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -933,11 +933,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/dependentReturnType3.types b/tests/baselines/reference/dependentReturnType3.types index ac94d85e9b9e3..43ac3d581739c 100644 --- a/tests/baselines/reference/dependentReturnType3.types +++ b/tests/baselines/reference/dependentReturnType3.types @@ -825,7 +825,7 @@ class NewAgenda { > : ^^^^^^^^^ public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise { return undefined as any; } ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -841,7 +841,7 @@ class NewAgenda { > : ^^^^^^^^^ private _createIntervalJobs( ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -867,7 +867,7 @@ class NewAgenda { > : ^^^^^^^^^ public async newEvery( ->newEvery : (interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise> +>newEvery : (interval: string | number, name: T, data: IJob['data'], options: RepeatOptions) => Promise> > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ interval: string | number, @@ -899,11 +899,11 @@ class NewAgenda { return this._createIntervalJob(interval, name, data, options); // Ok >this._createIntervalJob(interval, name, data, options) : Promise > : ^^^^^^^^^^^^^^^ ->this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>this._createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise +>_createIntervalJob : (interval: string | number, name: string, data: IJob['data'], options: RepeatOptions) => Promise > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ @@ -930,11 +930,11 @@ class NewAgenda { return this._createIntervalJobs(interval, name, data, options); // Ok >this._createIntervalJobs(interval, name, data, options) : Promise | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >this : this > : ^^^^ ->_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise | undefined +>_createIntervalJobs : (interval: string | number, names: string[], data: IJob['data'], options: RepeatOptions) => Promise | undefined > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >interval : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuredDeclarationEmit.types b/tests/baselines/reference/destructuredDeclarationEmit.types index 5329e83ccc2e4..ef7f04b00fed6 100644 --- a/tests/baselines/reference/destructuredDeclarationEmit.types +++ b/tests/baselines/reference/destructuredDeclarationEmit.types @@ -32,7 +32,7 @@ const foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } > : ^^^ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]]; ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ >def : "def" > : ^^^^^ @@ -72,20 +72,20 @@ const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ === index.ts === import { foo, arr } from './foo'; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { foo, arr }; >foo : { bar: string; bat: string; bam: { bork: { bar: string; baz: string; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo; @@ -133,7 +133,7 @@ const [ , one, , [, bee, , [, {sec} ]]] = arr; > : ^^^^^^^^^ >sec : "sec" > : ^^^^^ ->arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]] +>arr : [0, 1, 2, ["a", "b", "c", [{ def: 'def'; }, { sec: 'sec'; }]]] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ export { one, bee, sec }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration8.types b/tests/baselines/reference/destructuringParameterDeclaration8.types index 54655273fce7b..80dd1b585f02a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration8.types +++ b/tests/baselines/reference/destructuringParameterDeclaration8.types @@ -4,7 +4,7 @@ // explicit type annotation should cause `method` to have type 'x' | 'y' // both inside and outside `test`. function test({ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ method = 'z', @@ -27,7 +27,7 @@ function test({ > : ^^^^^^^^^ nested?: { p: 'a' | 'b' } ->nested : { p: "a" | "b"; } +>nested : { p: 'a' | 'b'; } > : ^^^^^ ^^^ >p : "a" | "b" > : ^^^^^^^^^ @@ -46,7 +46,7 @@ function test({ test({}); >test({}) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{} : {} > : ^^ @@ -54,7 +54,7 @@ test({}); test({ method: 'x', nested: { p: 'a' } }) >test({ method: 'x', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'x', nested: { p: 'a' } } : { method: "x"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ test({ method: 'x', nested: { p: 'a' } }) test({ method: 'z', nested: { p: 'b' } }) >test({ method: 'z', nested: { p: 'b' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -94,7 +94,7 @@ test({ method: 'z', nested: { p: 'b' } }) test({ method: 'one', nested: { p: 'a' } }) >test({ method: 'one', nested: { p: 'a' } }) : void > : ^^^^ ->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void > : ^ ^^ ^^^^^^^^^ >{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types index e827977063d76..3d1dd22fe0be6 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types +++ b/tests/baselines/reference/destructuringParameterDeclaration9(strict=false).types @@ -6,7 +6,7 @@ * @param {Partial>} [config.additionalFiles] */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void > : ^ ^^^ ^^^ ^ ^^^^^^^^^ additionalFiles: { diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types index eea65063472ed..851bd317245c8 100644 --- a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types @@ -28,7 +28,7 @@ type X = const x: X = 4 as any as { x: 'x' | 'y', y: number }; >x : X > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 @@ -60,7 +60,7 @@ type Y = const y: Y = 4 as any as { x: 'x' | 'y', y: number }; >y : Y > : ^ ->4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any as { x: 'x' | 'y', y: number } : { x: 'x' | 'y'; y: number; } > : ^^^^^ ^^^^^ ^^^ >4 as any : any >4 : 4 diff --git a/tests/baselines/reference/discriminantPropertyCheck.types b/tests/baselines/reference/discriminantPropertyCheck.types index f92594a3e1fd4..85488720e94d7 100644 --- a/tests/baselines/reference/discriminantPropertyCheck.types +++ b/tests/baselines/reference/discriminantPropertyCheck.types @@ -649,7 +649,7 @@ export function foo(obj: Obj) { onlyPlus(obj.key); >onlyPlus(obj.key) : "+" > : ^^^ ->onlyPlus : (arg: "+") => "+" +>onlyPlus : (arg: '+') => "+" > : ^ ^^ ^^^^^^^^ >obj.key : "+" > : ^^^ @@ -664,7 +664,7 @@ export function foo(obj: Obj) { } function onlyPlus(arg: '+') { ->onlyPlus : (arg: "+") => "+" +>onlyPlus : (arg: '+') => "+" > : ^ ^^ ^^^^^^^^ >arg : "+" > : ^^^ diff --git a/tests/baselines/reference/discriminatedUnionTypes2.types b/tests/baselines/reference/discriminatedUnionTypes2.types index f67c4ae4daa10..ce388aacf9544 100644 --- a/tests/baselines/reference/discriminatedUnionTypes2.types +++ b/tests/baselines/reference/discriminatedUnionTypes2.types @@ -549,9 +549,9 @@ type RuntimeValue = > : ^^^^^^^ function foo1(x: RuntimeValue & { type: 'number' }) { ->foo1 : (x: RuntimeValue & { type: "number"; }) => void +>foo1 : (x: RuntimeValue & { type: 'number'; }) => void > : ^ ^^ ^^^^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -561,7 +561,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { > : ^^^^^^^ >x.type : "number" > : ^^^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >type : "number" > : ^^^^^^^^ @@ -571,7 +571,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -580,7 +580,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -588,9 +588,9 @@ function foo1(x: RuntimeValue & { type: 'number' }) { } function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { ->foo2 : (x: RuntimeValue & ({ type: "number"; } | { type: "string"; })) => void +>foo2 : (x: RuntimeValue & ({ type: 'number'; } | { type: 'string'; })) => void > : ^ ^^ ^^^^^^^^^ ->x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) +>x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "number" > : ^^^^^^^^ @@ -602,7 +602,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { > : ^^^^^^^ >x.type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ ->x : ({ type: "number"; value: number; } & { type: "number"; }) | ({ type: "string"; value: string; } & { type: "string"; }) +>x : ({ type: 'number'; value: number; } & { type: 'number'; }) | ({ type: 'string'; value: string; } & { type: 'string'; }) > : ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^ >type : "string" | "number" > : ^^^^^^^^^^^^^^^^^^^ @@ -612,7 +612,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // number >x.value : number > : ^^^^^^ ->x : { type: "number"; value: number; } & { type: "number"; } +>x : { type: 'number'; value: number; } & { type: 'number'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : number > : ^^^^^^ @@ -621,7 +621,7 @@ function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { x.value; // string >x.value : string > : ^^^^^^ ->x : { type: "string"; value: string; } & { type: "string"; } +>x : { type: 'string'; value: string; } & { type: 'string'; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >value : string > : ^^^^^^ diff --git a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types index 313700a47e74f..17e007554c208 100644 --- a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types +++ b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types @@ -79,7 +79,7 @@ type Schema2 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj2: Schema2 = { ->schemaObj2 : { props: { l1: { props: { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example +>schemaObj2 : { props: { l1: { props: { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; } & Example<{ l2: boolean; }>; }; } & Example > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ type Schema4 = (T extends boolean ? { type: 'boolean'; } & Example : { pro > : ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ export const schemaObj4: Schema4 = { ->schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: "boolean"; } & Example) | ({ type: "boolean"; } & Example); }; }; }; } +>schemaObj4 : { props: Example & { l1: { props: Example<{ l2: boolean; }> & { l2: ({ type: 'boolean'; } & Example) | ({ type: 'boolean'; } & Example); }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >{ props: { l1: { props: { l2: { type: 'boolean' }, invalid: false, }, }, },} : { props: { l1: { props: { l2: { type: "boolean"; }; invalid: boolean; }; }; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types index 6df385d452429..a3876a2c08673 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types index 6df385d452429..a3876a2c08673 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=true).types @@ -94,7 +94,7 @@ interface Foo6 { [Cls1.a]: number; [Cls2.b]: number; [obj1.c]: number; [obj2.d]: > : ^^^^^^ >obj1.c : "c" > : ^^^ ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ @@ -124,7 +124,7 @@ class Cls2 { static b = "b" as const; } > : ^^^ declare const obj1: { c: 'c' } ->obj1 : { c: "c"; } +>obj1 : { c: 'c'; } > : ^^^^^ ^^^ >c : "c" > : ^^^ diff --git a/tests/baselines/reference/generatorReturnContextualType.types b/tests/baselines/reference/generatorReturnContextualType.types index 392d859ed65b0..e3fe28c12939f 100644 --- a/tests/baselines/reference/generatorReturnContextualType.types +++ b/tests/baselines/reference/generatorReturnContextualType.types @@ -4,7 +4,7 @@ // #35995 function* f1(): Generator { ->f1 : () => Generator +>f1 : () => Generator > : ^^^^^^ >x : "x" > : ^^^ @@ -19,7 +19,7 @@ function* f1(): Generator { } function* g1(): Iterator { ->g1 : () => Iterator +>g1 : () => Iterator > : ^^^^^^ >x : "x" > : ^^^ @@ -34,7 +34,7 @@ function* g1(): Iterator { } async function* f2(): AsyncGenerator { ->f2 : () => AsyncGenerator +>f2 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -49,7 +49,7 @@ async function* f2(): AsyncGenerator { } async function* g2(): AsyncIterator { ->g2 : () => AsyncIterator +>g2 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -64,7 +64,7 @@ async function* g2(): AsyncIterator { } async function* f3(): AsyncGenerator { ->f3 : () => AsyncGenerator +>f3 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -87,7 +87,7 @@ async function* f3(): AsyncGenerator { } async function* g3(): AsyncIterator { ->g3 : () => AsyncIterator +>g3 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ @@ -110,7 +110,7 @@ async function* g3(): AsyncIterator { } async function* f4(): AsyncGenerator { ->f4 : () => AsyncGenerator +>f4 : () => AsyncGenerator > : ^^^^^^ >x : "x" > : ^^^ @@ -139,7 +139,7 @@ async function* f4(): AsyncGenerator { } async function* g4(): AsyncIterator { ->g4 : () => AsyncIterator +>g4 : () => AsyncIterator > : ^^^^^^ >x : "x" > : ^^^ diff --git a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types index 1a2cbde5968ed..408369af28144 100644 --- a/tests/baselines/reference/genericObjectSpreadResultInSwitch.types +++ b/tests/baselines/reference/genericObjectSpreadResultInSwitch.types @@ -70,11 +70,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : number > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: "a"; type: number; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: 'a'; type: number; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: "a"; type: number; } +>params : { foo: string; } & { tag: 'a'; type: number; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : number > : ^^^^^^ @@ -92,11 +92,11 @@ switch (params.tag) { > : ^^^^^^ >getType(params).type : string > : ^^^^^^ ->getType(params) : Omit<{ foo: string; } & { tag: "b"; type: string; }, "foo"> +>getType(params) : Omit<{ foo: string; } & { tag: 'b'; type: string; }, "foo"> > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^ >getType :

(params: P) => Omit > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ->params : { foo: string; } & { tag: "b"; type: string; } +>params : { foo: string; } & { tag: 'b'; type: string; } > : ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >type : string > : ^^^^^^ diff --git a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types index 43c575386ab0e..24dc18e19c9ac 100644 --- a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types +++ b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types @@ -39,9 +39,9 @@ type PostBody = Extract["body"]; > : ^^^^ const post = ( ->post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ path: PATH, @@ -77,7 +77,7 @@ const tmp = ( post(path, { body }) >post(path, { body }) : void > : ^^^^ ->post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH_1, { body, ...options }: Omit & { body: PostBody; }) => void > : ^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >path : PATH > : ^^^^ diff --git a/tests/baselines/reference/independentPropertyVariance.types b/tests/baselines/reference/independentPropertyVariance.types index 4d846fdc12ec6..95ff4022c4987 100644 --- a/tests/baselines/reference/independentPropertyVariance.types +++ b/tests/baselines/reference/independentPropertyVariance.types @@ -12,7 +12,7 @@ declare const x: { a: 1, b: string }; > : ^^^^^^ declare const y: { a: number, b: 'a' }; ->y : { a: number; b: "a"; } +>y : { a: number; b: 'a'; } > : ^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -24,6 +24,6 @@ x === y; > : ^^^^^^^ >x : { a: 1; b: string; } > : ^^^^^ ^^^^^ ^^^ ->y : { a: number; b: "a"; } +>y : { a: number; b: 'a'; } > : ^^^^^ ^^^^^ ^^^ diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.types b/tests/baselines/reference/indexedAccessTypeConstraints.types index 17b5fb66dd175..d30d7ddad9b4b 100644 --- a/tests/baselines/reference/indexedAccessTypeConstraints.types +++ b/tests/baselines/reference/indexedAccessTypeConstraints.types @@ -106,7 +106,7 @@ export class Bar> extends Parent { // Repro from #14557 function foo(x: C, y: T['content']) { ->foo : (x: C, y: T["content"]) => void +>foo : (x: C, y: T['content']) => void > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >content : C > : ^ diff --git a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types index c483b23f65f72..d77f4b930db53 100644 --- a/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types +++ b/tests/baselines/reference/indexedAccessWithFreshObjectLiteral.types @@ -37,7 +37,7 @@ function foo (id: string) { } function bar (id: 'a' | 'b') { ->bar : (id: "a" | "b") => string | number +>bar : (id: 'a' | 'b') => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" > : ^^^^^^^^^ @@ -72,7 +72,7 @@ function bar (id: 'a' | 'b') { } function baz (id: '1' | '2') { ->baz : (id: "1" | "2") => string | number +>baz : (id: '1' | '2') => string | number > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^ >id : "1" | "2" > : ^^^^^^^^^ @@ -142,7 +142,7 @@ function qux (id: 1 | 2) { } function quux (id: 'a' | 'b' | 'z') { ->quux : (id: "a" | "b" | "z") => string | number | undefined +>quux : (id: 'a' | 'b' | 'z') => string | number | undefined > : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >id : "a" | "b" | "z" > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index e20de1c2bbd86..44b42100025ef 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -45,7 +45,7 @@ function wrap(value: T): Wrap { } function wrappedFoo(): Wrap<'foo'> { ->wrappedFoo : () => Wrap<"foo"> +>wrappedFoo : () => Wrap<'foo'> > : ^^^^^^ return wrap('foo'); @@ -58,7 +58,7 @@ function wrappedFoo(): Wrap<'foo'> { } function wrapBar(value: 'bar'): Wrap<'bar'> { ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -71,7 +71,7 @@ function wrapBar(value: 'bar'): Wrap<'bar'> { } function wrappedBar(): Wrap<'bar'> { ->wrappedBar : () => Wrap<"bar"> +>wrappedBar : () => Wrap<'bar'> > : ^^^^^^ const value = 'bar'; @@ -85,7 +85,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value : "bar" > : ^^^^^ @@ -95,7 +95,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar('bar') : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >'bar' : "bar" > : ^^^^^ @@ -111,7 +111,7 @@ function wrappedBar(): Wrap<'bar'> { > : ^^^^^^^^^^^ >wrapBar(value2) : Wrap<"bar"> > : ^^^^^^^^^^^ ->wrapBar : (value: "bar") => Wrap<"bar"> +>wrapBar : (value: 'bar') => Wrap<'bar'> > : ^ ^^ ^^^^^ >value2 : string > : ^^^^^^ @@ -126,7 +126,7 @@ function wrappedBar(): Wrap<'bar'> { } function wrappedBaz(): Wrap<'baz'> { ->wrappedBaz : () => Wrap<"baz"> +>wrappedBaz : () => Wrap<'baz'> > : ^^^^^^ const value: 'baz' = 'baz'; @@ -386,7 +386,7 @@ function objectToMap(obj: any) { interface Person { phoneNumbers: { ->phoneNumbers : { __typename: "PhoneNumber"; }[] +>phoneNumbers : { __typename: 'PhoneNumber'; }[] > : ^^^^^^^^^^^^^^ ^^^^^ __typename: 'PhoneNumber'; diff --git a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types index a783ee1e541b5..8b7eca25fb50a 100644 --- a/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types +++ b/tests/baselines/reference/inferenceOfNullableObjectTypesWithCommonBase.types @@ -236,7 +236,7 @@ equal(v as string, v as string & { tag: 'foo' } | undefined); > : ^^^^^^ >v : never > : ^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ @@ -248,7 +248,7 @@ equal(v as string & { tag: 'foo' } | undefined, v as string); > : ^^^^ >equal : (a: T, b: T) => void > : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ->v as string & { tag: 'foo' } | undefined : (string & { tag: "foo"; }) | undefined +>v as string & { tag: 'foo' } | undefined : (string & { tag: 'foo'; }) | undefined > : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >v : never > : ^^^^^ diff --git a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types index 06624e4bebd8b..404e3c8b4cfcc 100644 --- a/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types +++ b/tests/baselines/reference/intersectionIncludingPropFromGlobalAugmentation.types @@ -20,7 +20,7 @@ declare const source: Test1; const target: Test2 = { ...source }; >target : Test2 > : ^^^^^ ->{ ...source } : { toString: null | "string"; } +>{ ...source } : { toString: null | 'string'; } > : ^^^^^^^^^^^^ ^^^ >source : Test1 > : ^^^^^ diff --git a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types index cf04be3a3e2b0..cdd879676deb7 100644 --- a/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types +++ b/tests/baselines/reference/intersectionMemberOfUnionNarrowsCorrectly.types @@ -18,7 +18,7 @@ type Ex = T extends U ? T : never; > : ^^^^^^^^ declare let x: Ex ->x : { kind?: "A"; a: string; } +>x : { kind?: 'A'; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >kind : "A" > : ^^^ @@ -26,7 +26,7 @@ declare let x: Ex x.a >x.a : string > : ^^^^^^ ->x : { kind?: "A"; a: string; } +>x : { kind?: 'A'; a: string; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/intersectionTypeNormalization.types b/tests/baselines/reference/intersectionTypeNormalization.types index 6c057bd977a62..bcdb37d4d1b14 100644 --- a/tests/baselines/reference/intersectionTypeNormalization.types +++ b/tests/baselines/reference/intersectionTypeNormalization.types @@ -184,7 +184,7 @@ function getValueAsString(value: IntersectionFail): string { > : ^^ >value.num : number > : ^^^^^^ ->value : { kind: "int"; num: number; } & ToString +>value : { kind: 'int'; num: number; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >num : number > : ^^^^^^ @@ -192,7 +192,7 @@ function getValueAsString(value: IntersectionFail): string { return value.str; >value.str : string > : ^^^^^^ ->value : { kind: "string"; str: string; } & ToString +>value : { kind: 'string'; str: string; } & ToString > : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^ >str : string > : ^^^^^^ diff --git a/tests/baselines/reference/intrinsicTypes.types b/tests/baselines/reference/intrinsicTypes.types index 9d681b643e808..7dbdb77786e6e 100644 --- a/tests/baselines/reference/intrinsicTypes.types +++ b/tests/baselines/reference/intrinsicTypes.types @@ -181,7 +181,7 @@ function foo1(s: string, x: Uppercase, y: Uppe } function foo2(x: Uppercase) { ->foo2 : (x: Uppercase) => void +>foo2 : (x: Uppercase) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : Uppercase > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.types b/tests/baselines/reference/invariantGenericErrorElaboration.types index fb17ecd2d4b44..0689a266a7e37 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.types +++ b/tests/baselines/reference/invariantGenericErrorElaboration.types @@ -57,7 +57,7 @@ interface Constraint> extends Runtype { > : ^ check: (x: A['witness']) => void, ->check : (x: A["witness"]) => void +>check : (x: A['witness']) => void > : ^ ^^ ^^^^^ >x : A["witness"] > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types index 23fd77525e7fd..efd0cf4b2f061 100644 --- a/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types +++ b/tests/baselines/reference/jsDeclarationsUniqueSymbolUsage.types @@ -20,7 +20,7 @@ export const kSymbol = Symbol("my-symbol"); * @param {import('./a').WithSymbol} value */ export function b(value) { ->b : (value: import("./a").WithSymbol) => import("./a").WithSymbol +>b : (value: import('./a').WithSymbol) => import('./a').WithSymbol > : ^ ^^ ^^^^^ >value : import("a").WithSymbol > : ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsFileFunctionOverloads.types b/tests/baselines/reference/jsFileFunctionOverloads.types index 13f9ed2c199f2..adedf2566c232 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads.types +++ b/tests/baselines/reference/jsFileFunctionOverloads.types @@ -21,7 +21,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } +>getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileFunctionOverloads2.types b/tests/baselines/reference/jsFileFunctionOverloads2.types index d6cd0fb445762..0f8729c306b4a 100644 --- a/tests/baselines/reference/jsFileFunctionOverloads2.types +++ b/tests/baselines/reference/jsFileFunctionOverloads2.types @@ -19,7 +19,7 @@ * @returns {string} */ function getTypeName(x) { ->getTypeName : { (x: number): "number"; (x: string): "string"; (x: boolean): "boolean"; } +>getTypeName : { (x: number): 'number'; (x: string): 'string'; (x: boolean): 'boolean'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : unknown > : ^^^^^^^ diff --git a/tests/baselines/reference/jsFileMethodOverloads.types b/tests/baselines/reference/jsFileMethodOverloads.types index 1c01554d242d6..8bc928a7b5563 100644 --- a/tests/baselines/reference/jsFileMethodOverloads.types +++ b/tests/baselines/reference/jsFileMethodOverloads.types @@ -41,7 +41,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): "number"; (this: Example): "string"; } +>getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsFileMethodOverloads2.types b/tests/baselines/reference/jsFileMethodOverloads2.types index cd9cb93ca4337..5d3d6570772b6 100644 --- a/tests/baselines/reference/jsFileMethodOverloads2.types +++ b/tests/baselines/reference/jsFileMethodOverloads2.types @@ -40,7 +40,7 @@ * @returns {string} */ getTypeName() { ->getTypeName : { (this: Example): "number"; (this: Example): "string"; } +>getTypeName : { (this: Example): 'number'; (this: Example): 'string'; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ return typeof this.value; diff --git a/tests/baselines/reference/jsdocBracelessTypeTag1.types b/tests/baselines/reference/jsdocBracelessTypeTag1.types index 3f6737aefaeb4..b60450c5d8ff8 100644 --- a/tests/baselines/reference/jsdocBracelessTypeTag1.types +++ b/tests/baselines/reference/jsdocBracelessTypeTag1.types @@ -35,7 +35,7 @@ function fn3(arg) { /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj1 = { type: "foo", prop: 10 }; ->obj1 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } +>obj1 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "foo", prop: 10 } : { type: "foo"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ const obj1 = { type: "foo", prop: 10 }; /** @type ({ type: 'foo' } | { type: 'bar' }) & { prop: number } */ const obj2 = { type: "other", prop: 10 }; ->obj2 : ({ type: "foo"; } | { type: "bar"; }) & { prop: number; } +>obj2 : ({ type: 'foo'; } | { type: 'bar'; }) & { prop: number; } > : ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ >{ type: "other", prop: 10 } : { type: "other"; prop: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocLiteral.types b/tests/baselines/reference/jsdocLiteral.types index 7ca746bc7dc86..5e24b291692df 100644 --- a/tests/baselines/reference/jsdocLiteral.types +++ b/tests/baselines/reference/jsdocLiteral.types @@ -9,7 +9,7 @@ * @param {12 | true | 'str'} p5 */ function f(p1, p2, p3, p4, p5) { ->f : (p1: "literal", p2: "literal", p3: "literal" | "other", p4: "literal" | number, p5: 12 | true | "str") => string +>f : (p1: 'literal', p2: "literal", p3: 'literal' | 'other', p4: 'literal' | number, p5: 12 | true | 'str') => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^ >p1 : "literal" > : ^^^^^^^^^ diff --git a/tests/baselines/reference/jsdocThisType.types b/tests/baselines/reference/jsdocThisType.types index 8f9c7289935bb..9d045562db582 100644 --- a/tests/baselines/reference/jsdocThisType.types +++ b/tests/baselines/reference/jsdocThisType.types @@ -50,9 +50,9 @@ export function f2() { /** @type {(this: import('./types').Foo) => void} */ export const f3 = function() { ->f3 : (this: import("./types").Foo) => void +>f3 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import("./types").Foo) => void +>function() { this.test();} : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -68,7 +68,7 @@ export const f3 = function() { /** @type {(this: import('./types').Foo) => void} */ export function f4() { ->f4 : (this: import("./types").Foo) => void +>f4 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -84,9 +84,9 @@ export function f4() { /** @type {function(this: import('./types').Foo): void} */ export const f5 = function() { ->f5 : (this: import("./types").Foo) => void +>f5 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ ->function() { this.test();} : (this: import("./types").Foo) => void +>function() { this.test();} : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); @@ -102,7 +102,7 @@ export const f5 = function() { /** @type {function(this: import('./types').Foo): void} */ export function f6() { ->f6 : (this: import("./types").Foo) => void +>f6 : (this: import('./types').Foo) => void > : ^ ^^ ^^^^^ this.test(); diff --git a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types index 95c1f25caba6c..50b4f5283c525 100644 --- a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types +++ b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types @@ -13,7 +13,7 @@ import * as React from "react"; > : ^^^^^^^^^^^^ function SomeComponent(props: { element?: T } & JSX.IntrinsicElements[T]): JSX.Element { ->SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element +>SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >props : { element?: T; } & JSX.IntrinsicElements[T] > : ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ function SomeComponent(props: { element?: T } & JSX.In } function Test(el: T) { ->Test : (el: T) => JSX.Element +>Test : (el: T) => JSX.Element > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^ >el : T > : ^ @@ -41,7 +41,7 @@ function Test(el: T) { return > : JSX.Element > : ^^^^^^^^^^^ ->SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element +>SomeComponent : (props: { element?: T_1; } & JSX.IntrinsicElements[T_1]) => JSX.Element > : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^ >element : T > : ^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 33fafc02e83a9..d1a30f6d0e2e0 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1676,7 +1676,7 @@ function f80(obj: T) { } function f81(obj: T) { ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >a : { x: any; } > : ^^^^^ ^^^ @@ -1709,7 +1709,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: "hello" } }) : string > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: "hello" } } : { a: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1727,7 +1727,7 @@ function f82() { > : ^^^^^^ >f81({ a: { x: 42 } }) : number > : ^^^^^^ ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T['a']['x'] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{ a: { x: 42 } } : { a: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^ @@ -1742,7 +1742,7 @@ function f82() { } function f83(obj: T, key: K) { ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : string > : ^^^^^^ @@ -1777,7 +1777,7 @@ function f84() { > : ^^^^^^ >f83({ foo: { x: "hello" } }, "foo") : string > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ foo: { x: "hello" } } : { foo: { x: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1797,7 +1797,7 @@ function f84() { > : ^^^^^^ >f83({ bar: { x: 42 } }, "bar") : number > : ^^^^^^ ->f83 : (obj: T, key: K) => T[K]["x"] +>f83 : (obj: T, key: K) => T[K]['x'] > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >{ bar: { x: 42 } } : { bar: { x: number; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2662,7 +2662,7 @@ type MethodDescriptor = { } declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; ->dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] +>dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >name : M["name"] > : ^^^^^^^^^ @@ -2691,7 +2691,7 @@ let result = dispatchMethod("someMethod", ["hello", 35]); > : ^^^^^^^^ >dispatchMethod("someMethod", ["hello", 35]) : string[] > : ^^^^^^^^ ->dispatchMethod : (name: M["name"], args: M["args"]) => M["returnValue"] +>dispatchMethod : (name: M['name'], args: M['args']) => M['returnValue'] > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >"someMethod" : "someMethod" > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index 526abef4fd1bf..31ea388d72f05 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -5,7 +5,7 @@ Type Count: 1,000 === keyofAndIndexedAccess2.ts === function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') { ->f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: "a", k1: "a" | "b", k2: "a" | "b" | "c") => void +>f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') => void > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >obj : { a: number; b: 0 | 1; c: string; } > : ^^^^^ ^^^^^ ^^^^^ ^^^ @@ -714,7 +714,7 @@ type B = A<{ [Q in keyof T]: StrictExclude, {}>; }>; // Repros from #30938 function fn} | {elements: Array}>(param: T, cb: (element: T['elements'][number]) => void) { ->fn : ; } | { elements: Array; }>(param: T, cb: (element: T["elements"][number]) => void) => void +>fn : ; } | { elements: Array; }>(param: T, cb: (element: T['elements'][number]) => void) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >elements : string[] > : ^^^^^^^^ @@ -722,7 +722,7 @@ function fn} | {elements: Array}>(par > : ^^^^^^^^ >param : T > : ^ ->cb : (element: T["elements"][number]) => void +>cb : (element: T['elements'][number]) => void > : ^ ^^ ^^^^^ >element : T["elements"][number] > : ^^^^^^^^^^^^^^^^^^^^^ @@ -730,7 +730,7 @@ function fn} | {elements: Array}>(par cb(param.elements[0]); >cb(param.elements[0]) : void > : ^^^^ ->cb : (element: T["elements"][number]) => void +>cb : (element: T['elements'][number]) => void > : ^ ^^ ^^^^^ >param.elements[0] : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).types b/tests/baselines/reference/logicalAssignment2(target=es2015).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).types b/tests/baselines/reference/logicalAssignment2(target=es2020).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).types b/tests/baselines/reference/logicalAssignment2(target=es2021).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2021).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).types b/tests/baselines/reference/logicalAssignment2(target=esnext).types index fc36053a8b0fc..c3e7547ef76c6 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).types @@ -3,11 +3,11 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ baz: 0 | 1 | 42 | undefined | '' @@ -92,21 +92,21 @@ a.foo["baz"] &&= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,21 +116,21 @@ b.foo["baz"] ||= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,21 +140,21 @@ c.foo["baz"] ??= result.foo.baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo["baz"] : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >"baz" : "baz" > : ^^^^^ >result.foo.baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,33 +164,33 @@ a.foo.bar().baz &&= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >a.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>a.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>a.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >a : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,33 +200,33 @@ b.foo.bar().baz ||= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >b.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>b.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>b.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >b : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,33 +236,33 @@ c.foo.bar().baz ??= result.foo.bar().baz > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >c.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>c.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>c.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >c : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >result.foo.bar().baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar() : { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^ ^^^ ->result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>result.foo.bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ ->result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>result.foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ >result : A > : ^ ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | ""; }; baz: 0 | 1 | 42 | undefined | ""; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^^^^ ^^^^^^^ ^^^ ->bar : () => { baz: 0 | 1 | 42 | undefined | ""; } +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } > : ^^^^^^ >baz : "" | 0 | 1 | 42 | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeConstraints.types b/tests/baselines/reference/mappedTypeConstraints.types index b796c17e79844..193ff8aff09ea 100644 --- a/tests/baselines/reference/mappedTypeConstraints.types +++ b/tests/baselines/reference/mappedTypeConstraints.types @@ -2,7 +2,7 @@ === mappedTypeConstraints.ts === function f0(obj: Pick>) { ->f0 : (obj: Pick>) => void +>f0 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -21,7 +21,7 @@ function f0(obj: Pick(obj: Pick>) { ->f1 : (obj: Pick>) => void +>f1 : (obj: Pick>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -102,7 +102,7 @@ function f3(obj: Record | 'c', string>) { ->f4 : (obj: Record | "c", string>) => void +>f4 : (obj: Record | 'c', string>) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/mappedTypeContextualTypesApplied.types b/tests/baselines/reference/mappedTypeContextualTypesApplied.types index 25ddfbb721ece..92f1b2490ed15 100644 --- a/tests/baselines/reference/mappedTypeContextualTypesApplied.types +++ b/tests/baselines/reference/mappedTypeContextualTypesApplied.types @@ -52,13 +52,13 @@ declare function mapped7(obj: {[P in K]: TakeString}): void > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped8(obj: {[P in K]: TakeString}): void; ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ declare function mapped9(obj: {[P in K]: TakeString}): void; ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >obj : { [P in K]: TakeString; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ @@ -178,7 +178,7 @@ mapped7({foo: s => 42}); mapped8({foo: s => 42}); >mapped8({foo: s => 42}) : void > : ^^^^ ->mapped8 : (obj: { [P in K]: TakeString; }) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ @@ -194,7 +194,7 @@ mapped8({foo: s => 42}); mapped9({foo: s => 42}); >mapped9({foo: s => 42}) : void > : ^^^^ ->mapped9 : (obj: { [P in K]: TakeString; }) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >{foo: s => 42} : { foo: (s: string) => number; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types index 4cb47fadcc2de..a1925ac08399e 100644 --- a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types +++ b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types @@ -121,7 +121,7 @@ type TypesMap = { > : ^^^^^^^^ [0]: { foo: 'bar'; }; ->[0] : { foo: "bar"; } +>[0] : { foo: 'bar'; } > : ^^^^^^^ ^^^ >0 : 0 > : ^ @@ -129,7 +129,7 @@ type TypesMap = { > : ^^^^^ [1]: { a: 'b'; }; ->[1] : { a: "b"; } +>[1] : { a: 'b'; } > : ^^^^^ ^^^ >1 : 1 > : ^ @@ -227,7 +227,7 @@ const onSomeEvent = (p: P) => > : ^^^^^^^^^^^^ >p.t : T > : ^ ->p : { t: T; } & ({ foo: "bar"; } | { a: "b"; }) +>p : { t: T; } & ({ foo: 'bar'; } | { a: 'b'; }) > : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^ >t : T > : ^ diff --git a/tests/baselines/reference/mappedTypeProperties.types b/tests/baselines/reference/mappedTypeProperties.types index e9196aa6416e2..63bdec8d79fe9 100644 --- a/tests/baselines/reference/mappedTypeProperties.types +++ b/tests/baselines/reference/mappedTypeProperties.types @@ -49,7 +49,7 @@ type AfterMethod = { [placeType in PlaceType]?: void; model(duration: number): 'hour' | 'day'; ->model : (duration: number) => "hour" | "day" +>model : (duration: number) => 'hour' | 'day' > : ^ ^^ ^^^^^ >duration : number > : ^^^^^^ diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types index bef0bd6187da7..44eded1ac6b56 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -78,19 +78,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -98,7 +98,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -133,19 +133,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -153,7 +153,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ private static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: number); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -203,7 +203,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -267,11 +267,11 @@ var r4 = D.bar(''); // error > : ^^^ >D.bar('') : any > : ^^^ ->D.bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>D.bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >D : typeof D > : ^^^^^^^^ ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: number): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >'' : "" > : ^^ diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types index 9561281325dcf..0f73b797ba104 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types @@ -26,19 +26,19 @@ class C { >y : any public bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -46,7 +46,7 @@ class C { > : ^^^^^^ public bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -72,19 +72,19 @@ class C { >y : any public static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -92,7 +92,7 @@ class C { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -123,19 +123,19 @@ class D { >y : any public bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -143,7 +143,7 @@ class D { > : ^ public bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any @@ -169,19 +169,19 @@ class D { >y : any public static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ public static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -189,7 +189,7 @@ class D { > : ^^^^^^ public static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any >y : any diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types index 47ca9abf3fc24..444d973ecf083 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.types @@ -28,19 +28,19 @@ class C { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -48,7 +48,7 @@ class C { > : ^^^^^^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -100,19 +100,19 @@ class C { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -120,7 +120,7 @@ class C { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -128,19 +128,19 @@ class C { > : ^^^ protected static baz(x: 'hi'); ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static baz(x: string); // error ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ protected static baz(x: number, y: string); ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -148,7 +148,7 @@ class C { > : ^^^^^^ protected static baz(x: any, y?: any) { } ->baz : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>baz : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -183,19 +183,19 @@ class D { > : ^^^ private bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private bar(x: T, y: T); ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -203,7 +203,7 @@ class D { > : ^ private bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -255,19 +255,19 @@ class D { > : ^^^ private static bar(x: 'hi'); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ public static bar(x: string); // error ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ private static bar(x: number, y: string); ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -275,7 +275,7 @@ class D { > : ^^^^^^ private static bar(x: any, y?: any) { } ->bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : any > : ^^^ diff --git a/tests/baselines/reference/moduleExportAssignment7.types b/tests/baselines/reference/moduleExportAssignment7.types index f1a28a864dbed..eaa6e5a839bdd 100644 --- a/tests/baselines/reference/moduleExportAssignment7.types +++ b/tests/baselines/reference/moduleExportAssignment7.types @@ -227,7 +227,7 @@ function jsvalues(a, b, c, d, e, f, g) { === index.ts === function types( ->types : (a: import("./mod").Thing, b: import("./mod").AnotherThing, c: import("./mod").foo, d: import("./mod").qux, e: import("./mod").baz, f: import("./mod").buz, g: import("./mod").literal) => any +>types : (a: import('./mod').Thing, b: import('./mod').AnotherThing, c: import('./mod').foo, d: import('./mod').qux, e: import('./mod').baz, f: import('./mod').buz, g: import('./mod').literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: import('./mod').Thing, @@ -309,7 +309,7 @@ function types( } function values( ->values : (a: typeof import("./mod").Thing, b: typeof import("./mod").AnotherThing, c: typeof import("./mod").foo, d: typeof import("./mod").qux, e: typeof import("./mod").baz, f: typeof import("./mod").buz, g: typeof import("./mod").literal) => any +>values : (a: typeof import('./mod').Thing, b: typeof import('./mod').AnotherThing, c: typeof import('./mod').foo, d: typeof import('./mod').qux, e: typeof import('./mod').baz, f: typeof import('./mod').buz, g: typeof import('./mod').literal) => any > : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^ a: typeof import('./mod').Thing, diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types index c1346f70b6de1..4a6b52c77c403 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.types +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.types @@ -2,7 +2,7 @@ === narrowExceptionVariableInCatchClause.ts === declare function isFooError(x: any): x is { type: 'foo'; dontPanic(); }; ->isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } +>isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >x : any > : ^^^ @@ -25,7 +25,7 @@ function tryCatch() { if (isFooError(err)) { >isFooError(err) : boolean > : ^^^^^^^ ->isFooError : (x: any) => x is { type: "foo"; dontPanic(): any; } +>isFooError : (x: any) => x is { type: 'foo'; dontPanic(): any; } > : ^ ^^ ^^^^^ ^^^ >err : any > : ^^^ @@ -35,7 +35,7 @@ function tryCatch() { > : ^^^ >err.dontPanic : () => any > : ^^^^^^^^^ ->err : { type: "foo"; dontPanic(): any; } +>err : { type: 'foo'; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >dontPanic : () => any > : ^^^^^^^^^ @@ -45,7 +45,7 @@ function tryCatch() { > : ^^^ >err.doPanic : any > : ^^^ ->err : { type: "foo"; dontPanic(): any; } +>err : { type: 'foo'; dontPanic(): any; } > : ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ >doPanic : any > : ^^^ diff --git a/tests/baselines/reference/narrowingByTypeofInSwitch.types b/tests/baselines/reference/narrowingByTypeofInSwitch.types index ef91b62d22aa9..c0ba268379570 100644 --- a/tests/baselines/reference/narrowingByTypeofInSwitch.types +++ b/tests/baselines/reference/narrowingByTypeofInSwitch.types @@ -1358,7 +1358,7 @@ function narrowingNarrows(x: {} | undefined) { } function narrowingNarrows2(x: true | 3 | 'hello' | undefined) { ->narrowingNarrows2 : (x: true | 3 | "hello" | undefined) => void +>narrowingNarrows2 : (x: true | 3 | 'hello' | undefined) => void > : ^ ^^ ^^^^^^^^^ >x : true | 3 | "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/narrowingTypeofDiscriminant.types b/tests/baselines/reference/narrowingTypeofDiscriminant.types index 33e2111a90856..af0319b89cccf 100644 --- a/tests/baselines/reference/narrowingTypeofDiscriminant.types +++ b/tests/baselines/reference/narrowingTypeofDiscriminant.types @@ -2,9 +2,9 @@ === narrowingTypeofDiscriminant.ts === function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { ->f1 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; }) => void +>f1 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; }) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" > : ^^^ @@ -22,7 +22,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj.kind : "a" | 1 > : ^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ >kind : "a" | 1 > : ^^^^^^^ @@ -30,7 +30,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: "a"; data: string; } +>obj : { kind: 'a'; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { @@ -41,9 +41,9 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { } function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undefined) { ->f2 : (obj: { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined) => void +>f2 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined) => void > : ^ ^^ ^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" > : ^^^ @@ -61,7 +61,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >obj?.kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ ->obj : { kind: "a"; data: string; } | { kind: 1; data: number; } | undefined +>obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined > : ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ >kind : "a" | 1 | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undef > : ^^^^^^^^ obj; // { kind: 'a', data: string } ->obj : { kind: "a"; data: string; } +>obj : { kind: 'a'; data: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ } else { diff --git a/tests/baselines/reference/narrowingUnionToUnion.types b/tests/baselines/reference/narrowingUnionToUnion.types index f090c9357be17..e464b2a081c01 100644 --- a/tests/baselines/reference/narrowingUnionToUnion.types +++ b/tests/baselines/reference/narrowingUnionToUnion.types @@ -271,13 +271,13 @@ v2; // 6 | undefined // #39105 declare function isEmptyString(value: string): value is ''; ->isEmptyString : (value: string) => value is "" +>isEmptyString : (value: string) => value is '' > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ declare function isMaybeEmptyString(value: string | null | undefined): value is '' | null | undefined; ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string | null | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -321,7 +321,7 @@ const TEST_CASES = [ if (isEmptyString(value)) { >isEmptyString(value) : boolean > : ^^^^^^^ ->isEmptyString : (value: string) => value is "" +>isEmptyString : (value: string) => value is '' > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -338,7 +338,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string > : ^^^^^^ @@ -362,7 +362,7 @@ const TEST_CASES = [ if (isMaybeEmptyString(value)) { >isMaybeEmptyString(value) : boolean > : ^^^^^^^ ->isMaybeEmptyString : (value: string | null | undefined) => value is "" | null | undefined +>isMaybeEmptyString : (value: string | null | undefined) => value is '' | null | undefined > : ^ ^^ ^^^^^ >value : string | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -795,7 +795,7 @@ isMyDiscriminatedUnion(working) && working.type === 'A' && working.aProp; > : ^^^ >working.aProp : number > : ^^^^^^ ->working : { type: "A"; aProp: number; } +>working : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -823,7 +823,7 @@ isMyDiscriminatedUnion(broken) && broken.type === 'A' && broken.aProp; > : ^^^ >broken.aProp : number > : ^^^^^^ ->broken : { type: "A"; aProp: number; } +>broken : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -851,7 +851,7 @@ isMyDiscriminatedUnion(workingAgain) && workingAgain.type === 'A' && workingAgai > : ^^^ >workingAgain.aProp : number > : ^^^^^^ ->workingAgain : { type: "A"; aProp: number; } +>workingAgain : { type: 'A'; aProp: number; } > : ^^^^^^^^ ^^^^^^^^^ ^^^ >aProp : number > : ^^^^^^ @@ -879,7 +879,7 @@ type Union = > : ^^^ function example1(value: Union): { type: 'a'; variant: 2 } | null { ->example1 : (value: Union) => { type: "a"; variant: 2; } | null +>example1 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -907,7 +907,7 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -917,12 +917,12 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example2(value: Union): { type: 'a'; variant: 2 } | null { ->example2 : (value: Union) => { type: "a"; variant: 2; } | null +>example2 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -952,7 +952,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -962,7 +962,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -972,12 +972,12 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } function example3(value: Union): { type: 'a'; variant: 2 } | null { ->example3 : (value: Union) => { type: "a"; variant: 2; } | null +>example3 : (value: Union) => { type: 'a'; variant: 2; } | null > : ^ ^^ ^^^^^ >value : Union > : ^^^^^ @@ -1005,7 +1005,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.type : "a" > : ^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >type : "a" > : ^^^ @@ -1013,7 +1013,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { > : ^^^^^^^ >value.variant : 1 | 2 > : ^^^^^ ->value : { type: "a"; variant: 1; } | { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 1; } | { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ >variant : 1 | 2 > : ^^^^^ @@ -1023,7 +1023,7 @@ function example3(value: Union): { type: 'a'; variant: 2 } | null { return null; } return value; ->value : { type: "a"; variant: 2; } +>value : { type: 'a'; variant: 2; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/narrowingUnionWithBang.types b/tests/baselines/reference/narrowingUnionWithBang.types index 6b751d5a69d06..8bc7e3fef0307 100644 --- a/tests/baselines/reference/narrowingUnionWithBang.types +++ b/tests/baselines/reference/narrowingUnionWithBang.types @@ -6,7 +6,7 @@ type WorkingType = { > : ^^^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -83,13 +83,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^^^^ >working.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } +>working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Error9" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -107,13 +107,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.message : string > : ^^^^^^ ->working.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } +>working.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->working.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined +>working.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Error9"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Error9'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -130,13 +130,13 @@ if (working.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >working.thing!.id : string > : ^^^^^^ ->working.thing! : { name: "Correct"; id: string; } +>working.thing! : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->working.thing : { name: "Correct"; id: string; } +>working.thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >working : WorkingType > : ^^^^^^^^^^^ ->thing : { name: "Correct"; id: string; } +>thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ @@ -147,7 +147,7 @@ type BorkedType = { > : ^^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -218,13 +218,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^^^^ >borked.thing!.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } +>borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -242,13 +242,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.message : string > : ^^^^^^ ->borked.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } +>borked.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->borked.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>borked.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -265,13 +265,13 @@ if (borked.thing!.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >borked.thing!.id : string > : ^^^^^^ ->borked.thing! : { name: "Correct"; id: string; } +>borked.thing! : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ ->borked.thing : { name: "Correct"; id: string; } | undefined +>borked.thing : { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >borked : BorkedType > : ^^^^^^^^^^ ->thing : { name: "Correct"; id: string; } | undefined +>thing : { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >id : string > : ^^^^^^ @@ -282,7 +282,7 @@ export type FixedType = { > : ^^^^^^^^^ thing?: ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ { name: 'Error1', message: string } | @@ -353,11 +353,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^^^^ >fixed.thing?.name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | { name: "Correct"; id: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | { name: 'Correct'; id: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ >name : "Error1" | "Error2" | "Error3" | "Error4" | "Error5" | "Error6" | "Error7" | "Error8" | "Correct" | undefined > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -375,13 +375,13 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing!.message : string > : ^^^^^^ ->fixed.thing! : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } +>fixed.thing! : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^ ->fixed.thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>fixed.thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Error1"; message: string; } | { name: "Error2"; message: string; } | { name: "Error3"; message: string; } | { name: "Error4"; message: string; } | { name: "Error5"; message: string; } | { name: "Error6"; message: string; } | { name: "Error7"; message: string; } | { name: "Error8"; message: string; } | undefined +>thing : { name: 'Error1'; message: string; } | { name: 'Error2'; message: string; } | { name: 'Error3'; message: string; } | { name: 'Error4'; message: string; } | { name: 'Error5'; message: string; } | { name: 'Error6'; message: string; } | { name: 'Error7'; message: string; } | { name: 'Error8'; message: string; } | undefined > : ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >message : string > : ^^^^^^ @@ -398,11 +398,11 @@ if (fixed.thing?.name !== "Correct") { > : ^^^^ ^^ ^^^^^ >fixed.thing.id : string > : ^^^^^^ ->fixed.thing : { name: "Correct"; id: string; } +>fixed.thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >fixed : FixedType > : ^^^^^^^^^ ->thing : { name: "Correct"; id: string; } +>thing : { name: 'Correct'; id: string; } > : ^^^^^^^^ ^^^^^^ ^^^ >id : string > : ^^^^^^ diff --git a/tests/baselines/reference/nestedExcessPropertyChecking.types b/tests/baselines/reference/nestedExcessPropertyChecking.types index 556fe677a74f0..1952900200ae7 100644 --- a/tests/baselines/reference/nestedExcessPropertyChecking.types +++ b/tests/baselines/reference/nestedExcessPropertyChecking.types @@ -169,7 +169,7 @@ type T1 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number, dark: number } }, ->primary : { __typename?: "Feature"; } & { colors: { light: number; dark: number; }; } +>primary : { __typename?: 'Feature'; } & { colors: { light: number; dark: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ @@ -187,7 +187,7 @@ type T2 = { > : ^^ primary: { __typename?: 'Feature' } & { colors: { light: number } }, ->primary : { __typename?: "Feature"; } & { colors: { light: number; }; } +>primary : { __typename?: 'Feature'; } & { colors: { light: number; }; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^ >__typename : "Feature" | undefined > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types index 57e268fa0127d..1b13ffd8c044e 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: "a"; a: number; } +>foo : { kind: 'a'; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: "a"; a: number; } +>foo : { kind?: 'a'; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types index a951c8c7bca02..761530abbcaf7 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types @@ -34,7 +34,7 @@ function f1(foo: Foo1) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind: "a"; a: number; } +>foo : { kind: 'a'; a: number; } > : ^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ @@ -74,7 +74,7 @@ function f2(foo: Foo2) { foo.a; >foo.a : number > : ^^^^^^ ->foo : { kind?: "a"; a: number; } +>foo : { kind?: 'a'; a: number; } > : ^^^^^^^^^ ^^^^^ ^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types index 8047f6e8859d5..9806bfb995775 100644 --- a/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types +++ b/tests/baselines/reference/objectLiteralComputedNameNoDeclarationError.types @@ -2,9 +2,9 @@ === objectLiteralComputedNameNoDeclarationError.ts === const Foo = { ->Foo : { BANANA: "banana"; } +>Foo : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ ->{ BANANA: 'banana' as 'banana',} : { BANANA: "banana"; } +>{ BANANA: 'banana' as 'banana',} : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ BANANA: 'banana' as 'banana', @@ -27,7 +27,7 @@ export const Baa = { > : ^^^^^^ >Foo.BANANA : "banana" > : ^^^^^^^^ ->Foo : { BANANA: "banana"; } +>Foo : { BANANA: 'banana'; } > : ^^^^^^^^^^ ^^^ >BANANA : "banana" > : ^^^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types index dc28aaafe6b2d..01c5b4f4faef5 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types @@ -2,11 +2,11 @@ === overloadOnConstAsTypeAnnotation.ts === var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; ->f : (x: "hi") => number +>f : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.types b/tests/baselines/reference/overloadOnConstConstraintChecks1.types index 0435f9c5aa294..af32e16667a4c 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface MyDoc { // Document createElement(tagName: string): Base; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -64,31 +64,31 @@ class D implements MyDoc { > : ^ createElement(tagName:string): Base; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName:any): Base { ->createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.types b/tests/baselines/reference/overloadOnConstConstraintChecks2.types index fa858c33ac07f..e8464759afddf 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.types @@ -22,25 +22,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.types b/tests/baselines/reference/overloadOnConstConstraintChecks3.types index 2f11866bac12f..bd173b4b4a2e9 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.types @@ -26,25 +26,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): A { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.types b/tests/baselines/reference/overloadOnConstConstraintChecks4.types index e952a8b82a8a9..b029c72756175 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.types @@ -32,25 +32,25 @@ class C extends A { > : ^^^^^^^^^^ } function foo(name: 'hi'): B; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "hi" > : ^^^^ function foo(name: 'bye'): C; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : "bye" > : ^^^^^ function foo(name: string): A; ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : string > : ^^^^^^ function foo(name: any): Z { ->foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >name : any diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types index d259f9dd7d8eb..b23ef6b4d356b 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types @@ -2,7 +2,7 @@ === overloadOnConstDuplicateOverloads1.ts === function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,14 +18,14 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: any, x: any) { ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any } function foo2(a: 'hi', x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -33,7 +33,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: 'hi', x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -41,7 +41,7 @@ function foo2(a: 'hi', x: string); > : ^^^^^^ function foo2(a: string, x: string); ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : string > : ^^^^^^ @@ -49,7 +49,7 @@ function foo2(a: string, x: string); > : ^^^^^^ function foo2(a: any, x: any) { ->foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>foo2 : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; (a: string, x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : any >x : any diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types index e7c08aae5eda2..a73cd8ead960a 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types @@ -3,11 +3,11 @@ === overloadOnConstInBaseWithBadImplementationInDerived.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,11 +18,11 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number) { // error ->x1 : (a: number, callback: (x: "hi") => number) => void +>x1 : (a: number, callback: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInCallback1.types b/tests/baselines/reference/overloadOnConstInCallback1.types index d6fbf6618b16d..f6bc02f9e0a99 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.types +++ b/tests/baselines/reference/overloadOnConstInCallback1.types @@ -6,17 +6,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); // error ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types index fd6ec9be0733e..623a66d6bc8e4 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types @@ -3,11 +3,11 @@ === overloadOnConstInObjectLiteralImplementingAnInterface.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -16,15 +16,15 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error >i2 : I > : ^ ->{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: "hi") => number) => void; } +>{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: 'hi') => number) => void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^ ->x1 : (a: number, cb: (x: "hi") => number) => void +>x1 : (a: number, cb: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: "hi") => number) => void +>(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: 'hi') => number) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance1.types b/tests/baselines/reference/overloadOnConstInheritance1.types index 3e80860905016..407a32a6f4180 100644 --- a/tests/baselines/reference/overloadOnConstInheritance1.types +++ b/tests/baselines/reference/overloadOnConstInheritance1.types @@ -3,26 +3,26 @@ === overloadOnConstInheritance1.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "bar"): string; } +>addEventListener : { (x: string): any; (x: 'bar'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'bar'): string; ->addEventListener : { (x: string): any; (x: "bar"): string; } +>addEventListener : { (x: string): any; (x: 'bar'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance2.types b/tests/baselines/reference/overloadOnConstInheritance2.types index 844822f06ef40..8ddb696cfeee8 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.types +++ b/tests/baselines/reference/overloadOnConstInheritance2.types @@ -3,20 +3,20 @@ === overloadOnConstInheritance2.ts === interface Base { addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: "foo"): string; } +>addEventListener : { (x: string): any; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ } interface Deriver extends Base { addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ->addEventListener : (x: "bar") => string +>addEventListener : (x: 'bar') => string > : ^ ^^ ^^^^^ >x : "bar" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance3.types b/tests/baselines/reference/overloadOnConstInheritance3.types index 3ea531168275a..2d748590e5939 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.types +++ b/tests/baselines/reference/overloadOnConstInheritance3.types @@ -11,13 +11,13 @@ interface Base { interface Deriver extends Base { // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ->addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bar" > : ^^^^^ addEventListener(x: 'foo'): string; ->addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>addEventListener : { (x: 'bar'): string; (x: 'foo'): string; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "foo" > : ^^^^^ diff --git a/tests/baselines/reference/overloadOnConstInheritance4.types b/tests/baselines/reference/overloadOnConstInheritance4.types index f02d2e8a8f6a8..5ae4d5963d2b2 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.types +++ b/tests/baselines/reference/overloadOnConstInheritance4.types @@ -3,11 +3,11 @@ === overloadOnConstInheritance4.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -17,21 +17,21 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: 'hi') => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types index dfdb13723b2b8..f802972283fb7 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoAnyImplementation.ts === function x1(a: number, cb: (x: 'hi') => number); ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x1(a: number, cb: (x: 'bye') => number); ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "bye") => number +>cb : (x: 'bye') => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x1(a: number, cb: (x: string) => number) { ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -93,7 +93,7 @@ var cb: (number) => number = (x: number) => 1; x1(1, cb); >x1(1, cb) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -103,11 +103,11 @@ x1(1, cb); x1(1, (x: 'hi') => 1); // error >x1(1, (x: 'hi') => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: "hi") => number +>(x: 'hi') => 1 : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -117,7 +117,7 @@ x1(1, (x: 'hi') => 1); // error x1(1, (x: string) => 1); >x1(1, (x: string) => 1) : any > : ^^^ ->x1 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x1 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types index f0950110a396e..99b827bfa5ae9 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoAnyImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: string) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: "bye") => number +>(x: 'bye') => { return 1; } : (x: 'bye') => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x) => { return 1; } ); >c.x1(1, (x) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types index 30b541a53b46f..482141bac98d2 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types @@ -6,13 +6,13 @@ class C { > : ^ x1(a: 'hi'); // error, no non-specialized signature in overload list ->x1 : (a: "hi") => any +>x1 : (a: 'hi') => any > : ^ ^^ ^^^^^^^^ >a : "hi" > : ^^^^ x1(a: string) { } ->x1 : (a: "hi") => any +>x1 : (a: 'hi') => any > : ^ ^^ ^^^^^^^^ >a : string > : ^^^^^^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.types b/tests/baselines/reference/overloadOnConstNoStringImplementation.types index b377838889555..aacbb53a4d534 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.types @@ -2,27 +2,27 @@ === overloadOnConstNoStringImplementation.ts === function x2(a: number, cb: (x: 'hi') => number); ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "hi") => number +>cb : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ function x2(a: number, cb: (x: 'bye') => number); ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ ->cb : (x: "bye") => number +>cb : (x: 'bye') => number > : ^ ^^ ^^^^^ >x : "bye" > : ^^^^^ function x2(a: number, cb: (x: any) => number) { ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : number > : ^^^^^^ @@ -90,7 +90,7 @@ var cb: (number) => number = (x: number) => 1; x2(1, cb); // error >x2(1, cb) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ @@ -99,11 +99,11 @@ x2(1, cb); // error x2(1, (x: 'hi') => 1); // error >x2(1, (x: 'hi') => 1) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => 1 : (x: "hi") => number +>(x: 'hi') => 1 : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -112,7 +112,7 @@ x2(1, (x: 'hi') => 1); // error x2(1, (x: string) => 1); >x2(1, (x: string) => 1) : any ->x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>x2 : { (a: number, cb: (x: 'hi') => number): any; (a: number, cb: (x: 'bye') => number): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types index c8994bf9cab05..c0c3a229b3b8b 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types @@ -3,11 +3,11 @@ === overloadOnConstNoStringImplementation2.ts === interface I { x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ @@ -18,17 +18,17 @@ class C implements I { > : ^ x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ ->callback : (x: "hi") => number +>callback : (x: 'hi') => number > : ^ ^^ ^^^^^ >x : "hi" > : ^^^^ x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >a : number > : ^^^^^^ @@ -84,15 +84,15 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); >c.x1(1, (x: 'hi') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'hi') => { return 1; } : (x: "hi") => number +>(x: 'hi') => { return 1; } : (x: 'hi') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hi" > : ^^^^ @@ -102,15 +102,15 @@ c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); >c.x1(1, (x: 'bye') => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ ->(x: 'bye') => { return 1; } : (x: "bye") => number +>(x: 'bye') => { return 1; } : (x: 'bye') => number > : ^ ^^ ^^^^^^^^^^^ >x : "bye" > : ^^^^^ @@ -120,11 +120,11 @@ c.x1(1, (x: 'bye') => { return 1; } ); c.x1(1, (x: string) => { return 1; } ); >c.x1(1, (x: string) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ @@ -138,11 +138,11 @@ c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); >c.x1(1, (x: number) => { return 1; } ) : any > : ^^^ ->c.x1 : (a: number, callback: (x: "hi") => number) => any +>c.x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >c : C > : ^ ->x1 : (a: number, callback: (x: "hi") => number) => any +>x1 : (a: number, callback: (x: 'hi') => number) => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >1 : 1 > : ^ diff --git a/tests/baselines/reference/overloadingOnConstants1.types b/tests/baselines/reference/overloadingOnConstants1.types index d5eaa38fcc370..612f46aca3313 100644 --- a/tests/baselines/reference/overloadingOnConstants1.types +++ b/tests/baselines/reference/overloadingOnConstants1.types @@ -33,25 +33,25 @@ class Derived3 extends Base { biz() { } } interface Document2 { createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ createElement(tagName: string): Base; ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ @@ -67,11 +67,11 @@ var htmlElement: Base = d2.createElement("yo") > : ^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -81,11 +81,11 @@ var htmlCanvasElement: Derived1 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -95,11 +95,11 @@ var htmlDivElement: Derived2 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -109,11 +109,11 @@ var htmlSpanElement: Derived3 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ @@ -124,11 +124,11 @@ var htmlElement2: Derived1 = d2.createElement("yo") > : ^^^^^^^^ >d2.createElement("yo") : Base > : ^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"yo" : "yo" > : ^^^^ @@ -138,11 +138,11 @@ var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); > : ^^^^^^^^ >d2.createElement("canvas") : Derived1 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"canvas" : "canvas" > : ^^^^^^^^ @@ -152,11 +152,11 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); > : ^^^^^^^^ >d2.createElement("div") : Derived2 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"div" : "div" > : ^^^^^ @@ -166,11 +166,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); > : ^^^^^^^^ >d2.createElement("span") : Derived3 > : ^^^^^^^^ ->d2.createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>d2.createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >d2 : Document2 > : ^^^^^^^^^ ->createElement : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>createElement : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >"span" : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.types b/tests/baselines/reference/overloadingOnConstantsInImplementation.types index 2eb49001e50ca..3fdc703d97080 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.types +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.types @@ -2,7 +2,7 @@ === overloadingOnConstantsInImplementation.ts === function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -10,7 +10,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: string); ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ @@ -18,7 +18,7 @@ function foo(a: 'hi', x: string); > : ^^^^^^ function foo(a: 'hi', x: any) { ->foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>foo : { (a: 'hi', x: string): any; (a: 'hi', x: string): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >a : "hi" > : ^^^^ diff --git a/tests/baselines/reference/override2.types b/tests/baselines/reference/override2.types index f2a2b4edf5337..b8e7ee2044a72 100644 --- a/tests/baselines/reference/override2.types +++ b/tests/baselines/reference/override2.types @@ -39,7 +39,7 @@ abstract class AD2 extends AB { > : ^^ abstract foo(v: ''): void // need override? ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -52,7 +52,7 @@ abstract class AD3 extends AB { > : ^^ override foo(v: ''): void { } // need override? ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ @@ -73,13 +73,13 @@ class D4 extends AB { > : ^^ override foo(v: ''): void {} ->foo : (v: "") => void +>foo : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ override bar(v: ''): void {} ->bar : (v: "") => void +>bar : (v: '') => void > : ^ ^^ ^^^^^ >v : "" > : ^^ diff --git a/tests/baselines/reference/parserOverloadOnConstants1.types b/tests/baselines/reference/parserOverloadOnConstants1.types index 72d6b1b2091bd..54418697b92be 100644 --- a/tests/baselines/reference/parserOverloadOnConstants1.types +++ b/tests/baselines/reference/parserOverloadOnConstants1.types @@ -3,25 +3,25 @@ === parserOverloadOnConstants1.ts === interface Document { createElement(tagName: string): HTMLElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : string > : ^^^^^^ createElement(tagName: 'canvas'): HTMLCanvasElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "canvas" > : ^^^^^^^^ createElement(tagName: 'div'): HTMLDivElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "div" > : ^^^^^ createElement(tagName: 'span'): HTMLSpanElement; ->createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: "canvas"): HTMLCanvasElement; (tagName: "div"): HTMLDivElement; (tagName: "span"): HTMLSpanElement; } +>createElement : { (tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]; (tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]; (tagName: string, options?: ElementCreationOptions): HTMLElement; (tagName: string): HTMLElement; (tagName: 'canvas'): HTMLCanvasElement; (tagName: 'div'): HTMLDivElement; (tagName: 'span'): HTMLSpanElement; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >tagName : "span" > : ^^^^^^ diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.types b/tests/baselines/reference/primtiveTypesAreIdentical.types index f91168e1076aa..cf93aa6e470c2 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.types +++ b/tests/baselines/reference/primtiveTypesAreIdentical.types @@ -70,25 +70,25 @@ function foo4(x: any) { } >x : any function foo5(x: 'a'); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: 'a'); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo5(x: string); ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo5(x: any) { } ->foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/propertyAccess.errors.txt b/tests/baselines/reference/propertyAccess.errors.txt index 344a5571d72ae..5032405b97e1f 100644 --- a/tests/baselines/reference/propertyAccess.errors.txt +++ b/tests/baselines/reference/propertyAccess.errors.txt @@ -1,5 +1,5 @@ propertyAccess.ts(11,55): error TS2353: Object literal may only specify known properties, and ''three'' does not exist in type '{ [n: number]: string; }'. -propertyAccess.ts(45,14): error TS2339: Property 'qqq' does not exist on type '{ 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; 'literal property': number; }'. +propertyAccess.ts(45,14): error TS2339: Property 'qqq' does not exist on type '{ 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; "literal property": number; }'. propertyAccess.ts(80,19): error TS2538: Type '{ name: string; }' cannot be used as an index type. propertyAccess.ts(117,18): error TS2538: Type '{ name: string; }' cannot be used as an index type. propertyAccess.ts(140,22): error TS2538: Type '{ name: string; }' cannot be used as an index type. @@ -55,7 +55,7 @@ propertyAccess.ts(149,5): error TS2403: Subsequent variable declarations must ha // Dotted property access of property that doesn't exist on value's apparent type var cc = obj.qqq; // error ~~~ -!!! error TS2339: Property 'qqq' does not exist on type '{ 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; 'literal property': number; }'. +!!! error TS2339: Property 'qqq' does not exist on type '{ 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; "literal property": number; }'. // Bracket notation property access using string literal value on type with property of that literal name var dd = obj['literal property']; diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.types b/tests/baselines/reference/ramdaToolsNoInfinite2.types index e4734af9f8f8c..ad503a024bd31 100644 --- a/tests/baselines/reference/ramdaToolsNoInfinite2.types +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.types @@ -562,7 +562,7 @@ declare module "Number/_Internal" { > : ^^^^^^^ 'string': { ->'string' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'string' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; @@ -583,7 +583,7 @@ declare module "Number/_Internal" { }; 'number': { ->'number' : { all: Format; '+': Format; '-': Format; '0': Format; } +>'number' : { all: Format; '+': Format; '-': Format; '0': Format; } > : ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ 'all': Format; diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index f09267bc93ba3..e669804e7a715 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -547,7 +547,7 @@ type Enumerate = number extends N : never; function foo2(value: T): Enumerate { ->foo2 : (value: T) => Enumerate +>foo2 : (value: T) => Enumerate > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >value : T > : ^ diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.types b/tests/baselines/reference/specializedOverloadWithRestParameters.types index a4ee8a63e0ca4..ee70c4e919684 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.types +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.types @@ -16,7 +16,7 @@ class Derived1 extends Base { bar() { } } > : ^^^^^^^^^^ function f(tagName: 'span', ...args): Derived1; // error ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ @@ -24,7 +24,7 @@ function f(tagName: 'span', ...args): Derived1; // error > : ^^^^^ function f(tagName: number, ...args): Base; ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ @@ -32,28 +32,28 @@ function f(tagName: number, ...args): Base; > : ^^^^^ function f(tagName: any): Base { ->f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>f : { (tagName: 'span', ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^ ^^^ >tagName : any return null; } function g(tagName: 'span', arg): Derived1; // error ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : "span" > : ^^^^^^ >arg : any function g(tagName: number, arg): Base; ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : number > : ^^^^^^ >arg : any function g(tagName: any): Base { ->g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>g : { (tagName: 'span', arg: any): Derived1; (tagName: number, arg: any): Base; } > : ^^^ ^^ ^^ ^^^^^^^^ ^^^ ^^ ^^ ^^^^^^^^ ^^^ >tagName : any diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types index 4db6bb86a7213..a91828852cf55 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.types @@ -61,7 +61,7 @@ x3(1, (x: 'hm') => 1); > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >1 : 1 > : ^ ->(x: 'hm') => 1 : (x: "hm") => number +>(x: 'hm') => 1 : (x: 'hm') => number > : ^ ^^ ^^^^^^^^^^^ >x : "hm" > : ^^^^ diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types index d92de312d36f7..f97ef6b8a4054 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types @@ -2,13 +2,13 @@ === specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts === function foo(x: 'a'); ->foo : (x: "a") => any +>foo : (x: 'a') => any > : ^ ^^ ^^^^^^^^ >x : "a" > : ^^^ function foo(x: number) { } ->foo : (x: "a") => any +>foo : (x: 'a') => any > : ^ ^^ ^^^^^^^^ >x : number > : ^^^^^^ @@ -18,19 +18,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ foo(x: any) { } ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -41,19 +41,19 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -64,19 +64,19 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any > : ^^^ @@ -92,13 +92,13 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -114,13 +114,13 @@ interface I2 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -136,20 +136,20 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: "a"): any; (x: number): any; foo(x: "a"): any; foo(x: number): any; } +>a : { (x: 'a'): any; (x: number): any; foo(x: 'a'): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -161,20 +161,20 @@ var a: { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: "a"): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } +>a2 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -186,20 +186,20 @@ var a2: { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: "a"): any; (x: T): any; foo(x: "a"): any; foo(x: T): any; } +>a3 : { (x: 'a'): any; (x: T): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -211,13 +211,13 @@ var a3: { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: "a"): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index 98480b9816223..811fe6a98a2df 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -5,19 +5,19 @@ // All the below should not be errors function foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function foo(x: string); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -26,19 +26,19 @@ class C { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; } +>foo : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -48,25 +48,25 @@ class C2 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -76,25 +76,25 @@ class C3 { > : ^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ foo(x: any) { } ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } @@ -113,19 +113,19 @@ interface I { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: number); ->foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ @@ -145,19 +145,19 @@ interface I2 { > : ^^^^^^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ @@ -177,26 +177,26 @@ interface I3 { > : ^ foo(x: 'a'); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: string); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: T); ->foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>foo : { (x: 'a'): any; (x: string): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a: { ->a : { (x: string): any; (x: "a"): any; (x: number): any; foo(x: string): any; foo(x: "a"): any; foo(x: number): any; } +>a : { (x: string): any; (x: 'a'): any; (x: number): any; foo(x: string): any; foo(x: 'a'): any; foo(x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: string); @@ -212,26 +212,26 @@ var a: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: number); ->foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ } var a2: { ->a2 : { (x: "a"): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } +>a2 : { (x: 'a'): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -247,26 +247,26 @@ var a2: { > : ^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ } var a3: { ->a3 : { (x: "a"): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } +>a3 : { (x: 'a'): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ (x: 'a'); @@ -282,19 +282,19 @@ var a3: { > : ^^^^^^ foo(x: string); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ foo(x: 'a'); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ foo(x: T); ->foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>foo : { (x: string): any; (x: 'a'): any; (x: T): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ diff --git a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types index 500f68537fdb4..ed49beceb1831 100644 --- a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types +++ b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.types @@ -22,7 +22,7 @@ call(function* (a: 'a') { }); // error, 2nd argument required > : ^^^ >call : any>(fn: Fn, ...args: Parameters) => any > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^ ->function* (a: 'a') { } : (a: "a") => {} +>function* (a: 'a') { } : (a: 'a') => {} > : ^ ^^ ^^^^^^^ >a : "a" > : ^^^ diff --git a/tests/baselines/reference/spreadsAndContextualTupleTypes.types b/tests/baselines/reference/spreadsAndContextualTupleTypes.types index a7e2d9aec9a77..a9b82f240dbad 100644 --- a/tests/baselines/reference/spreadsAndContextualTupleTypes.types +++ b/tests/baselines/reference/spreadsAndContextualTupleTypes.types @@ -2,13 +2,13 @@ === spreadsAndContextualTupleTypes.ts === declare function fx1(x: T): T; ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ declare function fx2(x: T): T; ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ @@ -30,7 +30,7 @@ const t3 = ['x', 'y', 'z'] as const; fx1(['x', 'y', 'z', 'a']); >fx1(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ fx1(['x', 'y', 'z', 'a']); fx1([...t3, 'a']); >fx1([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx1 : (x: T) => T +>fx1 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ fx1([...t3, 'a']); fx2(['x', 'y', 'z', 'a']); >fx2(['x', 'y', 'z', 'a']) : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >['x', 'y', 'z', 'a'] : [string, string, string, "a"] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ fx2(['x', 'y', 'z', 'a']); fx2([...t3, 'a']); >fx2([...t3, 'a']) : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ ->fx2 : (x: T) => T +>fx2 : (x: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >[...t3, 'a'] : ["x", "y", "z", "a"] > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/spuriousCircularityOnTypeImport.types b/tests/baselines/reference/spuriousCircularityOnTypeImport.types index 8816b1f1904ab..375666708ce4e 100644 --- a/tests/baselines/reference/spuriousCircularityOnTypeImport.types +++ b/tests/baselines/reference/spuriousCircularityOnTypeImport.types @@ -21,11 +21,11 @@ export type SelectorMap unkno }; export declare const value2: { ->value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } +>value2 : { sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; }; } > : ^^^^^^^^^^^^^^^^^^ ^^^ sliceSelectors: >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters }; ->sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } +>sliceSelectors : >(selectorsBySlice: FuncMap) => { [P in keyof FuncMap]: Parameters; } > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >selectorsBySlice : FuncMap > : ^^^^^^^ diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index c6182b8e834c1..fb51e3e2459f4 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -660,13 +660,13 @@ declare function doesValueAtDeepPathSatisfy< type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; >Foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ >a : number | undefined > : ^^^^^^^^^^^^^^^^^^ ->value : { type: "B"; } +>value : { type: 'B'; } > : ^^^^^^^^ ^^^ >type : "B" > : ^^^ @@ -674,13 +674,13 @@ type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; > : ^^^^^^^^^^^^^^^^^^ declare function isA(arg: unknown): arg is 'A'; ->isA : (arg: unknown) => arg is "A" +>isA : (arg: unknown) => arg is 'A' > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ declare function isB(arg: unknown): arg is 'B'; ->isB : (arg: unknown) => arg is "B" +>isB : (arg: unknown) => arg is 'B' > : ^ ^^ ^^^^^ >arg : unknown > : ^^^^^^^ @@ -692,11 +692,11 @@ declare function assert(condition: boolean): asserts condition; > : ^^^^^^^ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { ->test1 : (foo: Foo) => { value: { type: "A"; }; a?: number; } +>test1 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -720,20 +720,20 @@ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isA : (arg: unknown) => arg is "A" +>isA : (arg: unknown) => arg is 'A' > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: "A"; }; a?: number; } +>foo : { value: { type: 'A'; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } function test2(foo: Foo): {value: {type: 'A'}; a?: number} { ->test2 : (foo: Foo) => { value: { type: "A"; }; a?: number; } +>test2 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } > : ^ ^^ ^^^^^ >foo : Foo > : ^^^ ->value : { type: "A"; } +>value : { type: 'A'; } > : ^^^^^^^^ ^^^ >type : "A" > : ^^^ @@ -759,11 +759,11 @@ function test2(foo: Foo): {value: {type: 'A'}; a?: number} { > : ^^^^^^^ >'type' : "type" > : ^^^^^^ ->isB : (arg: unknown) => arg is "B" +>isB : (arg: unknown) => arg is 'B' > : ^ ^^ ^^^^^ return foo; ->foo : { value: { type: "A"; }; a?: number; } +>foo : { value: { type: 'A'; }; a?: number; } > : ^^^^^^^^^ ^^^^^^ ^^^ } diff --git a/tests/baselines/reference/stringLiteralType.types b/tests/baselines/reference/stringLiteralType.types index 6d11b3fc86748..4f43fe8babce8 100644 --- a/tests/baselines/reference/stringLiteralType.types +++ b/tests/baselines/reference/stringLiteralType.types @@ -6,19 +6,19 @@ var x: 'hi'; > : ^^^^ function f(x: 'hi'); ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ function f(x: string); ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f(x: any) { ->f : { (x: "hi"): any; (x: string): any; } +>f : { (x: 'hi'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types index 1e85210806b21..cdc5dafc4972b 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types @@ -5,157 +5,157 @@ // ok function f1(x: 'a'); ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f1(x: string); ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ function f1(x: string) { } ->f1 : { (x: "a"): any; (x: string): any; } +>f1 : { (x: 'a'): any; (x: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ // ok function f2(x: 'a'); ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f2(x: any); ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f2(x: any) { } ->f2 : { (x: "a"): any; (x: any): any; } +>f2 : { (x: 'a'): any; (x: any): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any // errors function f3(x: 'a'); ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f3(x: Object); ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Object > : ^^^^^^ function f3(x: any) { } ->f3 : { (x: "a"): any; (x: Object): any; } +>f3 : { (x: 'a'): any; (x: Object): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f4(x: 'a'); ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f4(x: {}); ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : {} > : ^^ function f4(x: any) { } ->f4 : { (x: "a"): any; (x: {}): any; } +>f4 : { (x: 'a'): any; (x: {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f5(x: 'a'); ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f5(x: number); ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : number > : ^^^^^^ function f5(x: any) { } ->f5 : { (x: "a"): any; (x: number): any; } +>f5 : { (x: 'a'): any; (x: number): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f6(x: 'a'); ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f6(x: boolean); ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : boolean > : ^^^^^^^ function f6(x: any) { } ->f6 : { (x: "a"): any; (x: boolean): any; } +>f6 : { (x: 'a'): any; (x: boolean): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f7(x: 'a'); ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f7(x: Date); ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : Date > : ^^^^ function f7(x: any) { } ->f7 : { (x: "a"): any; (x: Date): any; } +>f7 : { (x: 'a'): any; (x: Date): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f8(x: 'a'); ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f8(x: RegExp); ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : RegExp > : ^^^^^^ function f8(x: any) { } ->f8 : { (x: "a"): any; (x: RegExp): any; } +>f8 : { (x: 'a'): any; (x: RegExp): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f9(x: 'a'); ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f9(x: () => {}); ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : () => {} > : ^^^^^^ function f9(x: any) { } ->f9 : { (x: "a"): any; (x: () => {}): any; } +>f9 : { (x: 'a'): any; (x: () => {}): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -289,19 +289,19 @@ class C implements String { // BUG 831846 function f10(x: 'a'); ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f10(x: C); ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : C > : ^ function f10(x: any) { } ->f10 : { (x: "a"): any; (x: C): any; } +>f10 : { (x: 'a'): any; (x: C): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any @@ -313,53 +313,53 @@ interface I extends String { // BUG 831846 function f11(x: 'a'); ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f11(x: I); ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : I > : ^ function f11(x: any) { } ->f11 : { (x: "a"): any; (x: I): any; } +>f11 : { (x: 'a'): any; (x: I): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f12(x: 'a'); ->f12 : { (x: "a"): any; (x: T_1): any; } +>f12 : { (x: 'a'): any; (x: T_1): any; } > : ^^^ ^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f12(x: T); ->f12 : { (x: "a"): any; (x: T): any; } +>f12 : { (x: 'a'): any; (x: T): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f12(x: any) { } ->f12 : { (x: "a"): any; (x: T_1): any; } +>f12 : { (x: 'a'): any; (x: T_1): any; } > : ^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f13(x: 'a'); ->f13 : { (x: "a"): any; (x: T_1): any; } +>f13 : { (x: 'a'): any; (x: T_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f13(x: T); ->f13 : { (x: "a"): any; (x: T): any; } +>f13 : { (x: 'a'): any; (x: T): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : T > : ^ function f13(x: any) { } ->f13 : { (x: "a"): any; (x: T_1): any; } +>f13 : { (x: 'a'): any; (x: T_1): any; } > : ^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any @@ -370,53 +370,53 @@ enum E { A } > : ^^^ function f14(x: 'a'); ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f14(x: E); ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : E > : ^ function f14(x: any) { } ->f14 : { (x: "a"): any; (x: E): any; } +>f14 : { (x: 'a'): any; (x: E): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : any function f15(x: 'a'); ->f15 : { (x: "a"): any; (x: U_1): any; } +>f15 : { (x: 'a'): any; (x: U_1): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f15(x: U); ->f15 : { (x: "a"): any; (x: U): any; } +>f15 : { (x: 'a'): any; (x: U): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f15(x: any) { } ->f15 : { (x: "a"): any; (x: U_1): any; } +>f15 : { (x: 'a'): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any function f16(x: 'a'); ->f16 : { (x: "a"): any; (x: U_1): any; } +>f16 : { (x: 'a'): any; (x: U_1): any; } > : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ function f16(x: U); ->f16 : { (x: "a"): any; (x: U): any; } +>f16 : { (x: 'a'): any; (x: U): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : U > : ^ function f16(x: any) { } ->f16 : { (x: "a"): any; (x: U_1): any; } +>f16 : { (x: 'a'): any; (x: U_1): any; } > : ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >x : any diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types index 4c24f9783e035..a6e077ec3da87 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types @@ -4,25 +4,25 @@ // String literal types are only valid in overload signatures function foo(x: 'hi') { } ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f = function foo(x: 'hi') { } ->f : (x: "hi") => void +>f : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->function foo(x: 'hi') { } : (x: "hi") => void +>function foo(x: 'hi') { } : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ var f2 = (x: 'hi', y: 'hi') => { } ->f2 : (x: "hi", y: "hi") => void +>f2 : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->(x: 'hi', y: 'hi') => { } : (x: "hi", y: "hi") => void +>(x: 'hi', y: 'hi') => { } : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -34,7 +34,7 @@ class C { > : ^ foo(x: 'hi') { } ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -46,7 +46,7 @@ interface I { > : ^^^^ foo(x: 'hi', y: 'hi'); ->foo : (x: "hi", y: "hi") => any +>foo : (x: 'hi', y: 'hi') => any > : ^ ^^ ^^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ @@ -55,7 +55,7 @@ interface I { } var a: { ->a : { (x: "hi"): any; foo(x: "hi"): any; } +>a : { (x: 'hi'): any; foo(x: 'hi'): any; } > : ^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -63,30 +63,30 @@ var a: { > : ^^^^ foo(x: 'hi'); ->foo : (x: "hi") => any +>foo : (x: 'hi') => any > : ^ ^^ ^^^^^^^^ >x : "hi" > : ^^^^ } var b = { ->b : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } +>b : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ->{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } +>{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: 'hi'): void; a: (x: 'hi', y: 'hi') => void; b: (x: 'hi') => void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ foo(x: 'hi') { }, ->foo : (x: "hi") => void +>foo : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ a: function foo(x: 'hi', y: 'hi') { }, ->a : (x: "hi", y: "hi") => void +>a : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->function foo(x: 'hi', y: 'hi') { } : (x: "hi", y: "hi") => void +>function foo(x: 'hi', y: 'hi') { } : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->foo : (x: "hi", y: "hi") => void +>foo : (x: 'hi', y: 'hi') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -94,9 +94,9 @@ var b = { > : ^^^^ b: (x: 'hi') => { } ->b : (x: "hi") => void +>b : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ ->(x: 'hi') => { } : (x: "hi") => void +>(x: 'hi') => { } : (x: 'hi') => void > : ^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types index 08407874e06f9..620c731e76782 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.types @@ -42,7 +42,7 @@ interface I { > : ^^^^ foo(x: 'a', y: 'a'); ->foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } +>foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ @@ -50,7 +50,7 @@ interface I { > : ^^^ foo(x: 'hi', y: 'hi'); ->foo : { (x: "a", y: "a"): any; (x: "hi", y: "hi"): any; } +>foo : { (x: 'a', y: 'a'): any; (x: 'hi', y: 'hi'): any; } > : ^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ @@ -59,7 +59,7 @@ interface I { } var a: { ->a : { (x: "hi"): any; (x: "a"): any; foo(x: "hi"): any; foo(x: "a"): any; } +>a : { (x: 'hi'): any; (x: 'a'): any; foo(x: 'hi'): any; foo(x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^ (x: 'hi'); @@ -71,32 +71,32 @@ var a: { > : ^^^ foo(x: 'hi'); ->foo : { (x: "hi"): any; (x: "a"): any; } +>foo : { (x: 'hi'): any; (x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a'); ->foo : { (x: "hi"): any; (x: "a"): any; } +>foo : { (x: 'hi'): any; (x: 'a'): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >x : "a" > : ^^^ } var b = { ->b : { foo(x: "hi"): void; foo(x: "a"): void; } +>b : { foo(x: 'hi'): void; foo(x: 'a'): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ ->{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: "hi"): void; foo(x: "a"): void; } +>{ foo(x: 'hi') { }, foo(x: 'a') { },} : { foo(x: 'hi'): void; foo(x: 'a'): void; } > : ^^^^^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ foo(x: 'hi') { }, ->foo : { (x: "hi"): void; (x: "a"): void; } +>foo : { (x: 'hi'): void; (x: 'a'): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "hi" > : ^^^^ foo(x: 'a') { }, ->foo : { (x: "hi"): void; (x: "a"): void; } +>foo : { (x: 'hi'): void; (x: 'a'): void; } > : ^^^ ^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^ >x : "a" > : ^^^ diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types index 998b51c20d623..d833f4e51bea8 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { (x: "a"): void; (x: string): void; } +>a : { (x: 'a'): void; (x: string): void; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { (x: "a", y: number): void; (x: string, y: number): void; } +>a2 : { (x: 'a', y: number): void; (x: string, y: number): void; } > : ^^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^^ ^^^ (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { (x: "a"): number; (x: string): number; } +>a : { (x: 'a'): number; (x: string): number; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ (x: 'a'): number; diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types index 3a9928b1f7bd1..ce47939fc27f2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.types @@ -71,7 +71,7 @@ module MemberWithCallSignature { interface Base { // T // M's a: { ->a : { new (x: "a"): void; new (x: string): void; } +>a : { new (x: 'a'): void; new (x: string): void; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): void; @@ -83,7 +83,7 @@ module MemberWithCallSignature { > : ^^^^^^ } a2: { ->a2 : { new (x: "a", y: number): void; new (x: string, y: number): void; } +>a2 : { new (x: 'a', y: number): void; new (x: string, y: number): void; } > : ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^^^ ^^ ^^ ^^ ^^^ ^^^ new (x: 'a', y: number): void; @@ -132,7 +132,7 @@ module MemberWithCallSignature { interface Base2 { // T // M's a: { ->a : { new (x: "a"): number; new (x: string): number; } +>a : { new (x: 'a'): number; new (x: string): number; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new (x: 'a'): number; diff --git a/tests/baselines/reference/switchWithConstrainedTypeVariable.types b/tests/baselines/reference/switchWithConstrainedTypeVariable.types index 478e1899b3203..9966ce9f55d16 100644 --- a/tests/baselines/reference/switchWithConstrainedTypeVariable.types +++ b/tests/baselines/reference/switchWithConstrainedTypeVariable.types @@ -4,7 +4,7 @@ // Repro from #20840 function function1(key: T) { ->function1 : (key: T) => void +>function1 : (key: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >key : T > : ^ diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index d29f030fcae67..0a58babc5438a 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -108,7 +108,7 @@ type TCA2 = Cases<'BAR'>; // 'BAR bar BAR bAR' // Assignability function test(name: `get${Capitalize}`) { ->test : (name: `get${Capitalize}`) => void +>test : (name: `get${Capitalize}`) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^ >name : `get${Capitalize}` > : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes2.types b/tests/baselines/reference/templateLiteralTypes2.types index aa664dda40406..2284ad7fc3668 100644 --- a/tests/baselines/reference/templateLiteralTypes2.types +++ b/tests/baselines/reference/templateLiteralTypes2.types @@ -2,7 +2,7 @@ === templateLiteralTypes2.ts === function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { ->ft1 : (s: string, n: number, u: "foo" | "bar" | "baz", t: T) => void +>ft1 : (s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ >s : string > : ^^^^^^ diff --git a/tests/baselines/reference/templateLiteralTypes3.types b/tests/baselines/reference/templateLiteralTypes3.types index 655a8cee04933..6c3c219b092b5 100644 --- a/tests/baselines/reference/templateLiteralTypes3.types +++ b/tests/baselines/reference/templateLiteralTypes3.types @@ -677,7 +677,7 @@ function ff2(x: `foo-${T}`, y: `${T}-bar`, z: `baz-${T}`) { } function ff3(x: string, y: `foo-${string}` | 'bar') { ->ff3 : (x: string, y: `foo-${string}` | "bar") => void +>ff3 : (x: string, y: `foo-${string}` | 'bar') => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeGuardFunctionErrors.types b/tests/baselines/reference/typeGuardFunctionErrors.types index 7fda3c139ac01..1357201b363b3 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.types +++ b/tests/baselines/reference/typeGuardFunctionErrors.types @@ -509,7 +509,7 @@ type KeySet = { [k in T]: true } // expected an error, since Keys doesn't have a 'd' declare function hasKey(x: KeySet): x is KeySet; ->hasKey : (x: KeySet) => x is KeySet +>hasKey : (x: KeySet) => x is KeySet > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : KeySet > : ^^^^^^^^^ diff --git a/tests/baselines/reference/typeOfOnTypeArg.errors.txt b/tests/baselines/reference/typeOfOnTypeArg.errors.txt index fbb87a904ad3d..79f200edd5229 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.errors.txt +++ b/tests/baselines/reference/typeOfOnTypeArg.errors.txt @@ -1,4 +1,4 @@ -typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'. +typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'number' is not assignable to parameter of type '{ "": number; }'. ==== typeOfOnTypeArg.ts (1 errors) ==== @@ -10,5 +10,5 @@ typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'number' is not assignab fill(32); ~~ -!!! error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type '{ "": number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types index f88113a869107..220c044cbb496 100644 --- a/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/typePredicatesCanNarrowByDiscriminant.types @@ -3,7 +3,7 @@ === typePredicatesCanNarrowByDiscriminant.ts === // #45770 declare const fruit: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -27,7 +27,7 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { > : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >fruit.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,18 +43,18 @@ if (isOneOf(fruit.kind, ['apple', 'banana'] as const)) { fruit.kind >fruit.kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" > : ^^^^^^^^^^^^^^^^^^ fruit ->fruit : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } declare const fruit2: { kind: 'apple'} | { kind: 'banana' } | { kind: 'cherry' } ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" > : ^^^^^^^ @@ -68,7 +68,7 @@ const kind = fruit2.kind; > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -92,12 +92,12 @@ if (isOneOf(kind, ['apple', 'banana'] as const)) { fruit2.kind >fruit2.kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ >kind : "apple" | "banana" | "cherry" > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fruit2 ->fruit2 : { kind: "apple"; } | { kind: "banana"; } | { kind: "cherry"; } +>fruit2 : { kind: 'apple'; } | { kind: 'banana'; } | { kind: 'cherry'; } > : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/typeTagOnPropertyAssignment.types b/tests/baselines/reference/typeTagOnPropertyAssignment.types index 4e631da68bad1..8316bffcdbb7b 100644 --- a/tests/baselines/reference/typeTagOnPropertyAssignment.types +++ b/tests/baselines/reference/typeTagOnPropertyAssignment.types @@ -2,9 +2,9 @@ === typeTagOnPropertyAssignment.js === const o = { ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ ->{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => "b"; } +>{ /** * @type {"a"} */ a: "a", /** @type {() => 'b'} */ n: () => 'b'} : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ /** @@ -18,9 +18,9 @@ const o = { /** @type {() => 'b'} */ n: () => 'b' ->n : () => "b" +>n : () => 'b' > : ^^^^^^ ->() => 'b' : () => "b" +>() => 'b' : () => 'b' > : ^^^^^^ >'b' : "b" > : ^^^ @@ -29,16 +29,16 @@ const o = { o.a >o.a : "a" > : ^^^ ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ >a : "a" > : ^^^ o.n ->o.n : () => "b" +>o.n : () => 'b' > : ^^^^^^ ->o : { a: "a"; n: () => "b"; } +>o : { a: "a"; n: () => 'b'; } > : ^^^^^ ^^^^^ ^^^ ->n : () => "b" +>n : () => 'b' > : ^^^^^^ diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 0bf67da2f7f16..5a44554b69412 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -331,7 +331,7 @@ const optionHandlers: OptionHandlers = { }; function handleOption(option: Options & { kind: K }): string { ->handleOption : (option: Options & { kind: K; }) => string +>handleOption : (option: Options & { kind: K; }) => string > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >option : Options & { kind: K; } > : ^^^^^^^^^^^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/typedefMultipleTypeParameters.types b/tests/baselines/reference/typedefMultipleTypeParameters.types index bde3ca598caf7..86c5c22b5088a 100644 --- a/tests/baselines/reference/typedefMultipleTypeParameters.types +++ b/tests/baselines/reference/typedefMultipleTypeParameters.types @@ -11,7 +11,7 @@ /** @type {Everything<{ a: number, b: 'hi', c: never }, undefined, { c: true, d: 1 }, number, string>} */ var tuvwx; ->tuvwx : Everything<{ a: number; b: "hi"; c: never; }, undefined, { c: true; d: 1; }, number, string> +>tuvwx : Everything<{ a: number; b: 'hi'; c: never; }, undefined, { c: true; d: 1; }, number, string> > : ^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ /** @type {Everything<{ a: number }, undefined, { c: 1, d: 1 }, number, string>} */ diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.types b/tests/baselines/reference/typeofImportInstantiationExpression.types index 84dd63de703b9..e5acd4c163a70 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.types +++ b/tests/baselines/reference/typeofImportInstantiationExpression.types @@ -44,7 +44,7 @@ type T1 = typeof import('./input.js').myFunction; >myFunction : error type T2 = typeof import('./input.js').myFunction; ->T2 : (arg: Arg) => { slug: "hello"; } +>T2 : (arg: Arg) => { slug: 'hello'; } > : ^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ >myFunction : error >slug : "hello" diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.types b/tests/baselines/reference/typesWithSpecializedCallSignatures.types index 43f4a57540b46..94496c3d4f516 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.types @@ -30,25 +30,25 @@ class C { > : ^ foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ foo(x) { ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : any @@ -66,19 +66,19 @@ var c = new C(); interface I { foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -88,23 +88,23 @@ var i: I; > : ^ var a: { ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ foo(x: 'hi'): Derived1; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "hi" > : ^^^^ foo(x: 'bye'): Derived2; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : "bye" > : ^^^^^ foo(x: string): Base; ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >x : string > : ^^^^^^ @@ -120,11 +120,11 @@ c = i; > : ^ c = a; ->c = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>c = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ i = c; @@ -136,17 +136,17 @@ i = c; > : ^ i = a; ->i = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>i = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ a = c; >a = c : C > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ @@ -154,7 +154,7 @@ a = c; a = i; >a = i : I > : ^ ->a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } +>a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } > : ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -164,11 +164,11 @@ var r1: Derived1 = c.foo('hi'); > : ^^^^^^^^ >c.foo('hi') : Derived1 > : ^^^^^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hi' : "hi" > : ^^^^ @@ -178,11 +178,11 @@ var r2: Derived2 = c.foo('bye'); > : ^^^^^^^^ >c.foo('bye') : Derived2 > : ^^^^^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'bye' : "bye" > : ^^^^^ @@ -192,11 +192,11 @@ var r3: Base = c.foo('hm'); > : ^^^^ >c.foo('hm') : Base > : ^^^^ ->c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >c : C > : ^ ->foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types index 567c0dd4d86ec..66c6c4ca3b84a 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types @@ -76,7 +76,7 @@ var i: I; > : ^ var a: { ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ new(x: 'hi'): Derived1; @@ -102,25 +102,25 @@ c = i; > : ^ c = a; ->c = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>c = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >c : C > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ i = a; ->i = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>i = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ a = i; >a = i : I > : ^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >i : I > : ^ @@ -150,7 +150,7 @@ var r3: Base = new a('hm'); > : ^^^^ >new a('hm') : Base > : ^^^^ ->a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } +>a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ >'hm' : "hm" > : ^^^^ diff --git a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types index 4d788cb55640e..38562f6fd984d 100644 --- a/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types +++ b/tests/baselines/reference/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types @@ -44,11 +44,11 @@ if (s.value !== undefined) { > : ^^^^^^^^^ s; ->s : { type: "string"; value: string; } | { type: "number"; value: number; } | { type: "unknown"; value: unknown; } +>s : { type: 'string'; value: string; } | { type: 'number'; value: number; } | { type: 'unknown'; value: unknown; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^ } else { s; ->s : { type: "unknown"; value: unknown; } | { value: undefined; } +>s : { type: 'unknown'; value: unknown; } | { value: undefined; } > : ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ } diff --git a/tests/baselines/reference/unionTypeReduction2.types b/tests/baselines/reference/unionTypeReduction2.types index b8a7e348cddc1..7ae3492ad7ed7 100644 --- a/tests/baselines/reference/unionTypeReduction2.types +++ b/tests/baselines/reference/unionTypeReduction2.types @@ -194,21 +194,21 @@ function f4(x: (x: string | undefined) => void, y: (x?: string) => void) { } function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { ->f5 : (x: (x: string | undefined) => void, y: (x?: "hello") => void) => void +>f5 : (x: (x: string | undefined) => void, y: (x?: 'hello') => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ >x : string | undefined > : ^^^^^^^^^^^^^^^^^^ ->y : (x?: "hello") => void +>y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x?: 'hello') => void ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ ->!!true ? x : y : (x?: "hello") => void +>!!true ? x : y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >!!true : true > : ^^^^ @@ -218,28 +218,28 @@ function f5(x: (x: string | undefined) => void, y: (x?: 'hello') => void) { > : ^^^^ >x : (x: string | undefined) => void > : ^ ^^ ^^^^^ ->y : (x?: "hello") => void +>y : (x?: 'hello') => void > : ^ ^^^ ^^^^^ f(); >f() : void > : ^^^^ ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x?: "hello") => void +>f : (x?: 'hello') => void > : ^ ^^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ } function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { ->f6 : (x: (x: "hello" | undefined) => void, y: (x?: string) => void) => void +>f6 : (x: (x: 'hello' | undefined) => void, y: (x?: string) => void) => void > : ^ ^^ ^^ ^^ ^^^^^^^^^ ->x : (x: "hello" | undefined) => void +>x : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >x : "hello" | undefined > : ^^^^^^^^^^^^^^^^^^^ @@ -249,9 +249,9 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^^^^^^^^^^^^^^ let f = !!true ? x : y; // (x: 'hello' | undefined) => void ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ ->!!true ? x : y : (x: "hello" | undefined) => void +>!!true ? x : y : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >!!true : true > : ^^^^ @@ -259,7 +259,7 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { > : ^^^^^ >true : true > : ^^^^ ->x : (x: "hello" | undefined) => void +>x : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >y : (x?: string) => void > : ^ ^^^ ^^^^^ @@ -267,13 +267,13 @@ function f6(x: (x: 'hello' | undefined) => void, y: (x?: string) => void) { f(); // Error >f() : void > : ^^^^ ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ f('hello'); >f('hello') : void > : ^^^^ ->f : (x: "hello" | undefined) => void +>f : (x: 'hello' | undefined) => void > : ^ ^^ ^^^^^ >'hello' : "hello" > : ^^^^^^^ diff --git a/tests/cases/fourslash/completionForStringLiteral4.ts b/tests/cases/fourslash/completionForStringLiteral4.ts index 64f3ddeb9acaf..605b3b3891d21 100644 --- a/tests/cases/fourslash/completionForStringLiteral4.ts +++ b/tests/cases/fourslash/completionForStringLiteral4.ts @@ -15,7 +15,7 @@ goTo.marker('1'); verify.quickInfoExists(); -verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "other2", p4: "literal" | number, p5: 12 | true): string', 'I am documentation'); +verify.quickInfoIs('function f(p1: \'literal\', p2: "literal", p3: \'other1\' | \'other2\', p4: \'literal\' | number, p5: 12 | true): string', 'I am documentation'); const replacementSpan = test.ranges()[0] verify.completions({ marker: "2", exact: [ diff --git a/tests/cases/fourslash/overloadOnConstCallSignature.ts b/tests/cases/fourslash/overloadOnConstCallSignature.ts index 61ae8da97cc84..d7a021dcd70bd 100644 --- a/tests/cases/fourslash/overloadOnConstCallSignature.ts +++ b/tests/cases/fourslash/overloadOnConstCallSignature.ts @@ -12,7 +12,7 @@ verify.signatureHelp({ marker: "1", overloadsCount: 4, - text: 'foo(name: "order"): string', + text: 'foo(name: \'order\'): string', }) edit.insert('"hi"'); diff --git a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts index de06e2480c52d..04477812f3389 100644 --- a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts +++ b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts @@ -20,13 +20,13 @@ ////c.x1(1, (x/*10*/x) => { return 1; } ); verify.quickInfos({ - 1: "(method) I.x1(a: number, callback: (x: \"hi\") => number): any", - 2: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", - 3: "(parameter) callback: (x: \"hi\") => number", - 4: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", + 1: "(method) I.x1(a: number, callback: (x: 'hi') => number): any", + 2: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", + 3: "(parameter) callback: (x: 'hi') => number", + 4: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", 5: "(parameter) callback: (x: string) => number", 6: "(parameter) callback: (x: string) => number", - 7: "(method) C.x1(a: number, callback: (x: \"hi\") => number): any", + 7: "(method) C.x1(a: number, callback: (x: 'hi') => number): any", 8: "(parameter) xx: \"hi\"", 9: "(parameter) xx: \"bye\"", 10: "(parameter) xx: \"hi\"" diff --git a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts index babc79c79d531..6b44ace1ee2a5 100644 --- a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts +++ b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts @@ -12,6 +12,6 @@ verify.signatureHelp( { marker: "1", overloadsCount: 3, parameterName: "z", parameterSpan: "z: string" }, - { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: 'x: "hi"' }, - { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: 'y: "bye"' }, + { marker: "2", overloadsCount: 3, parameterName: "x", parameterSpan: 'x: \'hi\'' }, + { marker: "3", overloadsCount: 3, parameterName: "y", parameterSpan: 'y: \'bye\'' }, ); From b8d575a5f2a63cb31b44866f2d86d202cb597e56 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 18 Dec 2024 17:14:27 +0000 Subject: [PATCH 4/5] Preserve symbol name string delimiters --- src/compiler/checker.ts | 42 +++-- src/compiler/emitter.ts | 5 +- src/compiler/expressionToTypeNode.ts | 6 +- src/compiler/types.ts | 5 +- .../aliasDoesNotDuplicateSignatures.symbols | 2 +- .../reference/ambientDeclarations.symbols | 2 +- .../ambientDeclarationsExternal.symbols | 4 +- .../baselines/reference/ambientErrors.symbols | 6 +- ...oduleWithInternalImportDeclaration.symbols | 2 +- ...leWithoutInternalImportDeclaration.symbols | 2 +- tests/baselines/reference/api/typescript.d.ts | 2 + ...ObjectMembersStringNumericNames.errors.txt | 162 +++++++++--------- .../reference/bangInModuleName.symbols | 2 +- .../classFieldSuperNotAccessibleJs.errors.txt | 4 +- ...completionListForImportAttributes.baseline | 6 +- ...leImportedTypeUseInTypeArgPosition.symbols | 4 +- ...CrossFileImportTypeOfAmbientModule.symbols | 2 +- ...ingModuleAugmentationRetainsImport.symbols | 2 +- .../reference/declaredExternalModule.symbols | 2 +- ...ExternalModuleWithExportAssignment.symbols | 2 +- ...faceIncompatibleWithBaseIndexer.errors.txt | 8 +- .../reference/exportDefaultVariable.symbols | 2 +- .../reference/exportEqualsOfModule.symbols | 8 +- ...alModuleReferenceDoubleUnderscore1.symbols | 4 +- ...llRefsForComputedProperties.baseline.jsonc | 12 +- ...lRefsForComputedProperties2.baseline.jsonc | 12 +- ...ndAllRefsIndexedAccessTypes.baseline.jsonc | 4 +- .../reference/indexSignatures1.errors.txt | 4 +- ...latedDeclarationErrorsAugmentation.symbols | 2 +- .../mergeMultipleInterfacesReexported.symbols | 4 +- .../mergeSymbolReexportInterface.symbols | 2 +- ...olReexportedTypeAliasInstantiation.symbols | 2 +- .../mergeSymbolRexportFunction.symbols | 2 +- .../reference/mergedDeclarations7.symbols | 2 +- .../mergedInterfacesWithIndexers2.errors.txt | 4 +- .../moduleAugmentationOfAlias.symbols | 2 +- ...NotMergedWithFunctionDefaultExport.symbols | 2 +- .../nodeColonModuleResolution.symbols | 4 +- .../objectLiteralGettersAndSetters.symbols | 4 +- ...ngNamedPropertyOfIllegalCharacters.symbols | 8 +- ...ientExternalModuleImportWithExport.symbols | 4 +- ...tExternalModuleImportWithoutExport.symbols | 4 +- .../reference/propertyAccess.errors.txt | 4 +- ...ropertyIdentityWithPrivacyMismatch.symbols | 4 +- ...nfoDisplayPartsLiteralLikeNames01.baseline | 10 +- .../quickInfoOnJsxNamespacedName.baseline | 2 +- .../quotedModuleNameMustBeAmbient.symbols | 4 +- .../referencesForEnums.baseline.jsonc | 4 +- ...NumericLiteralPropertyNames.baseline.jsonc | 2 +- ...rStringLiteralPropertyNames.baseline.jsonc | 2 +- ...StringLiteralPropertyNames2.baseline.jsonc | 6 +- ...StringLiteralPropertyNames3.baseline.jsonc | 10 +- .../selfNameModuleAugmentation.symbols | 2 +- .../spellingSuggestionModule.symbols | 2 +- ...lPropertyNameWithLineContinuation1.symbols | 9 +- .../subtypingWithObjectMembers.errors.txt | 8 +- .../subtypingWithObjectMembers2.errors.txt | 8 +- .../subtypingWithObjectMembers3.errors.txt | 8 +- .../subtypingWithObjectMembers5.errors.txt | 6 +- ...gWithObjectMembersAccessibility.errors.txt | 4 +- ...WithObjectMembersAccessibility2.errors.txt | 8 +- ...ngWithObjectMembersOptionality2.errors.txt | 4 +- .../reference/tsxDynamicTagName5.symbols | 2 +- .../reference/tsxDynamicTagName7.symbols | 2 +- .../reference/tsxDynamicTagName8.symbols | 2 +- .../reference/tsxDynamicTagName9.symbols | 2 +- .../reference/tsxElementResolution17.symbols | 4 +- .../reference/tsxExternalModuleEmit1.symbols | 2 +- .../reference/tsxExternalModuleEmit2.symbols | 2 +- .../reference/tsxPreserveEmit1.symbols | 4 +- .../typeGuardFunctionErrors.errors.txt | 12 +- 71 files changed, 263 insertions(+), 240 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e7004090c580b..eee630f8dd4de 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1710,7 +1710,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return typeToStringWorker(type, getParseTreeNode(enclosingDeclaration), flags); }, symbolToString: (symbol, enclosingDeclaration, meaning, flags) => { - return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags); + return symbolToStringWorker(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags); }, typePredicateToString: (predicate, enclosingDeclaration, flags) => { return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags); @@ -1722,7 +1722,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return typeToStringWorker(type, getParseTreeNode(enclosingDeclaration), flags, writer, verbosityLevel, out); }, writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { - return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); + return symbolToStringWorker(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); }, writeTypePredicate: (predicate, enclosingDeclaration, flags, writer) => { return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags, writer); @@ -5988,8 +5988,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags: SymbolFormatFlags = SymbolFormatFlags.AllowAnyNodeKind, writer?: EmitTextWriter): string { - let nodeFlags = NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType; + return symbolToStringWorker(symbol, enclosingDeclaration, meaning, flags | SymbolFormatFlags.UseDoubleQuotesForStringLiteralType, writer); + } + function symbolToStringWorker(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags: SymbolFormatFlags = SymbolFormatFlags.AllowAnyNodeKind, writer?: EmitTextWriter): string { + let nodeFlags = NodeBuilderFlags.IgnoreErrors; let internalNodeFlags = InternalNodeBuilderFlags.None; + if (flags & SymbolFormatFlags.UseSingleQuotesForStringLiteralType) { + nodeFlags |= NodeBuilderFlags.UseSingleQuotesForStringLiteralType; + } + if (flags & SymbolFormatFlags.UseDoubleQuotesForStringLiteralType) { + nodeFlags |= NodeBuilderFlags.UseDoubleQuotesForStringLiteralType; + } if (flags & SymbolFormatFlags.UseOnlyExternalAliasing) { nodeFlags |= NodeBuilderFlags.UseOnlyExternalAliasing; } @@ -6330,9 +6339,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const node = range as Node as StringLiteral; return setOriginalNode( context.flags & (NodeBuilderFlags.UseSingleQuotesForStringLiteralType | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) ? - factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)): - factory.createStringLiteralFromNode(node), - node + factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)) : + factory.createStringLiteralFromNode(node), + node, ) as Node as T; } else { @@ -8543,10 +8552,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } let firstChar = symbolName.charCodeAt(0); + let useSingleQuote = !(context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) && + (!!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType) || firstChar === CharacterCodes.singleQuote); + if (isSingleOrDoubleQuote(firstChar) && some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol, context)); + return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol, context), useSingleQuote); } - if (index === 0 || canUsePropertyAccess(symbolName, languageVersion)) { + if (canUsePropertyAccess(symbolName, languageVersion) || (index === 0 && firstChar === CharacterCodes.openBracket)) { const identifier = setEmitFlags(factory.createIdentifier(symbolName), EmitFlags.NoAsciiEscaping); if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); identifier.symbol = symbol; @@ -8557,13 +8569,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (firstChar === CharacterCodes.openBracket) { symbolName = symbolName.substring(1, symbolName.length - 1); firstChar = symbolName.charCodeAt(0); + useSingleQuote = !(context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) && + (!!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType) || firstChar === CharacterCodes.singleQuote); } let expression: Expression | undefined; if (isSingleOrDoubleQuote(firstChar) && !(symbol.flags & SymbolFlags.EnumMember)) { - expression = factory.createStringLiteral(stripQuotes(symbolName).replace(/\\./g, s => s.substring(1)), firstChar === CharacterCodes.singleQuote); + const stringLiteralName = factory.createStringLiteral(stripQuotes(symbolName).replace(/\\./g, s => s.substring(1)), useSingleQuote); + stringLiteralName.symbol = symbol; + expression = stringLiteralName; } else if (("" + +symbolName) === symbolName) { - expression = factory.createNumericLiteral(+symbolName); + const numberLiteralName = factory.createNumericLiteral(+symbolName); + numberLiteralName.symbol = symbol; + expression = numberLiteralName; } if (!expression) { const identifier = setEmitFlags(factory.createIdentifier(symbolName), EmitFlags.NoAsciiEscaping); @@ -8571,7 +8589,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { identifier.symbol = symbol; expression = identifier; } - return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain, index - 1), expression); + return index === 0 ? expression : factory.createElementAccessExpression(createExpressionFromSymbolChain(chain, index - 1), expression); } } } @@ -8599,7 +8617,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getPropertyNameNodeForSymbol(symbol: Symbol, context: NodeBuilderContext) { const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); - const singleQuote = context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType ? true: + const singleQuote = context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType ? true : context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType ? false : !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); const isMethod = !!(symbol.flags & SymbolFlags.Method); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 01a96579861f4..0df7b17307061 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2099,7 +2099,10 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri // SyntaxKind.TemplateTail function emitLiteral(node: LiteralLikeNode, jsxAttributeEscape: boolean) { const text = getLiteralTextOfNode(node, /*sourceFile*/ undefined, printerOptions.neverAsciiEscape, jsxAttributeEscape); - if ( + if ((node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral) && (node as StringLiteral).symbol) { + writeSymbol(text, (node as StringLiteral).symbol); + } + else if ( (printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(node.kind)) ) { diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index 45a730e4ef0d0..26e826c25e167 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -534,9 +534,9 @@ export function createSyntacticTypeNodeBuilder( if (isStringLiteral(node)) { return setOriginalNode( context.flags & (NodeBuilderFlags.UseSingleQuotesForStringLiteralType | NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) ? - factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)): - factory.createStringLiteralFromNode(node), - node + factory.createStringLiteral(node.text, !!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType)) : + factory.createStringLiteralFromNode(node), + node, ); } if (isConditionalTypeNode(node)) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e6d98d361dde8..6d32e81378e8a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5545,7 +5545,7 @@ export const enum TypeFormatFlags { UseAliasDefinedOutsideCurrentScope = 1 << 14, // For a `type T = ... ` defined in a different file, write `T` instead of its value, even though `T` can't be accessed in the current scope. UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type - UseDoubleQuotesForStringLiteralType = 1 << 30, // Preserve source quote types for string literal type + UseDoubleQuotesForStringLiteralType = 1 << 30, // Use double quotes for string literal type NoTypeReduction = 1 << 29, // Don't call getReducedType OmitThisParameter = 1 << 25, @@ -5594,6 +5594,9 @@ export const enum SymbolFormatFlags { // Skip building an accessible symbol chain /** @internal */ DoNotIncludeSymbolChain = 1 << 5, + + UseSingleQuotesForStringLiteralType = 1 << 6, // Use single quotes for string literal type + UseDoubleQuotesForStringLiteralType = 1 << 7, // Use double quote for string literal type } /** @internal */ diff --git a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols index 36b4575141868..6808f5edc657e 100644 --- a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols +++ b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols @@ -8,7 +8,7 @@ declare namespace demoNS { >f : Symbol(f, Decl(demo.d.ts, 0, 26)) } declare module 'demoModule' { ->'demoModule' : Symbol("demoModule", Decl(demo.d.ts, 2, 1)) +>'demoModule' : Symbol('demoModule', Decl(demo.d.ts, 2, 1)) import alias = demoNS; >alias : Symbol(alias, Decl(demo.d.ts, 3, 29)) diff --git a/tests/baselines/reference/ambientDeclarations.symbols b/tests/baselines/reference/ambientDeclarations.symbols index 34ac406420228..a740154a6e71c 100644 --- a/tests/baselines/reference/ambientDeclarations.symbols +++ b/tests/baselines/reference/ambientDeclarations.symbols @@ -162,7 +162,7 @@ var q = M1.fn(); // Ambient external module in the global module // Ambient external module with a string literal name that is a top level external module name declare module 'external1' { ->'external1' : Symbol("external1", Decl(ambientDeclarations.ts, 67, 16)) +>'external1' : Symbol('external1', Decl(ambientDeclarations.ts, 67, 16)) var q; >q : Symbol(q, Decl(ambientDeclarations.ts, 72, 7)) diff --git a/tests/baselines/reference/ambientDeclarationsExternal.symbols b/tests/baselines/reference/ambientDeclarationsExternal.symbols index 652851fd46f61..a6ac684781b52 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.symbols +++ b/tests/baselines/reference/ambientDeclarationsExternal.symbols @@ -22,7 +22,7 @@ var n: number; === decls.ts === // Ambient external module with export assignment declare module 'equ' { ->'equ' : Symbol("equ", Decl(decls.ts, 0, 0)) +>'equ' : Symbol('equ', Decl(decls.ts, 0, 0)) var x; >x : Symbol(x, Decl(decls.ts, 2, 7)) @@ -32,7 +32,7 @@ declare module 'equ' { } declare module 'equ2' { ->'equ2' : Symbol("equ2", Decl(decls.ts, 4, 1)) +>'equ2' : Symbol('equ2', Decl(decls.ts, 4, 1)) var x: number; >x : Symbol(x, Decl(decls.ts, 7, 7)) diff --git a/tests/baselines/reference/ambientErrors.symbols b/tests/baselines/reference/ambientErrors.symbols index c159b16a09885..9b9d0decf532b 100644 --- a/tests/baselines/reference/ambientErrors.symbols +++ b/tests/baselines/reference/ambientErrors.symbols @@ -92,16 +92,16 @@ module M2 { >M2 : Symbol(M2, Decl(ambientErrors.ts, 42, 1)) declare module 'nope' { } ->'nope' : Symbol("nope", Decl(ambientErrors.ts, 45, 11)) +>'nope' : Symbol('nope', Decl(ambientErrors.ts, 45, 11)) } // Ambient external module with a string literal name that isn't a top level external module name declare module '../foo' { } ->'../foo' : Symbol("../foo", Decl(ambientErrors.ts, 47, 1)) +>'../foo' : Symbol('../foo', Decl(ambientErrors.ts, 47, 1)) // Ambient external module with export assignment and other exported members declare module 'bar' { ->'bar' : Symbol("bar", Decl(ambientErrors.ts, 50, 27)) +>'bar' : Symbol('bar', Decl(ambientErrors.ts, 50, 27)) var n; >n : Symbol(n, Decl(ambientErrors.ts, 54, 7)) diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols index b962e3e5ba7e5..e178f03dfa49f 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols @@ -11,7 +11,7 @@ var c = new A(); === ambientExternalModuleWithInternalImportDeclaration_0.ts === declare module 'M' { ->'M' : Symbol("M", Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0)) +>'M' : Symbol('M', Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0)) module C { >C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5)) diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols index 104fed501be82..4cfcb44972799 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols @@ -11,7 +11,7 @@ var c = new A(); === ambientExternalModuleWithoutInternalImportDeclaration_0.ts === declare module 'M' { ->'M' : Symbol("M", Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0)) +>'M' : Symbol('M', Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0)) module C { >C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5)) diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 2b04b641cb894..3cc3948c7b187 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6414,6 +6414,8 @@ declare namespace ts { UseOnlyExternalAliasing = 2, AllowAnyNodeKind = 4, UseAliasDefinedOutsideCurrentScope = 8, + UseSingleQuotesForStringLiteralType = 64, + UseDoubleQuotesForStringLiteralType = 128, } enum TypePredicateKind { This = 0, diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index c57ab82b66abb..3af8f1ee994c2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -1,32 +1,32 @@ -assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. -assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. -assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. -assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2741: Property '"1"' is missing in type 'T' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2741: Property '"1."' is missing in type 'S' but required in type 'T'. +assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Property '"1"' is missing in type 'T2' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property '"1.0"' is missing in type 'S2' but required in type 'T2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property '"1"' is missing in type 'T' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property '"1."' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property '"1.0"' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property '"1."' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property '"1."' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property '"1."' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property '"1.0"' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property '"1.0"' is missing in type 'T' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property '"1."' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property '"1."' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property '"1."' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property '"1."' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property '"1."' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property '"1.0"' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. -assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property '"1.0"' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property '"1.0"' is missing in type 'T2' but required in type '{ "1.0": string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property '"1.0"' is missing in type 'T' but required in type '{ "1.0": string; }'. ==== assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== @@ -52,74 +52,74 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s = t; ~ -!!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type 'T' but required in type 'S'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: '"1"' is declared here. t = s; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:6:15: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type 'S' but required in type 'T'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:6:15: '"1."' is declared here. s = s2; // ok s = a2; ~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: '"1"' is declared here. s2 = t2; ~~ -!!! error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type 'T2' but required in type 'S2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: '"1"' is declared here. t2 = s2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:11:20: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type 'S2' but required in type 'T2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:11:20: '"1.0"' is declared here. s2 = t; ~~ -!!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type 'T' but required in type 'S2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: '"1"' is declared here. s2 = b; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; baz?: string; }' but required in type 'S2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: '"1"' is declared here. s2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: '"1"' is declared here. a = b; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type '{ "1.0": string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: '"1."' is declared here. b = a; ~ -!!! error TS2741: Property ''1.0'' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ "1.0": string; baz?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: '"1.0"' is declared here. a = s; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: '"1."' is declared here. a = s2; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: '"1."' is declared here. a = a2; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: '"1."' is declared here. a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type '{ "1": string; }' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: '"1.0"' is declared here. b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type '{ "1": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: '"1"' is declared here. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type 'T' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: '"1.0"' is declared here. } module NumbersAndStrings { @@ -144,8 +144,8 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s = s2; // ok s = a2; // error ~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: '"1"' is declared here. s2 = t2; // ok t2 = s2; // ok @@ -153,52 +153,52 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop s2 = b; // ok s2 = a2; // error ~~ -!!! error TS2741: Property ''1'' is missing in type '{ "1.0": string; }' but required in type 'S2'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. +!!! error TS2741: Property '"1"' is missing in type '{ "1.0": string; }' but required in type 'S2'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: '"1"' is declared here. a = b; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: '"1."' is declared here. b = a; // error ~ !!! error TS2741: Property '1.0' is missing in type '{ "1.": string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. a = s; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type 'S' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: '"1."' is declared here. a = s2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type 'S2' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: '"1."' is declared here. a = a2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type '{ "1.0": string; }' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: '"1."' is declared here. a = b2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! error TS2741: Property '"1."' is missing in type '{ 1: string; }' but required in type '{ "1.": string; bar?: string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: '"1."' is declared here. a2 = b2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type '{ 1: string; }' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: '"1.0"' is declared here. b2 = a2; // error ~~ !!! error TS2741: Property '1.' is missing in type '{ "1.0": string; }' but required in type '{ 1: string; }'. !!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. a2 = b; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type '{ 1: string; baz?: string; }' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: '"1.0"' is declared here. a2 = t2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type 'T2' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: '"1.0"' is declared here. a2 = t; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ "1.0": string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! error TS2741: Property '"1.0"' is missing in type 'T' but required in type '{ "1.0": string; }'. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: '"1.0"' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/bangInModuleName.symbols b/tests/baselines/reference/bangInModuleName.symbols index 0477ca0793e0c..373dd68574f01 100644 --- a/tests/baselines/reference/bangInModuleName.symbols +++ b/tests/baselines/reference/bangInModuleName.symbols @@ -12,7 +12,7 @@ declare module "http" { } declare module 'intern/dojo/node!http' { ->'intern/dojo/node!http' : Symbol("intern/dojo/node!http", Decl(a.d.ts, 1, 1)) +>'intern/dojo/node!http' : Symbol('intern/dojo/node!http', Decl(a.d.ts, 1, 1)) import http = require('http'); >http : Symbol(http, Decl(a.d.ts, 3, 40)) diff --git a/tests/baselines/reference/classFieldSuperNotAccessibleJs.errors.txt b/tests/baselines/reference/classFieldSuperNotAccessibleJs.errors.txt index b48180a81e475..43a23670cafed 100644 --- a/tests/baselines/reference/classFieldSuperNotAccessibleJs.errors.txt +++ b/tests/baselines/reference/classFieldSuperNotAccessibleJs.errors.txt @@ -1,7 +1,7 @@ index.js(20,22): error TS2855: Class field 'roots' defined by the parent class is not accessible in the child class via super. index.js(23,22): error TS2855: Class field 'foo' defined by the parent class is not accessible in the child class via super. index.js(26,22): error TS2855: Class field 'justProp' defined by the parent class is not accessible in the child class via super. -index.js(29,22): error TS2855: Class field ''literalElementAccess'' defined by the parent class is not accessible in the child class via super. +index.js(29,22): error TS2855: Class field '"literalElementAccess"' defined by the parent class is not accessible in the child class via super. ==== index.js (4 errors) ==== @@ -41,7 +41,7 @@ index.js(29,22): error TS2855: Class field ''literalElementAccess'' defined by t get literalElementAccessTests() { return super.literalElementAccess; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2855: Class field ''literalElementAccess'' defined by the parent class is not accessible in the child class via super. +!!! error TS2855: Class field '"literalElementAccess"' defined by the parent class is not accessible in the child class via super. } } \ No newline at end of file diff --git a/tests/baselines/reference/completionListForImportAttributes.baseline b/tests/baselines/reference/completionListForImportAttributes.baseline index ffa020cd8d782..c2b51eff01c83 100644 --- a/tests/baselines/reference/completionListForImportAttributes.baseline +++ b/tests/baselines/reference/completionListForImportAttributes.baseline @@ -76,7 +76,7 @@ }, { "text": "\"resolution-mode\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -238,7 +238,7 @@ }, { "text": "\"resolution-mode\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -324,7 +324,7 @@ }, { "text": "\"resolution-mode\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/declFileImportedTypeUseInTypeArgPosition.symbols b/tests/baselines/reference/declFileImportedTypeUseInTypeArgPosition.symbols index 51f30691249a6..8f910ce6320b8 100644 --- a/tests/baselines/reference/declFileImportedTypeUseInTypeArgPosition.symbols +++ b/tests/baselines/reference/declFileImportedTypeUseInTypeArgPosition.symbols @@ -6,7 +6,7 @@ class List { } >T : Symbol(T, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 11)) declare module 'mod1' { ->'mod1' : Symbol("mod1", Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 17)) +>'mod1' : Symbol('mod1', Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 17)) class Foo { >Foo : Symbol(Foo, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 1, 23)) @@ -14,7 +14,7 @@ declare module 'mod1' { } declare module 'moo' { ->'moo' : Symbol("moo", Decl(declFileImportedTypeUseInTypeArgPosition.ts, 4, 1)) +>'moo' : Symbol('moo', Decl(declFileImportedTypeUseInTypeArgPosition.ts, 4, 1)) import x = require('mod1'); >x : Symbol(x, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 6, 22)) diff --git a/tests/baselines/reference/declarationEmitCrossFileImportTypeOfAmbientModule.symbols b/tests/baselines/reference/declarationEmitCrossFileImportTypeOfAmbientModule.symbols index 49586b17b8211..0b45fe96eb9f6 100644 --- a/tests/baselines/reference/declarationEmitCrossFileImportTypeOfAmbientModule.symbols +++ b/tests/baselines/reference/declarationEmitCrossFileImportTypeOfAmbientModule.symbols @@ -2,7 +2,7 @@ === types/component.d.ts === declare module '@namespace/component' { ->'@namespace/component' : Symbol("@namespace/component", Decl(component.d.ts, 0, 0)) +>'@namespace/component' : Symbol('@namespace/component', Decl(component.d.ts, 0, 0)) export class Foo {} >Foo : Symbol(Foo, Decl(component.d.ts, 0, 39)) diff --git a/tests/baselines/reference/declarationEmitForModuleImportingModuleAugmentationRetainsImport.symbols b/tests/baselines/reference/declarationEmitForModuleImportingModuleAugmentationRetainsImport.symbols index 94b02bdd892c9..dc3a930e571d6 100644 --- a/tests/baselines/reference/declarationEmitForModuleImportingModuleAugmentationRetainsImport.symbols +++ b/tests/baselines/reference/declarationEmitForModuleImportingModuleAugmentationRetainsImport.symbols @@ -5,7 +5,7 @@ import { ParentThing } from './parent'; >ParentThing : Symbol(ParentThing, Decl(child1.ts, 0, 8)) declare module './parent' { ->'./parent' : Symbol("parent", Decl(parent.ts, 0, 0), Decl(child1.ts, 0, 39)) +>'./parent' : Symbol('parent', Decl(parent.ts, 0, 0), Decl(child1.ts, 0, 39)) interface ParentThing { >ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27)) diff --git a/tests/baselines/reference/declaredExternalModule.symbols b/tests/baselines/reference/declaredExternalModule.symbols index 736563c96826d..f1ad447f41d90 100644 --- a/tests/baselines/reference/declaredExternalModule.symbols +++ b/tests/baselines/reference/declaredExternalModule.symbols @@ -2,7 +2,7 @@ === declaredExternalModule.ts === declare module 'connect' { ->'connect' : Symbol("connect", Decl(declaredExternalModule.ts, 0, 0)) +>'connect' : Symbol('connect', Decl(declaredExternalModule.ts, 0, 0)) interface connectModule { >connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26)) diff --git a/tests/baselines/reference/declaredExternalModuleWithExportAssignment.symbols b/tests/baselines/reference/declaredExternalModuleWithExportAssignment.symbols index dd9a6fdbc3be2..e2315106b75db 100644 --- a/tests/baselines/reference/declaredExternalModuleWithExportAssignment.symbols +++ b/tests/baselines/reference/declaredExternalModuleWithExportAssignment.symbols @@ -2,7 +2,7 @@ === declaredExternalModuleWithExportAssignment.ts === declare module 'connect' { ->'connect' : Symbol("connect", Decl(declaredExternalModuleWithExportAssignment.ts, 0, 0)) +>'connect' : Symbol('connect', Decl(declaredExternalModuleWithExportAssignment.ts, 0, 0)) interface connectModule { >connectModule : Symbol(connectModule, Decl(declaredExternalModuleWithExportAssignment.ts, 0, 26)) diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt index e0e6b8787277b..9712460c4a30a 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt @@ -1,7 +1,7 @@ derivedInterfaceIncompatibleWithBaseIndexer.ts(7,5): error TS2411: Property '1' of type '{ y: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. derivedInterfaceIncompatibleWithBaseIndexer.ts(7,5): error TS2411: Property '1' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. -derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. -derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. +derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2411: Property '"1"' of type '{ y: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. +derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2411: Property '"1"' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. derivedInterfaceIncompatibleWithBaseIndexer.ts(15,5): error TS2411: Property 'foo' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. derivedInterfaceIncompatibleWithBaseIndexer.ts(19,5): error TS2411: Property 'foo' of type '() => { x: number; }' is not assignable to 'string' index type '{ x: number; }'. derivedInterfaceIncompatibleWithBaseIndexer.ts(24,5): error TS2411: Property '1' of type '{ x: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. @@ -24,9 +24,9 @@ derivedInterfaceIncompatibleWithBaseIndexer.ts(24,5): error TS2411: Property '1' interface Derived2 extends Base { '1': { y: number } // error ~~~ -!!! error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. +!!! error TS2411: Property '"1"' of type '{ y: number; }' is not assignable to 'number' index type '{ x: number; y: number; }'. ~~~ -!!! error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. +!!! error TS2411: Property '"1"' of type '{ y: number; }' is not assignable to 'string' index type '{ x: number; }'. } interface Derived3 extends Base { diff --git a/tests/baselines/reference/exportDefaultVariable.symbols b/tests/baselines/reference/exportDefaultVariable.symbols index f07c0dbbbd9de..77cc1cd6b5ec3 100644 --- a/tests/baselines/reference/exportDefaultVariable.symbols +++ b/tests/baselines/reference/exportDefaultVariable.symbols @@ -7,7 +7,7 @@ declare var io: any; >io : Symbol(io, Decl(exportDefaultVariable.ts, 2, 11)) declare module 'module' { ->'module' : Symbol("module", Decl(exportDefaultVariable.ts, 2, 20)) +>'module' : Symbol('module', Decl(exportDefaultVariable.ts, 2, 20)) export default io; >io : Symbol(io, Decl(exportDefaultVariable.ts, 2, 11)) diff --git a/tests/baselines/reference/exportEqualsOfModule.symbols b/tests/baselines/reference/exportEqualsOfModule.symbols index ba689e0267352..c317cac68422b 100644 --- a/tests/baselines/reference/exportEqualsOfModule.symbols +++ b/tests/baselines/reference/exportEqualsOfModule.symbols @@ -2,14 +2,14 @@ === exportEqualsOfModule.ts === declare module '~popsicle/dist/request' { ->'~popsicle/dist/request' : Symbol("~popsicle/dist/request", Decl(exportEqualsOfModule.ts, 0, 0)) +>'~popsicle/dist/request' : Symbol('~popsicle/dist/request', Decl(exportEqualsOfModule.ts, 0, 0)) export class Request {} >Request : Symbol(Request, Decl(exportEqualsOfModule.ts, 0, 41)) } declare module '~popsicle/dist/common' { ->'~popsicle/dist/common' : Symbol("~popsicle/dist/common", Decl(exportEqualsOfModule.ts, 2, 1)) +>'~popsicle/dist/common' : Symbol('~popsicle/dist/common', Decl(exportEqualsOfModule.ts, 2, 1)) import { Request } from '~popsicle/dist/request'; >Request : Symbol(Request, Decl(exportEqualsOfModule.ts, 5, 12)) @@ -19,7 +19,7 @@ declare module '~popsicle/dist/common' { } declare module 'popsicle' { ->'popsicle' : Symbol("popsicle", Decl(exportEqualsOfModule.ts, 7, 1)) +>'popsicle' : Symbol('popsicle', Decl(exportEqualsOfModule.ts, 7, 1)) import alias = require('~popsicle/dist/common'); >alias : Symbol(alias, Decl(exportEqualsOfModule.ts, 9, 27)) @@ -29,7 +29,7 @@ declare module 'popsicle' { } declare module 'popsicle-proxy-agent' { ->'popsicle-proxy-agent' : Symbol("popsicle-proxy-agent", Decl(exportEqualsOfModule.ts, 12, 1)) +>'popsicle-proxy-agent' : Symbol('popsicle-proxy-agent', Decl(exportEqualsOfModule.ts, 12, 1)) import { Request } from 'popsicle'; >Request : Symbol(Request, Decl(exportEqualsOfModule.ts, 15, 12)) diff --git a/tests/baselines/reference/externalModuleReferenceDoubleUnderscore1.symbols b/tests/baselines/reference/externalModuleReferenceDoubleUnderscore1.symbols index b8ea008ed9164..ef3294b062919 100644 --- a/tests/baselines/reference/externalModuleReferenceDoubleUnderscore1.symbols +++ b/tests/baselines/reference/externalModuleReferenceDoubleUnderscore1.symbols @@ -2,7 +2,7 @@ === externalModuleReferenceDoubleUnderscore1.ts === declare module 'timezonecomplete' { ->'timezonecomplete' : Symbol("timezonecomplete", Decl(externalModuleReferenceDoubleUnderscore1.ts, 0, 0)) +>'timezonecomplete' : Symbol('timezonecomplete', Decl(externalModuleReferenceDoubleUnderscore1.ts, 0, 0)) import basics = require("__timezonecomplete/basics"); >basics : Symbol(basics, Decl(externalModuleReferenceDoubleUnderscore1.ts, 0, 35)) @@ -14,7 +14,7 @@ declare module 'timezonecomplete' { } declare module '__timezonecomplete/basics' { ->'__timezonecomplete/basics' : Symbol("__timezonecomplete/basics", Decl(externalModuleReferenceDoubleUnderscore1.ts, 3, 1)) +>'__timezonecomplete/basics' : Symbol('__timezonecomplete/basics', Decl(externalModuleReferenceDoubleUnderscore1.ts, 3, 1)) export enum TimeUnit { >TimeUnit : Symbol(TimeUnit, Decl(externalModuleReferenceDoubleUnderscore1.ts, 5, 44)) diff --git a/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc b/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc index 374cf77cbaab4..848cde8de9551 100644 --- a/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc @@ -61,7 +61,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -134,7 +134,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -221,7 +221,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -294,7 +294,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -381,7 +381,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -454,7 +454,7 @@ }, { "text": "\"prop1\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc b/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc index bdd4b8af5055c..85ea1c34a95f5 100644 --- a/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc @@ -61,7 +61,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -122,7 +122,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -209,7 +209,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -270,7 +270,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -357,7 +357,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -418,7 +418,7 @@ }, { "text": "42", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/findAllRefsIndexedAccessTypes.baseline.jsonc b/tests/baselines/reference/findAllRefsIndexedAccessTypes.baseline.jsonc index f41ee63fc2811..00538b5e427eb 100644 --- a/tests/baselines/reference/findAllRefsIndexedAccessTypes.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsIndexedAccessTypes.baseline.jsonc @@ -52,7 +52,7 @@ }, { "text": "0", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -208,7 +208,7 @@ }, { "text": "0", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/indexSignatures1.errors.txt b/tests/baselines/reference/indexSignatures1.errors.txt index 05d0436ca43c1..9c9bd6aa00621 100644 --- a/tests/baselines/reference/indexSignatures1.errors.txt +++ b/tests/baselines/reference/indexSignatures1.errors.txt @@ -65,7 +65,7 @@ indexSignatures1.ts(181,1): error TS7053: Element implicitly has an 'any' type b indexSignatures1.ts(182,1): error TS7053: Element implicitly has an 'any' type because expression of type 'TaggedString2' can't be used to index type '{ [key: string & Tag1 & Tag2]: string; }'. indexSignatures1.ts(183,1): error TS7053: Element implicitly has an 'any' type because expression of type 'TaggedString1 | TaggedString2' can't be used to index type '{ [key: string & Tag1 & Tag2]: string; }'. indexSignatures1.ts(277,7): error TS2322: Type '"&"' is not assignable to type '`&:${string}`'. -indexSignatures1.ts(281,35): error TS2353: Object literal may only specify known properties, and ''someKey'' does not exist in type 'PseudoDeclaration'. +indexSignatures1.ts(281,35): error TS2353: Object literal may only specify known properties, and '"someKey"' does not exist in type 'PseudoDeclaration'. indexSignatures1.ts(286,7): error TS2322: Type '"two"' is not assignable to type '`/${string}`'. indexSignatures1.ts(289,7): error TS2322: Type 'number' is not assignable to type 'PathsObject'. indexSignatures1.ts(312,43): error TS2353: Object literal may only specify known properties, and '[sym]' does not exist in type '{ [key: number]: string; }'. @@ -469,7 +469,7 @@ indexSignatures1.ts(312,43): error TS2353: Object literal may only specify known const test: PseudoDeclaration = { 'someKey' : 'someValue' }; // Error ~~~~~~~~~ -!!! error TS2353: Object literal may only specify known properties, and ''someKey'' does not exist in type 'PseudoDeclaration'. +!!! error TS2353: Object literal may only specify known properties, and '"someKey"' does not exist in type 'PseudoDeclaration'. type FieldPattern = `/${string}`; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsAugmentation.symbols b/tests/baselines/reference/isolatedDeclarationErrorsAugmentation.symbols index 3638ae560b175..a43cd7ac9f57c 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsAugmentation.symbols +++ b/tests/baselines/reference/isolatedDeclarationErrorsAugmentation.symbols @@ -5,7 +5,7 @@ import { ParentThing } from './parent'; >ParentThing : Symbol(ParentThing, Decl(child1.ts, 0, 8)) declare module './parent' { ->'./parent' : Symbol("parent", Decl(parent.ts, 0, 0), Decl(child1.ts, 0, 39)) +>'./parent' : Symbol('parent', Decl(parent.ts, 0, 0), Decl(child1.ts, 0, 39)) interface ParentThing { >ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27)) diff --git a/tests/baselines/reference/mergeMultipleInterfacesReexported.symbols b/tests/baselines/reference/mergeMultipleInterfacesReexported.symbols index d997c5a153bf5..271b6b19916c6 100644 --- a/tests/baselines/reference/mergeMultipleInterfacesReexported.symbols +++ b/tests/baselines/reference/mergeMultipleInterfacesReexported.symbols @@ -26,7 +26,7 @@ export interface EventList { === foo.ts === declare module './index' { ->'./index' : Symbol("index", Decl(index.ts, 0, 0), Decl(foo.ts, 0, 0), Decl(bar.ts, 0, 0)) +>'./index' : Symbol('index', Decl(index.ts, 0, 0), Decl(foo.ts, 0, 0), Decl(bar.ts, 0, 0)) interface EventList { >EventList : Symbol(EventList, Decl(eventList.ts, 0, 0), Decl(foo.ts, 0, 26), Decl(bar.ts, 0, 26)) @@ -40,7 +40,7 @@ export {}; === bar.ts === declare module './index' { ->'./index' : Symbol("index", Decl(index.ts, 0, 0), Decl(foo.ts, 0, 0), Decl(bar.ts, 0, 0)) +>'./index' : Symbol('index', Decl(index.ts, 0, 0), Decl(foo.ts, 0, 0), Decl(bar.ts, 0, 0)) interface EventList { >EventList : Symbol(EventList, Decl(eventList.ts, 0, 0), Decl(foo.ts, 0, 26), Decl(bar.ts, 0, 26)) diff --git a/tests/baselines/reference/mergeSymbolReexportInterface.symbols b/tests/baselines/reference/mergeSymbolReexportInterface.symbols index a958a96216ac6..74817dcebe8e0 100644 --- a/tests/baselines/reference/mergeSymbolReexportInterface.symbols +++ b/tests/baselines/reference/mergeSymbolReexportInterface.symbols @@ -18,7 +18,7 @@ const y : C = { s: '' } === ./a.d.ts === import '.' declare module '.' { ->'.' : Symbol("index", Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) +>'.' : Symbol('index', Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) type Row2 = { a: string } >Row2 : Symbol(Row2, Decl(a.d.ts, 1, 20)) diff --git a/tests/baselines/reference/mergeSymbolReexportedTypeAliasInstantiation.symbols b/tests/baselines/reference/mergeSymbolReexportedTypeAliasInstantiation.symbols index e76794961a96a..decbd0f514bf4 100644 --- a/tests/baselines/reference/mergeSymbolReexportedTypeAliasInstantiation.symbols +++ b/tests/baselines/reference/mergeSymbolReexportedTypeAliasInstantiation.symbols @@ -20,7 +20,7 @@ const y : C = { s: '' } === ./a.d.ts === import '.' declare module '.' { ->'.' : Symbol("index", Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) +>'.' : Symbol('index', Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) type Row2 = {} >Row2 : Symbol(Row2, Decl(a.d.ts, 1, 20)) diff --git a/tests/baselines/reference/mergeSymbolRexportFunction.symbols b/tests/baselines/reference/mergeSymbolRexportFunction.symbols index 3db7ac7a447b2..9ad0b18af426d 100644 --- a/tests/baselines/reference/mergeSymbolRexportFunction.symbols +++ b/tests/baselines/reference/mergeSymbolRexportFunction.symbols @@ -10,7 +10,7 @@ Row(); === ./a.d.ts === import '.' declare module '.' { ->'.' : Symbol("index", Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) +>'.' : Symbol('index', Decl(index.d.ts, 0, 0), Decl(a.d.ts, 0, 10)) const Row: () => void; >Row : Symbol(Row, Decl(a.d.ts, 2, 7)) diff --git a/tests/baselines/reference/mergedDeclarations7.symbols b/tests/baselines/reference/mergedDeclarations7.symbols index 7497ff1558771..e48fc2af13bbe 100644 --- a/tests/baselines/reference/mergedDeclarations7.symbols +++ b/tests/baselines/reference/mergedDeclarations7.symbols @@ -2,7 +2,7 @@ === passport.d.ts === declare module 'passport' { ->'passport' : Symbol("passport", Decl(passport.d.ts, 0, 0)) +>'passport' : Symbol('passport', Decl(passport.d.ts, 0, 0)) namespace passport { >passport : Symbol(passport, Decl(passport.d.ts, 0, 27), Decl(passport.d.ts, 11, 9)) diff --git a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt index 2a0331610b0f1..4989e231a5495 100644 --- a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt @@ -1,5 +1,5 @@ mergedInterfacesWithIndexers2.ts(4,5): error TS2413: 'number' index type 'string' is not assignable to 'string' index type '{ length: string; }'. -mergedInterfacesWithIndexers2.ts(14,5): error TS2411: Property ''a'' of type 'number' is not assignable to 'string' index type '{ length: number; }'. +mergedInterfacesWithIndexers2.ts(14,5): error TS2411: Property '"a"' of type 'number' is not assignable to 'string' index type '{ length: number; }'. mergedInterfacesWithIndexers2.ts(20,5): error TS2411: Property '1' of type '{ length: number; }' is not assignable to 'number' index type 'string'. @@ -21,7 +21,7 @@ mergedInterfacesWithIndexers2.ts(20,5): error TS2411: Property '1' of type '{ le [x: number]: string; 'a': number; //error ~~~ -!!! error TS2411: Property ''a'' of type 'number' is not assignable to 'string' index type '{ length: number; }'. +!!! error TS2411: Property '"a"' of type 'number' is not assignable to 'string' index type '{ length: number; }'. } diff --git a/tests/baselines/reference/moduleAugmentationOfAlias.symbols b/tests/baselines/reference/moduleAugmentationOfAlias.symbols index 656b4dda7ab01..5b00fe647eb12 100644 --- a/tests/baselines/reference/moduleAugmentationOfAlias.symbols +++ b/tests/baselines/reference/moduleAugmentationOfAlias.symbols @@ -10,7 +10,7 @@ export default I; === /b.ts === export {}; declare module './a' { ->'./a' : Symbol("/a", Decl(a.ts, 0, 0), Decl(b.ts, 0, 10)) +>'./a' : Symbol('/a', Decl(a.ts, 0, 0), Decl(b.ts, 0, 10)) export default interface I { x: number; } >I : Symbol(I, Decl(a.ts, 0, 0), Decl(b.ts, 1, 22)) diff --git a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols index 3e07239e55df8..e67d68cf41d69 100644 --- a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols +++ b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols @@ -2,7 +2,7 @@ === replace-in-file/types/index.d.ts === declare module 'replace-in-file' { ->'replace-in-file' : Symbol("replace-in-file", Decl(index.d.ts, 0, 0)) +>'replace-in-file' : Symbol('replace-in-file', Decl(index.d.ts, 0, 0)) export function replaceInFile(config: unknown): Promise; >replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 0, 34)) diff --git a/tests/baselines/reference/nodeColonModuleResolution.symbols b/tests/baselines/reference/nodeColonModuleResolution.symbols index 21be3a776f512..17e459346533d 100644 --- a/tests/baselines/reference/nodeColonModuleResolution.symbols +++ b/tests/baselines/reference/nodeColonModuleResolution.symbols @@ -2,7 +2,7 @@ === /a/b/node_modules/@types/node/ph.d.ts === declare module 'ph' { ->'ph' : Symbol("ph", Decl(ph.d.ts, 0, 0)) +>'ph' : Symbol('ph', Decl(ph.d.ts, 0, 0)) namespace constants { >constants : Symbol(constants, Decl(ph.d.ts, 0, 21)) @@ -42,7 +42,7 @@ declare module 'ph' { } } declare module 'node:ph' { ->'node:ph' : Symbol("node:ph", Decl(ph.d.ts, 14, 1)) +>'node:ph' : Symbol('node:ph', Decl(ph.d.ts, 14, 1)) export * from 'ph'; } diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.symbols b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols index 2277f333f1b29..e6d10911bdd2d 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.symbols +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols @@ -40,8 +40,8 @@ var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; >sameName5a : Symbol(sameName5a, Decl(objectLiteralGettersAndSetters.ts, 5, 3)) ->'\t' : Symbol('\t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) ->'\t' : Symbol('\t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) +>'\t' : Symbol('t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) +>'\t' : Symbol('t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) >n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) >p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 5, 63), Decl(objectLiteralGettersAndSetters.ts, 5, 74)) >n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) diff --git a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols index 5d202948d7e15..47ec910b735c8 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols +++ b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols @@ -92,7 +92,7 @@ var a: { >"a b" : Symbol("a b", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 30, 18)) "~!@#$%^&*()_+{}|:'<>?\/.,`": number; ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) } var r = a[" "]; @@ -113,7 +113,7 @@ var r3 = a["a b"]; var r4 = a["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >a : Symbol(a, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 29, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) var b = { >b : Symbol(b, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 41, 3)) @@ -125,7 +125,7 @@ var b = { >"a b" : Symbol("a b", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 42, 13)) "~!@#$%^&*()_+{}|:'<>?\/.,`": 1, ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) } var r = b[" "]; @@ -146,5 +146,5 @@ var r3 = b["a b"]; var r4 = b["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >b : Symbol(b, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 41, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.symbols b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.symbols index 601afde8525c4..fb41baf6215df 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.symbols +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.symbols @@ -86,7 +86,7 @@ export class c_public { // private elements // Export - Error ambient modules allowed only in global declare module 'm' { ->'m' : Symbol("m", Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require2.ts, 0, 0)) +>'m' : Symbol('m', Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require2.ts, 0, 0)) export class c_private { >c_private : Symbol(c_private, Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require2.ts, 2, 20)) @@ -99,7 +99,7 @@ declare module 'm' { === privacyTopLevelAmbientExternalModuleImportWithExport_require3.ts === declare module 'm2' { ->'m2' : Symbol("m2", Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require3.ts, 0, 0)) +>'m2' : Symbol('m2', Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require3.ts, 0, 0)) export class c_private { >c_private : Symbol(c_private, Decl(privacyTopLevelAmbientExternalModuleImportWithExport_require3.ts, 0, 21)) diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.symbols b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.symbols index 2d499c0ba7207..47715dc19ac8f 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.symbols +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.symbols @@ -86,7 +86,7 @@ export class c_public { // private elements // Export - Error ambient modules allowed only in global declare module 'm' { ->'m' : Symbol("m", Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require2.ts, 0, 0)) +>'m' : Symbol('m', Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require2.ts, 0, 0)) export class c_private { >c_private : Symbol(c_private, Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require2.ts, 2, 20)) @@ -98,7 +98,7 @@ declare module 'm' { === privacyTopLevelAmbientExternalModuleImportWithoutExport_require3.ts === declare module 'm2' { ->'m2' : Symbol("m2", Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require3.ts, 0, 0)) +>'m2' : Symbol('m2', Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require3.ts, 0, 0)) export class c_private { >c_private : Symbol(c_private, Decl(privacyTopLevelAmbientExternalModuleImportWithoutExport_require3.ts, 0, 21)) diff --git a/tests/baselines/reference/propertyAccess.errors.txt b/tests/baselines/reference/propertyAccess.errors.txt index 5032405b97e1f..9953b52d923cd 100644 --- a/tests/baselines/reference/propertyAccess.errors.txt +++ b/tests/baselines/reference/propertyAccess.errors.txt @@ -1,4 +1,4 @@ -propertyAccess.ts(11,55): error TS2353: Object literal may only specify known properties, and ''three'' does not exist in type '{ [n: number]: string; }'. +propertyAccess.ts(11,55): error TS2353: Object literal may only specify known properties, and '"three"' does not exist in type '{ [n: number]: string; }'. propertyAccess.ts(45,14): error TS2339: Property 'qqq' does not exist on type '{ 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; "literal property": number; }'. propertyAccess.ts(80,19): error TS2538: Type '{ name: string; }' cannot be used as an index type. propertyAccess.ts(117,18): error TS2538: Type '{ name: string; }' cannot be used as an index type. @@ -19,7 +19,7 @@ propertyAccess.ts(149,5): error TS2403: Subsequent variable declarations must ha var numIndex: { [n: number]: string } = { 3: 'three', 'three': 'three' }; ~~~~~~~ -!!! error TS2353: Object literal may only specify known properties, and ''three'' does not exist in type '{ [n: number]: string; }'. +!!! error TS2353: Object literal may only specify known properties, and '"three"' does not exist in type '{ [n: number]: string; }'. var strIndex: { [n: string]: Compass } = { 'N': Compass.North, 'E': Compass.East }; var bothIndex: { diff --git a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.symbols b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.symbols index 307638c6652a0..42dc62ec870ab 100644 --- a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.symbols +++ b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.symbols @@ -40,7 +40,7 @@ var y: Foo2; === propertyIdentityWithPrivacyMismatch_0.ts === declare module 'mod1' { ->'mod1' : Symbol("mod1", Decl(propertyIdentityWithPrivacyMismatch_0.ts, 0, 0)) +>'mod1' : Symbol('mod1', Decl(propertyIdentityWithPrivacyMismatch_0.ts, 0, 0)) class Foo { >Foo : Symbol(Foo, Decl(propertyIdentityWithPrivacyMismatch_0.ts, 0, 23)) @@ -50,7 +50,7 @@ declare module 'mod1' { } } declare module 'mod2' { ->'mod2' : Symbol("mod2", Decl(propertyIdentityWithPrivacyMismatch_0.ts, 4, 1)) +>'mod2' : Symbol('mod2', Decl(propertyIdentityWithPrivacyMismatch_0.ts, 4, 1)) class Foo { >Foo : Symbol(Foo, Decl(propertyIdentityWithPrivacyMismatch_0.ts, 5, 23)) diff --git a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline index f070027118beb..d748422d4cd9d 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline @@ -95,7 +95,7 @@ }, { "text": "1", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -297,7 +297,7 @@ }, { "text": "\"stringLiteralName\"", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -367,7 +367,7 @@ }, { "text": "1", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -437,7 +437,7 @@ }, { "text": "1", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -705,7 +705,7 @@ }, { "text": "\"stringLiteralName\"", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", diff --git a/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline b/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline index 4a209d3197680..1ca7ec6b8bfd3 100644 --- a/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline +++ b/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline @@ -57,7 +57,7 @@ }, { "text": "'a:b'", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/quotedModuleNameMustBeAmbient.symbols b/tests/baselines/reference/quotedModuleNameMustBeAmbient.symbols index 6123b9bb20b81..ce33a12366399 100644 --- a/tests/baselines/reference/quotedModuleNameMustBeAmbient.symbols +++ b/tests/baselines/reference/quotedModuleNameMustBeAmbient.symbols @@ -2,8 +2,8 @@ === quotedModuleNameMustBeAmbient.ts === module 'M' {} ->'M' : Symbol("M", Decl(quotedModuleNameMustBeAmbient.ts, 0, 0)) +>'M' : Symbol('M', Decl(quotedModuleNameMustBeAmbient.ts, 0, 0)) declare module 'M2' {} ->'M2' : Symbol("M2", Decl(quotedModuleNameMustBeAmbient.ts, 0, 13)) +>'M2' : Symbol('M2', Decl(quotedModuleNameMustBeAmbient.ts, 0, 13)) diff --git a/tests/baselines/reference/referencesForEnums.baseline.jsonc b/tests/baselines/reference/referencesForEnums.baseline.jsonc index 988222c4a58f7..5b1ef794e99d0 100644 --- a/tests/baselines/reference/referencesForEnums.baseline.jsonc +++ b/tests/baselines/reference/referencesForEnums.baseline.jsonc @@ -387,7 +387,7 @@ }, { "text": "111", - "kind": "stringLiteral" + "kind": "enumMemberName" }, { "text": "]", @@ -735,7 +735,7 @@ }, { "text": "111", - "kind": "stringLiteral" + "kind": "enumMemberName" }, { "text": "]", diff --git a/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc b/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc index 537d3baae48bb..80afd42f5b874 100644 --- a/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc +++ b/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc @@ -52,7 +52,7 @@ }, { "text": "12", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc b/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc index 2e6f9b4d52d41..924db23e48f6d 100644 --- a/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc +++ b/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc @@ -53,7 +53,7 @@ }, { "text": "\"ss\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/referencesForStringLiteralPropertyNames2.baseline.jsonc b/tests/baselines/reference/referencesForStringLiteralPropertyNames2.baseline.jsonc index cb84d0363179d..d4e30362603ed 100644 --- a/tests/baselines/reference/referencesForStringLiteralPropertyNames2.baseline.jsonc +++ b/tests/baselines/reference/referencesForStringLiteralPropertyNames2.baseline.jsonc @@ -50,7 +50,7 @@ }, { "text": "\"blah\"", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -134,7 +134,7 @@ }, { "text": "\"blah\"", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", @@ -218,7 +218,7 @@ }, { "text": "\"blah\"", - "kind": "stringLiteral" + "kind": "methodName" }, { "text": "]", diff --git a/tests/baselines/reference/referencesForStringLiteralPropertyNames3.baseline.jsonc b/tests/baselines/reference/referencesForStringLiteralPropertyNames3.baseline.jsonc index 17b97dce89a8c..fd360d29cf988 100644 --- a/tests/baselines/reference/referencesForStringLiteralPropertyNames3.baseline.jsonc +++ b/tests/baselines/reference/referencesForStringLiteralPropertyNames3.baseline.jsonc @@ -52,7 +52,7 @@ }, { "text": "\"42\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -130,7 +130,7 @@ }, { "text": "\"42\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -208,7 +208,7 @@ }, { "text": "\"42\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -286,7 +286,7 @@ }, { "text": "\"42\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", @@ -364,7 +364,7 @@ }, { "text": "\"42\"", - "kind": "stringLiteral" + "kind": "propertyName" }, { "text": "]", diff --git a/tests/baselines/reference/selfNameModuleAugmentation.symbols b/tests/baselines/reference/selfNameModuleAugmentation.symbols index eb78bcbda7236..6323a13fd3d78 100644 --- a/tests/baselines/reference/selfNameModuleAugmentation.symbols +++ b/tests/baselines/reference/selfNameModuleAugmentation.symbols @@ -3,7 +3,7 @@ === /node_modules/acorn-walk/dist/walk.d.ts === export {}; declare module 'acorn-walk' { ->'acorn-walk' : Symbol("/node_modules/acorn-walk/dist/walk", Decl(walk.d.ts, 0, 0), Decl(walk.d.ts, 0, 10)) +>'acorn-walk' : Symbol('/node_modules/acorn-walk/dist/walk', Decl(walk.d.ts, 0, 0), Decl(walk.d.ts, 0, 10)) export function simple(node: any, visitors: any, base?: any, state?: any): any; >simple : Symbol(simple, Decl(walk.d.ts, 1, 29)) diff --git a/tests/baselines/reference/spellingSuggestionModule.symbols b/tests/baselines/reference/spellingSuggestionModule.symbols index 78c54aa11a67c..19366bed158fd 100644 --- a/tests/baselines/reference/spellingSuggestionModule.symbols +++ b/tests/baselines/reference/spellingSuggestionModule.symbols @@ -8,7 +8,7 @@ declare module "foobar" { export const x: number; } foobar; declare module 'barfoo' { export const x: number; } ->'barfoo' : Symbol("barfoo", Decl(spellingSuggestionModule.ts, 1, 7)) +>'barfoo' : Symbol('barfoo', Decl(spellingSuggestionModule.ts, 1, 7)) >x : Symbol(x, Decl(spellingSuggestionModule.ts, 3, 38)) barfoo; diff --git a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols index ae21a9ceb5c32..b06603b7a5c5e 100644 --- a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols +++ b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols @@ -3,14 +3,11 @@ === stringLiteralPropertyNameWithLineContinuation1.ts === var x = {'text\ >x : Symbol(x, Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 3)) ->'text\' : Symbol('text\ -', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>'text\' : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) ':'hello'} x.text = "bar" ->x.text : Symbol('text\ -', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>x.text : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) >x : Symbol(x, Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 3)) ->text : Symbol('text\ -', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>text : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) diff --git a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt index 3a4205341f95c..6d33ae6d1cffb 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt @@ -2,13 +2,13 @@ subtypingWithObjectMembers.ts(14,5): error TS2416: Property 'bar' in type 'B' is Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers.ts(24,5): error TS2416: Property '2' in type 'B2' is not assignable to the same property in base type 'A2'. Type 'string' is not assignable to type 'Base'. -subtypingWithObjectMembers.ts(34,5): error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. +subtypingWithObjectMembers.ts(34,5): error TS2416: Property '"2.0"' in type 'B3' is not assignable to the same property in base type 'A3'. Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers.ts(45,9): error TS2416: Property 'bar' in type 'B' is not assignable to the same property in base type 'A'. Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers.ts(55,9): error TS2416: Property '2' in type 'B2' is not assignable to the same property in base type 'A2'. Type 'string' is not assignable to type 'Base'. -subtypingWithObjectMembers.ts(65,9): error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. +subtypingWithObjectMembers.ts(65,9): error TS2416: Property '"2.0"' in type 'B3' is not assignable to the same property in base type 'A3'. Type 'string' is not assignable to type 'Base'. @@ -54,7 +54,7 @@ subtypingWithObjectMembers.ts(65,9): error TS2416: Property ''2.0'' in type 'B3' '1': Derived; // ok '2.0': string; // error ~~~~~ -!!! error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. +!!! error TS2416: Property '"2.0"' in type 'B3' is not assignable to the same property in base type 'A3'. !!! error TS2416: Type 'string' is not assignable to type 'Base'. } @@ -94,7 +94,7 @@ subtypingWithObjectMembers.ts(65,9): error TS2416: Property ''2.0'' in type 'B3' '1': Derived2; // ok '2.0': string; // error ~~~~~ -!!! error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. +!!! error TS2416: Property '"2.0"' in type 'B3' is not assignable to the same property in base type 'A3'. !!! error TS2416: Type 'string' is not assignable to type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt index 391292aadbd24..6594056bfd79a 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt @@ -5,7 +5,7 @@ subtypingWithObjectMembers2.ts(27,15): error TS2430: Interface 'B2' incorrectly Types of property '2.0' are incompatible. Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers2.ts(37,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. - Types of property ''2.0'' are incompatible. + Types of property '"2.0"' are incompatible. Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers2.ts(50,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. Types of property 'bar' are incompatible. @@ -14,7 +14,7 @@ subtypingWithObjectMembers2.ts(60,15): error TS2430: Interface 'B2' incorrectly Types of property '2.0' are incompatible. Type 'string' is not assignable to type 'Base'. subtypingWithObjectMembers2.ts(70,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. - Types of property ''2.0'' are incompatible. + Types of property '"2.0"' are incompatible. Type 'string' is not assignable to type 'Base'. @@ -66,7 +66,7 @@ subtypingWithObjectMembers2.ts(70,15): error TS2430: Interface 'B3' incorrectly interface B3 extends A3 { ~~ !!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. -!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Types of property '"2.0"' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'Base'. '1': Derived; // ok '2.0': string; // error @@ -111,7 +111,7 @@ subtypingWithObjectMembers2.ts(70,15): error TS2430: Interface 'B3' incorrectly interface B3 extends A3 { ~~ !!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. -!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Types of property '"2.0"' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'Base'. '1'?: Derived; // ok '2.0'?: string; // error diff --git a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt index c69465b1ee1cf..015a8c1b98acf 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt @@ -5,7 +5,7 @@ subtypingWithObjectMembers3.ts(27,15): error TS2430: Interface 'B2' incorrectly Types of property '2.0' are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. subtypingWithObjectMembers3.ts(37,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. - Types of property ''2.0'' are incompatible. + Types of property '"2.0"' are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. subtypingWithObjectMembers3.ts(49,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. Types of property 'bar' are incompatible. @@ -14,7 +14,7 @@ subtypingWithObjectMembers3.ts(59,15): error TS2430: Interface 'B2' incorrectly Types of property '2.0' are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. subtypingWithObjectMembers3.ts(69,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. - Types of property ''2.0'' are incompatible. + Types of property '"2.0"' are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. @@ -68,7 +68,7 @@ subtypingWithObjectMembers3.ts(69,15): error TS2430: Interface 'B3' incorrectly interface B3 extends A3 { ~~ !!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. -!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Types of property '"2.0"' are incompatible. !!! error TS2430: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 subtypingWithObjectMembers3.ts:6:5: 'bar' is declared here. '1': Derived; // ok @@ -115,7 +115,7 @@ subtypingWithObjectMembers3.ts(69,15): error TS2430: Interface 'B3' incorrectly interface B3 extends A3 { ~~ !!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. -!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Types of property '"2.0"' are incompatible. !!! error TS2430: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 subtypingWithObjectMembers3.ts:6:5: 'bar' is declared here. '1'?: Derived; // ok diff --git a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt index d5251e2ce7a70..7a63f72e8e94a 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt @@ -3,7 +3,7 @@ subtypingWithObjectMembers5.ts(16,11): error TS2420: Class 'B' incorrectly imple subtypingWithObjectMembers5.ts(24,11): error TS2420: Class 'B2' incorrectly implements interface 'A2'. Property '1' is missing in type 'B2' but required in type 'A2'. subtypingWithObjectMembers5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. - Property ''1'' is missing in type 'B3' but required in type 'A3'. + Property '"1"' is missing in type 'B3' but required in type 'A3'. subtypingWithObjectMembers5.ts(43,11): error TS2559: Type 'B' has no properties in common with type 'A'. subtypingWithObjectMembers5.ts(51,11): error TS2559: Type 'B2' has no properties in common with type 'A2'. subtypingWithObjectMembers5.ts(59,11): error TS2559: Type 'B3' has no properties in common with type 'A3'. @@ -52,8 +52,8 @@ subtypingWithObjectMembers5.ts(59,11): error TS2559: Type 'B3' has no properties class B3 implements A3 { ~~ !!! error TS2420: Class 'B3' incorrectly implements interface 'A3'. -!!! error TS2420: Property ''1'' is missing in type 'B3' but required in type 'A3'. -!!! related TS2728 subtypingWithObjectMembers5.ts:29:9: ''1'' is declared here. +!!! error TS2420: Property '"1"' is missing in type 'B3' but required in type 'A3'. +!!! related TS2728 subtypingWithObjectMembers5.ts:29:9: '"1"' is declared here. '1.0': Derived; // error } } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt index 2c8de6bbbc10e..522b7c691317c 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt @@ -3,7 +3,7 @@ subtypingWithObjectMembersAccessibility.ts(15,7): error TS2415: Class 'B' incorr subtypingWithObjectMembersAccessibility.ts(23,7): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'B2' but not in type 'A2'. subtypingWithObjectMembersAccessibility.ts(31,7): error TS2415: Class 'B3' incorrectly extends base class 'A3'. - Property ''1'' is private in type 'B3' but not in type 'A3'. + Property '"1"' is private in type 'B3' but not in type 'A3'. ==== subtypingWithObjectMembersAccessibility.ts (3 errors) ==== @@ -46,6 +46,6 @@ subtypingWithObjectMembersAccessibility.ts(31,7): error TS2415: Class 'B3' incor class B3 extends A3 { ~~ !!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. -!!! error TS2415: Property ''1'' is private in type 'B3' but not in type 'A3'. +!!! error TS2415: Property '"1"' is private in type 'B3' but not in type 'A3'. private '1': Derived; // error } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt index bb4fec3208f26..72122d70ab807 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt @@ -3,13 +3,13 @@ subtypingWithObjectMembersAccessibility2.ts(16,11): error TS2415: Class 'B' inco subtypingWithObjectMembersAccessibility2.ts(24,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'A2' but not in type 'B2'. subtypingWithObjectMembersAccessibility2.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'. - Property ''1'' is private in type 'A3' but not in type 'B3'. + Property '"1"' is private in type 'A3' but not in type 'B3'. subtypingWithObjectMembersAccessibility2.ts(42,11): error TS2415: Class 'B' incorrectly extends base class 'A'. Property 'foo' is private in type 'A' but not in type 'B'. subtypingWithObjectMembersAccessibility2.ts(50,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'A2' but not in type 'B2'. subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'. - Property ''1'' is private in type 'A3' but not in type 'B3'. + Property '"1"' is private in type 'A3' but not in type 'B3'. ==== subtypingWithObjectMembersAccessibility2.ts (6 errors) ==== @@ -53,7 +53,7 @@ subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2415: Class 'B3' inc class B3 extends A3 { ~~ !!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. -!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! error TS2415: Property '"1"' is private in type 'A3' but not in type 'B3'. public '1': Derived; // error } } @@ -88,7 +88,7 @@ subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2415: Class 'B3' inc class B3 extends A3 { ~~ !!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. -!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! error TS2415: Property '"1"' is private in type 'A3' but not in type 'B3'. '1': Derived; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt index f1da945fefdee..58de4ac519fa4 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt @@ -3,7 +3,7 @@ subtypingWithObjectMembersOptionality2.ts(10,11): error TS2430: Interface 'S' in subtypingWithObjectMembersOptionality2.ts(18,11): error TS2430: Interface 'S2' incorrectly extends interface 'T2'. Property '1' is optional in type 'S2' but required in type 'T2'. subtypingWithObjectMembersOptionality2.ts(26,11): error TS2430: Interface 'S3' incorrectly extends interface 'T3'. - Property ''1'' is optional in type 'S3' but required in type 'T3'. + Property '"1"' is optional in type 'S3' but required in type 'T3'. ==== subtypingWithObjectMembersOptionality2.ts (3 errors) ==== @@ -41,7 +41,7 @@ subtypingWithObjectMembersOptionality2.ts(26,11): error TS2430: Interface 'S3' i interface S3 extends T3 { ~~ !!! error TS2430: Interface 'S3' incorrectly extends interface 'T3'. -!!! error TS2430: Property ''1'' is optional in type 'S3' but required in type 'T3'. +!!! error TS2430: Property '"1"' is optional in type 'S3' but required in type 'T3'. '1'?: Derived; // error } diff --git a/tests/baselines/reference/tsxDynamicTagName5.symbols b/tests/baselines/reference/tsxDynamicTagName5.symbols index e7934a81cb17b..05d77bb4cdc24 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.symbols +++ b/tests/baselines/reference/tsxDynamicTagName5.symbols @@ -2,7 +2,7 @@ === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) class Component { } >Component : Symbol(Component, Decl(react.d.ts, 0, 24)) diff --git a/tests/baselines/reference/tsxDynamicTagName7.symbols b/tests/baselines/reference/tsxDynamicTagName7.symbols index 32a127cee00e2..3584e277180d9 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.symbols +++ b/tests/baselines/reference/tsxDynamicTagName7.symbols @@ -2,7 +2,7 @@ === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) class Component { } >Component : Symbol(Component, Decl(react.d.ts, 0, 24)) diff --git a/tests/baselines/reference/tsxDynamicTagName8.symbols b/tests/baselines/reference/tsxDynamicTagName8.symbols index 848aa36621a67..a7516964dd390 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.symbols +++ b/tests/baselines/reference/tsxDynamicTagName8.symbols @@ -2,7 +2,7 @@ === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) class Component { } >Component : Symbol(Component, Decl(react.d.ts, 0, 24)) diff --git a/tests/baselines/reference/tsxDynamicTagName9.symbols b/tests/baselines/reference/tsxDynamicTagName9.symbols index bb8fba0b47309..f986fa4c75b77 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.symbols +++ b/tests/baselines/reference/tsxDynamicTagName9.symbols @@ -2,7 +2,7 @@ === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) class Component { } >Component : Symbol(Component, Decl(react.d.ts, 0, 24)) diff --git a/tests/baselines/reference/tsxElementResolution17.symbols b/tests/baselines/reference/tsxElementResolution17.symbols index 2bac16d001516..5a3c0ff48e88c 100644 --- a/tests/baselines/reference/tsxElementResolution17.symbols +++ b/tests/baselines/reference/tsxElementResolution17.symbols @@ -26,7 +26,7 @@ declare module JSX { } declare module 'elements1' { ->'elements1' : Symbol("elements1", Decl(file.tsx, 3, 1)) +>'elements1' : Symbol('elements1', Decl(file.tsx, 3, 1)) class MyElement { >MyElement : Symbol(MyElement, Decl(file.tsx, 5, 28)) @@ -35,7 +35,7 @@ declare module 'elements1' { } declare module 'elements2' { ->'elements2' : Symbol("elements2", Decl(file.tsx, 9, 1)) +>'elements2' : Symbol('elements2', Decl(file.tsx, 9, 1)) class MyElement { >MyElement : Symbol(MyElement, Decl(file.tsx, 11, 28)) diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.symbols b/tests/baselines/reference/tsxExternalModuleEmit1.symbols index 15abbcf2f67f0..7833e45ab5087 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.symbols +++ b/tests/baselines/reference/tsxExternalModuleEmit1.symbols @@ -2,7 +2,7 @@ === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) class Component { } >Component : Symbol(Component, Decl(react.d.ts, 0, 24)) diff --git a/tests/baselines/reference/tsxExternalModuleEmit2.symbols b/tests/baselines/reference/tsxExternalModuleEmit2.symbols index decda51b4cdcd..964a0dd5b9be1 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit2.symbols +++ b/tests/baselines/reference/tsxExternalModuleEmit2.symbols @@ -2,7 +2,7 @@ === modules.d.ts === declare module 'mod' { ->'mod' : Symbol("mod", Decl(modules.d.ts, 0, 0)) +>'mod' : Symbol('mod', Decl(modules.d.ts, 0, 0)) var y: any; >y : Symbol(y, Decl(modules.d.ts, 1, 5)) diff --git a/tests/baselines/reference/tsxPreserveEmit1.symbols b/tests/baselines/reference/tsxPreserveEmit1.symbols index 953dd3342cb28..4558cf868d10b 100644 --- a/tests/baselines/reference/tsxPreserveEmit1.symbols +++ b/tests/baselines/reference/tsxPreserveEmit1.symbols @@ -35,7 +35,7 @@ module M { === react.d.ts === declare module 'react' { ->'react' : Symbol("react", Decl(react.d.ts, 0, 0)) +>'react' : Symbol('react', Decl(react.d.ts, 0, 0)) var x: any; >x : Symbol(x, Decl(react.d.ts, 1, 4)) @@ -54,7 +54,7 @@ declare module ReactRouter { >Thing : Symbol(Thing, Decl(react.d.ts, 6, 16)) } declare module 'react-router' { ->'react-router' : Symbol("react-router", Decl(react.d.ts, 8, 1)) +>'react-router' : Symbol('react-router', Decl(react.d.ts, 8, 1)) export = ReactRouter; >ReactRouter : Symbol(ReactRouter, Decl(react.d.ts, 3, 1)) diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index 5141906bd95e5..756fc5d779772 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -55,14 +55,14 @@ typeGuardFunctionErrors.ts(136,39): error TS1230: A type predicate cannot refere typeGuardFunctionErrors.ts(152,68): error TS2344: Type 'T | "d"' does not satisfy the constraint 'Keys'. Type '"d"' is not assignable to type 'Keys'. typeGuardFunctionErrors.ts(159,31): error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. - Types of property ''a'' are incompatible. + Types of property '"a"' are incompatible. Type 'number' is not assignable to type 'string'. typeGuardFunctionErrors.ts(162,31): error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. - Types of property ''a'' are incompatible. + Types of property '"a"' are incompatible. Type 'number' is not assignable to type 'string'. typeGuardFunctionErrors.ts(163,35): error TS2344: Type 'number' does not satisfy the constraint 'Foo'. typeGuardFunctionErrors.ts(164,51): error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. - Types of property ''a'' are incompatible. + Types of property '"a"' are incompatible. Type 'number' is not assignable to type 'string'. typeGuardFunctionErrors.ts(165,51): error TS2344: Type 'number' does not satisfy the constraint 'Foo'. typeGuardFunctionErrors.ts(166,45): error TS2677: A type predicate's type must be assignable to its parameter's type. @@ -339,14 +339,14 @@ typeGuardFunctionErrors.ts(166,54): error TS2344: Type 'number' does not satisfy isFoo(): this is NeedsFoo; // should error ~~~ !!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. -!!! error TS2344: Types of property ''a'' are incompatible. +!!! error TS2344: Types of property '"a"' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. }; declare var anError: NeedsFoo; // error, as expected ~~~ !!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. -!!! error TS2344: Types of property ''a'' are incompatible. +!!! error TS2344: Types of property '"a"' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. declare var alsoAnError: NeedsFoo; // also error, as expected ~~~~~~ @@ -354,7 +354,7 @@ typeGuardFunctionErrors.ts(166,54): error TS2344: Type 'number' does not satisfy declare function newError1(x: any): x is NeedsFoo; // should error ~~~ !!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. -!!! error TS2344: Types of property ''a'' are incompatible. +!!! error TS2344: Types of property '"a"' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. declare function newError2(x: any): x is NeedsFoo; // should error ~~~~~~ From 1f2c52cf7ad47bd04a4db43db226b474bf4d00ff Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 19 Dec 2024 17:42:55 +0000 Subject: [PATCH 5/5] Improve preservation of strings in symbol printing. --- src/compiler/checker.ts | 44 ++++++++++++------- ...dPropertyNamesDeclarationEmit1_ES5.symbols | 6 +-- ...dPropertyNamesDeclarationEmit1_ES6.symbols | 6 +-- ...dPropertyNamesDeclarationEmit2_ES5.symbols | 6 +-- ...dPropertyNamesDeclarationEmit2_ES6.symbols | 6 +-- ...dPropertyNamesDeclarationEmit3_ES5.symbols | 2 +- ...dPropertyNamesDeclarationEmit3_ES6.symbols | 2 +- .../declarationEmitEscapedSymbolNames.js | 42 ++++++++++++++++++ .../declarationEmitEscapedSymbolNames.symbols | 17 +++++++ .../declarationEmitEscapedSymbolNames.types | 32 ++++++++++++++ ...clarationEmitLateBoundAssignments2.symbols | 4 +- .../decoratorsOnComputedProperties.symbols | 24 +++++----- .../objectLiteralGettersAndSetters.symbols | 4 +- ...ngNamedPropertyOfIllegalCharacters.symbols | 18 ++++---- ...lPropertyNameWithLineContinuation1.symbols | 9 ++-- .../declarationEmitEscapedSymbolNames.ts | 9 ++++ 16 files changed, 172 insertions(+), 59 deletions(-) create mode 100644 tests/baselines/reference/declarationEmitEscapedSymbolNames.js create mode 100644 tests/baselines/reference/declarationEmitEscapedSymbolNames.symbols create mode 100644 tests/baselines/reference/declarationEmitEscapedSymbolNames.types create mode 100644 tests/cases/compiler/declarationEmitEscapedSymbolNames.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index eee630f8dd4de..e583c487d451e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8390,7 +8390,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let symbolName: string | undefined; if (index === 0) { context.flags |= NodeBuilderFlags.InInitialEntityName; - symbolName = getNameOfSymbolAsWritten(symbol, context); + symbolName = getNameOfSymbolAsWritten(symbol, context).symbolName; context.approximateLength += (symbolName ? symbolName.length : 0) + 1; context.flags ^= NodeBuilderFlags.InInitialEntityName; } @@ -8415,7 +8415,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return LHS; } - symbolName = getNameOfSymbolAsWritten(symbol, context); + symbolName = getNameOfSymbolAsWritten(symbol, context).symbolName; } context.approximateLength += symbolName.length + 1; @@ -8521,7 +8521,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (index === 0) { context.flags |= NodeBuilderFlags.InInitialEntityName; } - const symbolName = getNameOfSymbolAsWritten(symbol, context); + const { symbolName } = getNameOfSymbolAsWritten(symbol, context); if (index === 0) { context.flags ^= NodeBuilderFlags.InInitialEntityName; } @@ -8546,12 +8546,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (index === 0) { context.flags |= NodeBuilderFlags.InInitialEntityName; } - let symbolName = getNameOfSymbolAsWritten(symbol, context); + let { symbolName, symbolNameSource } = getNameOfSymbolAsWritten(symbol, context); if (index === 0) { context.flags ^= NodeBuilderFlags.InInitialEntityName; } let firstChar = symbolName.charCodeAt(0); + const overrideSourceStringDelimiter = context.flags & (NodeBuilderFlags.UseDoubleQuotesForStringLiteralType | NodeBuilderFlags.UseSingleQuotesForStringLiteralType); let useSingleQuote = !(context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) && (!!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType) || firstChar === CharacterCodes.singleQuote); @@ -8569,12 +8570,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (firstChar === CharacterCodes.openBracket) { symbolName = symbolName.substring(1, symbolName.length - 1); firstChar = symbolName.charCodeAt(0); + symbolNameSource = symbolNameSource && isComputedPropertyName(symbolNameSource) && isPropertyNameLiteral(symbolNameSource.expression) ? symbolNameSource.expression : undefined; useSingleQuote = !(context.flags & NodeBuilderFlags.UseDoubleQuotesForStringLiteralType) && (!!(context.flags & NodeBuilderFlags.UseSingleQuotesForStringLiteralType) || firstChar === CharacterCodes.singleQuote); } let expression: Expression | undefined; - if (isSingleOrDoubleQuote(firstChar) && !(symbol.flags & SymbolFlags.EnumMember)) { - const stringLiteralName = factory.createStringLiteral(stripQuotes(symbolName).replace(/\\./g, s => s.substring(1)), useSingleQuote); + if (isSingleOrDoubleQuote(firstChar) && !(symbol.flags & SymbolFlags.EnumMember) && symbolNameSource && isPropertyNameLiteral(symbolNameSource)) { + const stringLiteralName = !overrideSourceStringDelimiter ? factory.createStringLiteralFromNode(symbolNameSource) : + factory.createStringLiteral(getTextOfIdentifierOrLiteral(symbolNameSource), useSingleQuote); stringLiteralName.symbol = symbol; expression = stringLiteralName; } @@ -10547,7 +10550,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (localName === InternalSymbolName.Default || localName === InternalSymbolName.Class || localName === InternalSymbolName.Function) { const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.InInitialEntityName; - const nameCandidate = getNameOfSymbolAsWritten(symbol, context); + const nameCandidate = getNameOfSymbolAsWritten(symbol, context).symbolName; restoreFlags(); localName = nameCandidate.length > 0 && isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? stripQuotes(nameCandidate) : nameCandidate; } @@ -10657,7 +10660,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return name; } if (nameType.flags & TypeFlags.UniqueESSymbol) { - return `[${getNameOfSymbolAsWritten((nameType as UniqueESSymbolType).symbol, context)}]`; + return `[${getNameOfSymbolAsWritten((nameType as UniqueESSymbolType).symbol, context).symbolName}]`; } } } @@ -10669,7 +10672,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * Unlike `symbolName(symbol)`, this will include quotes if the name is from a string literal. * It will also use a representation of a number as written instead of a decimal form, e.g. `0o11` instead of `9`. */ - function getNameOfSymbolAsWritten(symbol: Symbol, context?: NodeBuilderContext): string { + function getNameOfSymbolAsWritten(symbol: Symbol, context?: NodeBuilderContext): { symbolName: string; symbolNameSource?: DeclarationName; } { if (context?.remappedSymbolReferences?.has(getSymbolId(symbol))) { symbol = context.remappedSymbolReferences.get(getSymbolId(symbol))!; } @@ -10682,14 +10685,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // if not in the same binding context (source file, module declaration), it must print as `default` (context.enclosingDeclaration && findAncestor(symbol.declarations[0], isDefaultBindingContext) !== findAncestor(context.enclosingDeclaration, isDefaultBindingContext))) ) { - return "default"; + return { symbolName: "default", symbolNameSource: undefined }; } if (symbol.declarations && symbol.declarations.length) { let declaration = firstDefined(symbol.declarations, d => getNameOfDeclaration(d) ? d : undefined); // Try using a declaration with a name, first const name = declaration && getNameOfDeclaration(declaration); if (declaration && name) { if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) { - return symbolName(symbol); + return { symbolName: symbolName(symbol), symbolNameSource: name }; } if (isComputedPropertyName(name) && !(getCheckFlags(symbol) & CheckFlags.Late)) { const nameType = getSymbolLinks(symbol).nameType; @@ -10697,17 +10700,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name const result = getNameOfSymbolFromNameType(symbol, context); if (result !== undefined) { - return result; + return { symbolName: result, symbolNameSource: name }; } } } - return declarationNameToString(name); + return { symbolName: declarationNameToString(name), symbolNameSource: name }; } if (!declaration) { declaration = symbol.declarations[0]; // Declaration may be nameless, but we'll try anyway } if (declaration.parent && declaration.parent.kind === SyntaxKind.VariableDeclaration) { - return declarationNameToString((declaration.parent as VariableDeclaration).name); + const name = (declaration.parent as VariableDeclaration).name; + return { symbolName: declarationNameToString(name), symbolNameSource: name }; } switch (declaration.kind) { case SyntaxKind.ClassExpression: @@ -10716,11 +10720,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (context && !context.encounteredError && !(context.flags & NodeBuilderFlags.AllowAnonymousIdentifier)) { context.encounteredError = true; } - return declaration.kind === SyntaxKind.ClassExpression ? "(Anonymous class)" : "(Anonymous function)"; + return { + symbolName: declaration.kind === SyntaxKind.ClassExpression ? "(Anonymous class)" : "(Anonymous function)", + symbolNameSource: undefined, + }; } } const name = getNameOfSymbolFromNameType(symbol, context); - return name !== undefined ? name : symbolName(symbol); + return { + symbolName: name !== undefined ? name : symbolName(symbol), + symbolNameSource: undefined, + }; } function isDeclarationVisible(node: Node): boolean { @@ -41672,7 +41682,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // fall through case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; - const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); + const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)).symbolName; error(memberNameNode, message, memberName, className); break; } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.symbols index 17adc43d40a97..c341eed21ab8e 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.symbols @@ -5,12 +5,12 @@ class C { >C : Symbol(C, Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 0, 0)) ["" + ""]() { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 0, 9)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 0, 9)) get ["" + ""]() { return 0; } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 1, 19)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 1, 19)) set ["" + ""](x) { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 2, 33)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 2, 33)) >x : Symbol(x, Decl(computedPropertyNamesDeclarationEmit1_ES5.ts, 3, 18)) } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.symbols index 3e89d07b522ca..a8483ad4de1c8 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.symbols @@ -5,12 +5,12 @@ class C { >C : Symbol(C, Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 0, 0)) ["" + ""]() { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 0, 9)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 0, 9)) get ["" + ""]() { return 0; } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 1, 19)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 1, 19)) set ["" + ""](x) { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 2, 33)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 2, 33)) >x : Symbol(x, Decl(computedPropertyNamesDeclarationEmit1_ES6.ts, 3, 18)) } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.symbols index c256e2f6fb2ec..cf130bf36d95c 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.symbols @@ -5,12 +5,12 @@ class C { >C : Symbol(C, Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 0, 0)) static ["" + ""]() { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 0, 9)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 0, 9)) static get ["" + ""]() { return 0; } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 1, 26)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 1, 26)) static set ["" + ""](x) { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 2, 40)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 2, 40)) >x : Symbol(x, Decl(computedPropertyNamesDeclarationEmit2_ES5.ts, 3, 25)) } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.symbols index f0cb25f8d217a..864312ea760ad 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.symbols @@ -5,12 +5,12 @@ class C { >C : Symbol(C, Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 0, 0)) static ["" + ""]() { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 0, 9)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 0, 9)) static get ["" + ""]() { return 0; } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 1, 26)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 1, 26)) static set ["" + ""](x) { } ->["" + ""] : Symbol(C["\" + \""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 2, 40)) +>["" + ""] : Symbol(C["" + ""], Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 2, 40)) >x : Symbol(x, Decl(computedPropertyNamesDeclarationEmit2_ES6.ts, 3, 25)) } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.symbols index 14a9918fe87e8..0802a30356bcf 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.symbols @@ -5,5 +5,5 @@ interface I { >I : Symbol(I, Decl(computedPropertyNamesDeclarationEmit3_ES5.ts, 0, 0)) ["" + ""](): void; ->["" + ""] : Symbol(I["\" + \""], Decl(computedPropertyNamesDeclarationEmit3_ES5.ts, 0, 13)) +>["" + ""] : Symbol(I["" + ""], Decl(computedPropertyNamesDeclarationEmit3_ES5.ts, 0, 13)) } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.symbols b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.symbols index 6faef9ffd4551..e03c7c0cb40cb 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.symbols @@ -5,5 +5,5 @@ interface I { >I : Symbol(I, Decl(computedPropertyNamesDeclarationEmit3_ES6.ts, 0, 0)) ["" + ""](): void; ->["" + ""] : Symbol(I["\" + \""], Decl(computedPropertyNamesDeclarationEmit3_ES6.ts, 0, 13)) +>["" + ""] : Symbol(I["" + ""], Decl(computedPropertyNamesDeclarationEmit3_ES6.ts, 0, 13)) } diff --git a/tests/baselines/reference/declarationEmitEscapedSymbolNames.js b/tests/baselines/reference/declarationEmitEscapedSymbolNames.js new file mode 100644 index 0000000000000..8b8a6f1bdb323 --- /dev/null +++ b/tests/baselines/reference/declarationEmitEscapedSymbolNames.js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/declarationEmitEscapedSymbolNames.ts] //// + +//// [declarationEmitEscapedSymbolNames.ts] +export class T { + static readonly "\t" = Symbol() +} + +export let x = { [T['\t']]: 1 } + + +//// [declarationEmitEscapedSymbolNames.js] +export class T { + static "\t" = Symbol(); +} +export let x = { [T['\t']]: 1 }; + + +//// [declarationEmitEscapedSymbolNames.d.ts] +export declare class T { + static readonly "\t": unique symbol; +} +export declare let x: { + [T["\t"]]: number; +}; + + +//// [DtsFileErrors] + + +declarationEmitEscapedSymbolNames.d.ts(5,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + + +==== declarationEmitEscapedSymbolNames.d.ts (1 errors) ==== + export declare class T { + static readonly "\t": unique symbol; + } + export declare let x: { + [T["\t"]]: number; + ~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitEscapedSymbolNames.symbols b/tests/baselines/reference/declarationEmitEscapedSymbolNames.symbols new file mode 100644 index 0000000000000..29c8d322b37ec --- /dev/null +++ b/tests/baselines/reference/declarationEmitEscapedSymbolNames.symbols @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/declarationEmitEscapedSymbolNames.ts] //// + +=== declarationEmitEscapedSymbolNames.ts === +export class T { +>T : Symbol(T, Decl(declarationEmitEscapedSymbolNames.ts, 0, 0)) + + static readonly "\t" = Symbol() +>"\t" : Symbol(T["\t"], Decl(declarationEmitEscapedSymbolNames.ts, 0, 16)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +} + +export let x = { [T['\t']]: 1 } +>x : Symbol(x, Decl(declarationEmitEscapedSymbolNames.ts, 4, 10)) +>[T['\t']] : Symbol([T['\t']], Decl(declarationEmitEscapedSymbolNames.ts, 4, 16)) +>T : Symbol(T, Decl(declarationEmitEscapedSymbolNames.ts, 0, 0)) +>'\t' : Symbol(T["\t"], Decl(declarationEmitEscapedSymbolNames.ts, 0, 16)) + diff --git a/tests/baselines/reference/declarationEmitEscapedSymbolNames.types b/tests/baselines/reference/declarationEmitEscapedSymbolNames.types new file mode 100644 index 0000000000000..b0296617c7d07 --- /dev/null +++ b/tests/baselines/reference/declarationEmitEscapedSymbolNames.types @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitEscapedSymbolNames.ts] //// + +=== declarationEmitEscapedSymbolNames.ts === +export class T { +>T : T +> : ^ + + static readonly "\t" = Symbol() +>"\t" : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol() : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +} + +export let x = { [T['\t']]: 1 } +>x : { [T["\t"]]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>{ [T['\t']]: 1 } : { [T["\t"]]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>[T['\t']] : number +> : ^^^^^^ +>T['\t'] : unique symbol +> : ^^^^^^^^^^^^^ +>T : typeof T +> : ^^^^^^^^ +>'\t' : "\t" +> : ^^^^ +>1 : 1 +> : ^ + diff --git a/tests/baselines/reference/declarationEmitLateBoundAssignments2.symbols b/tests/baselines/reference/declarationEmitLateBoundAssignments2.symbols index b17cea5a9969d..d2ed096ed2a54 100644 --- a/tests/baselines/reference/declarationEmitLateBoundAssignments2.symbols +++ b/tests/baselines/reference/declarationEmitLateBoundAssignments2.symbols @@ -79,7 +79,7 @@ export function decl9() {} decl9["🤪"] = 0 >decl9 : Symbol(decl9, Decl(declarationEmitLateBoundAssignments2.ts, 30, 25), Decl(declarationEmitLateBoundAssignments2.ts, 32, 26)) ->"🤪" : Symbol(decl9["\uD83E\uDD2A"], Decl(declarationEmitLateBoundAssignments2.ts, 32, 26)) +>"🤪" : Symbol(decl9["🤪"], Decl(declarationEmitLateBoundAssignments2.ts, 32, 26)) export function decl10() {} >decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15), Decl(declarationEmitLateBoundAssignments2.ts, 35, 27)) @@ -149,7 +149,7 @@ export const arrow9 = () => {} arrow9["🤪"] = 0 >arrow9 : Symbol(arrow9, Decl(declarationEmitLateBoundAssignments2.ts, 62, 12), Decl(declarationEmitLateBoundAssignments2.ts, 62, 30)) ->"🤪" : Symbol(arrow9["\uD83E\uDD2A"], Decl(declarationEmitLateBoundAssignments2.ts, 62, 30)) +>"🤪" : Symbol(arrow9["🤪"], Decl(declarationEmitLateBoundAssignments2.ts, 62, 30)) export const arrow10 = () => {} >arrow10 : Symbol(arrow10, Decl(declarationEmitLateBoundAssignments2.ts, 65, 12), Decl(declarationEmitLateBoundAssignments2.ts, 65, 31)) diff --git a/tests/baselines/reference/decoratorsOnComputedProperties.symbols b/tests/baselines/reference/decoratorsOnComputedProperties.symbols index 3c45ffbc54221..60b38e1d64f96 100644 --- a/tests/baselines/reference/decoratorsOnComputedProperties.symbols +++ b/tests/baselines/reference/decoratorsOnComputedProperties.symbols @@ -252,7 +252,7 @@ class C { >fieldNameC : Symbol(fieldNameC, Decl(decoratorsOnComputedProperties.ts, 6, 5)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(C["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 56, 32)) +>["some" + "method"] : Symbol(C["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 56, 32)) } void class D { @@ -331,7 +331,7 @@ void class D { >fieldNameC : Symbol(fieldNameC, Decl(decoratorsOnComputedProperties.ts, 6, 5)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(D["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 74, 32)) +>["some" + "method"] : Symbol(D["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 74, 32)) }; @@ -397,7 +397,7 @@ class E { >foo : Symbol(foo, Decl(decoratorsOnComputedProperties.ts, 1, 10)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(E["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 89, 27)) +>["some" + "method"] : Symbol(E["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 89, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(E[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 90, 28)) @@ -476,7 +476,7 @@ void class F { >foo : Symbol(foo, Decl(decoratorsOnComputedProperties.ts, 1, 10)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(F["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 107, 27)) +>["some" + "method"] : Symbol(F["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 107, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(F[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 108, 28)) @@ -556,7 +556,7 @@ class G { >foo : Symbol(foo, Decl(decoratorsOnComputedProperties.ts, 1, 10)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(G["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 125, 27)) +>["some" + "method"] : Symbol(G["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 125, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(G[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 126, 28)) @@ -568,7 +568,7 @@ class G { >fieldNameB : Symbol(fieldNameB, Decl(decoratorsOnComputedProperties.ts, 5, 5)) ["some" + "method2"]() {} ->["some" + "method2"] : Symbol(G["some\" + \"method2"], Decl(decoratorsOnComputedProperties.ts, 128, 25)) +>["some" + "method2"] : Symbol(G["some" + "method2"], Decl(decoratorsOnComputedProperties.ts, 128, 25)) @x [fieldNameC]: any = null; >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) @@ -638,7 +638,7 @@ void class H { >foo : Symbol(foo, Decl(decoratorsOnComputedProperties.ts, 1, 10)) ["some" + "method"]() {} ->["some" + "method"] : Symbol(H["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 144, 27)) +>["some" + "method"] : Symbol(H["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 144, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(H[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 145, 28)) @@ -650,7 +650,7 @@ void class H { >fieldNameB : Symbol(fieldNameB, Decl(decoratorsOnComputedProperties.ts, 5, 5)) ["some" + "method2"]() {} ->["some" + "method2"] : Symbol(H["some\" + \"method2"], Decl(decoratorsOnComputedProperties.ts, 147, 25)) +>["some" + "method2"] : Symbol(H["some" + "method2"], Decl(decoratorsOnComputedProperties.ts, 147, 25)) @x [fieldNameC]: any = null; >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) @@ -722,7 +722,7 @@ class I { @x ["some" + "method"]() {} >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) ->["some" + "method"] : Symbol(I["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 163, 27)) +>["some" + "method"] : Symbol(I["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 163, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(I[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 164, 31)) @@ -734,7 +734,7 @@ class I { >fieldNameB : Symbol(fieldNameB, Decl(decoratorsOnComputedProperties.ts, 5, 5)) ["some" + "method2"]() {} ->["some" + "method2"] : Symbol(I["some\" + \"method2"], Decl(decoratorsOnComputedProperties.ts, 166, 25)) +>["some" + "method2"] : Symbol(I["some" + "method2"], Decl(decoratorsOnComputedProperties.ts, 166, 25)) @x [fieldNameC]: any = null; >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) @@ -805,7 +805,7 @@ void class J { @x ["some" + "method"]() {} >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) ->["some" + "method"] : Symbol(J["some\" + \"method"], Decl(decoratorsOnComputedProperties.ts, 182, 27)) +>["some" + "method"] : Symbol(J["some" + "method"], Decl(decoratorsOnComputedProperties.ts, 182, 27)) [fieldNameA]: any; >[fieldNameA] : Symbol(J[fieldNameA], Decl(decoratorsOnComputedProperties.ts, 183, 31)) @@ -817,7 +817,7 @@ void class J { >fieldNameB : Symbol(fieldNameB, Decl(decoratorsOnComputedProperties.ts, 5, 5)) ["some" + "method2"]() {} ->["some" + "method2"] : Symbol(J["some\" + \"method2"], Decl(decoratorsOnComputedProperties.ts, 185, 25)) +>["some" + "method2"] : Symbol(J["some" + "method2"], Decl(decoratorsOnComputedProperties.ts, 185, 25)) @x [fieldNameC]: any = null; >x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0)) diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.symbols b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols index e6d10911bdd2d..2277f333f1b29 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.symbols +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols @@ -40,8 +40,8 @@ var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; >sameName5a : Symbol(sameName5a, Decl(objectLiteralGettersAndSetters.ts, 5, 3)) ->'\t' : Symbol('t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) ->'\t' : Symbol('t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) +>'\t' : Symbol('\t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) +>'\t' : Symbol('\t', Decl(objectLiteralGettersAndSetters.ts, 5, 18), Decl(objectLiteralGettersAndSetters.ts, 5, 45)) >n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) >p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 5, 63), Decl(objectLiteralGettersAndSetters.ts, 5, 74)) >n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) diff --git a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols index 47ec910b735c8..d9daa245babc9 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols +++ b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.symbols @@ -11,10 +11,10 @@ class C { >"a b" : Symbol(C["a b"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 1, 18)) "~!@#$%^&*()_+{}|:'<>?\/.,`": number; ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(C["~!@#$%^&*()_+{}|:'<>?/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 2, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(C["~!@#$%^&*()_+{}|:'<>?\/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 2, 20)) "a\a": number; ->"a\a" : Symbol(C["aa"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 3, 41)) +>"a\a" : Symbol(C["a\a"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 3, 41)) static "a ": number >"a " : Symbol(C["a "], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 4, 18)) @@ -42,7 +42,7 @@ var r3 = c["a b"]; var r4 = c["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >c : Symbol(c, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 8, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(C["~!@#$%^&*()_+{}|:'<>?/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 2, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(C["~!@#$%^&*()_+{}|:'<>?\/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 2, 20)) interface I { >I : Symbol(I, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 41)) @@ -54,7 +54,7 @@ interface I { >"a b" : Symbol(I["a b"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 16, 18)) "~!@#$%^&*()_+{}|:'<>?\/.,`": number; ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(I["~!@#$%^&*()_+{}|:'<>?/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 17, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(I["~!@#$%^&*()_+{}|:'<>?\/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 17, 20)) } var i: I; @@ -79,7 +79,7 @@ var r3 = i["a b"]; var r4 = i["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >i : Symbol(i, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 21, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(I["~!@#$%^&*()_+{}|:'<>?/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 17, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol(I["~!@#$%^&*()_+{}|:'<>?\/.,`"], Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 17, 20)) var a: { @@ -92,7 +92,7 @@ var a: { >"a b" : Symbol("a b", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 30, 18)) "~!@#$%^&*()_+{}|:'<>?\/.,`": number; ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) } var r = a[" "]; @@ -113,7 +113,7 @@ var r3 = a["a b"]; var r4 = a["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >a : Symbol(a, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 29, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 31, 20)) var b = { >b : Symbol(b, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 41, 3)) @@ -125,7 +125,7 @@ var b = { >"a b" : Symbol("a b", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 42, 13)) "~!@#$%^&*()_+{}|:'<>?\/.,`": 1, ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) } var r = b[" "]; @@ -146,5 +146,5 @@ var r3 = b["a b"]; var r4 = b["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : Symbol(r4, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 13, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 26, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 39, 3), Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 51, 3)) >b : Symbol(b, Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 41, 3)) ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : Symbol("~!@#$%^&*()_+{}|:'<>?\/.,`", Decl(objectTypeWithStringNamedPropertyOfIllegalCharacters.ts, 43, 16)) diff --git a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols index b06603b7a5c5e..ae21a9ceb5c32 100644 --- a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols +++ b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.symbols @@ -3,11 +3,14 @@ === stringLiteralPropertyNameWithLineContinuation1.ts === var x = {'text\ >x : Symbol(x, Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 3)) ->'text\' : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>'text\' : Symbol('text\ +', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) ':'hello'} x.text = "bar" ->x.text : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>x.text : Symbol('text\ +', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) >x : Symbol(x, Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 3)) ->text : Symbol('text\\\n', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) +>text : Symbol('text\ +', Decl(stringLiteralPropertyNameWithLineContinuation1.ts, 0, 9)) diff --git a/tests/cases/compiler/declarationEmitEscapedSymbolNames.ts b/tests/cases/compiler/declarationEmitEscapedSymbolNames.ts new file mode 100644 index 0000000000000..e95a76bb9ef94 --- /dev/null +++ b/tests/cases/compiler/declarationEmitEscapedSymbolNames.ts @@ -0,0 +1,9 @@ +// @declaration: true +// @target: esNext +// @strict: true + +export class T { + static readonly "\t" = Symbol() +} + +export let x = { [T['\t']]: 1 }