From 107f0e90e3bb3146e8668af61dfabb374c9017e4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 13:13:20 -0800 Subject: [PATCH 01/22] Start all strings off with fresh literal types. All string literals will now have their types inferred as string literal types with an associated "freshness". When a string is bound to a "read-only" declaration, freshness associated with the type is lost during widening. When a string is bound to a mutable declaration, it is unconditionally widened to 'string. In any other context where widening takes place, any fresh string literal type is widened to 'string. --- src/compiler/checker.ts | 59 +++++++++++++++++++++++++++++---------- src/compiler/core.ts | 2 +- src/compiler/types.ts | 61 +++++++++++++++++++++-------------------- 3 files changed, 77 insertions(+), 45 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ddb49a2d8f87e..371f4ebb3abc5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -174,6 +174,7 @@ namespace ts { const unionTypes: Map = {}; const intersectionTypes: Map = {}; const stringLiteralTypes: Map = {}; + const freshStringLiteralTypes: Map = {}; let emitExtends = false; let emitDecorate = false; let emitParam = false; @@ -2750,7 +2751,7 @@ namespace ts { if (type.flags & TypeFlags.PredicateType && (declaration.kind === SyntaxKind.PropertyDeclaration || declaration.kind === SyntaxKind.PropertySignature)) { return type; } - return getWidenedType(type); + return declaration.flags & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); } // Rest parameters default to type any[], other parameters default to type any @@ -4614,12 +4615,15 @@ namespace ts { return links.resolvedType; } - function getStringLiteralTypeForText(text: string): StringLiteralType { - if (hasProperty(stringLiteralTypes, text)) { - return stringLiteralTypes[text]; + function getStringLiteralTypeForText(text: string, shouldGetFreshType: boolean): StringLiteralType { + const typeMap = shouldGetFreshType ? freshStringLiteralTypes : stringLiteralTypes; + + if (hasProperty(typeMap, text)) { + return typeMap[text]; } - const type = stringLiteralTypes[text] = createType(TypeFlags.StringLiteral); + const freshnessFlag = shouldGetFreshType ? TypeFlags.ContainsFreshLiteralType : TypeFlags.None; + const type = typeMap[text] = createType(TypeFlags.StringLiteral | freshnessFlag); type.text = text; return type; } @@ -4627,7 +4631,7 @@ namespace ts { function getTypeFromStringLiteralTypeNode(node: StringLiteralTypeNode): Type { const links = getNodeLinks(node); if (!links.resolvedType) { - links.resolvedType = getStringLiteralTypeForText(node.text); + links.resolvedType = getStringLiteralTypeForText(node.text, /*shouldGetFreshType*/ false); } return links.resolvedType; } @@ -5181,6 +5185,12 @@ namespace ts { let result: Ternary; // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases if (source === target) return Ternary.True; + if (source.flags & TypeFlags.StringLiteral && target.flags & TypeFlags.StringLiteral) { + // String literal freshness may affect identity checking. + return (source as StringLiteralType).text === (target as StringLiteralType).text ? + Ternary.True : + Ternary.False; + } if (relation === identityRelation) { return isIdenticalTo(source, target); } @@ -5194,7 +5204,11 @@ namespace ts { return result; } } - if (source.flags & TypeFlags.StringLiteral && target === stringType) return Ternary.True; + if (source.flags & TypeFlags.StringLiteral) { + if (target === stringType) { + return Ternary.True; + } + } if (relation === assignableRelation) { if (isTypeAny(source)) return Ternary.True; if (source === numberType && target.flags & TypeFlags.Enum) return Ternary.True; @@ -6076,11 +6090,30 @@ namespace ts { return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); } + function getWidenedTypeForMutableBinding(type: Type): Type { + if (type.flags & TypeFlags.StringLiteral) { + return stringType; + } + return getWidenedType(type); + } + + function getWidenedTypeForImmutableBinding(type: Type): Type { + if (type.flags & (TypeFlags.ContainsFreshLiteralType | TypeFlags.StringLiteral)) { + return getStringLiteralTypeForText((type as StringLiteralType).text, /*shouldGetFreshType*/ false); + } + return getWidenedType(type); + } + function getWidenedType(type: Type): Type { if (type.flags & TypeFlags.RequiresWidening) { if (type.flags & (TypeFlags.Undefined | TypeFlags.Null)) { return anyType; } + if (type.flags & TypeFlags.StringLiteral) { + // 'RequiresWidening' implies this should be a fresh string literal. + // All fresh string literals in non-binding locations should be widened to string. + return stringType; + } if (type.flags & TypeFlags.PredicateType) { return booleanType; } @@ -9107,8 +9140,9 @@ namespace ts { // If the effective argument type is 'undefined', there is no synthetic type // for the argument. In that case, we should check the argument. if (argType === undefined) { + // TODO (drosen): Probably shouldn't need special logic here since we always get the literal text unless widening. argType = arg.kind === SyntaxKind.StringLiteral && !reportErrors - ? getStringLiteralTypeForText((arg).text) + ? getStringLiteralTypeForText((arg).text, /*shouldGetFreshType*/ true) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); } @@ -9303,7 +9337,7 @@ namespace ts { case SyntaxKind.Identifier: case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: - return getStringLiteralTypeForText((element.name).text); + return getStringLiteralTypeForText((element.name).text, /*shouldGetFreshType*/ true); case SyntaxKind.ComputedPropertyName: const nameType = checkComputedPropertyName(element.name); @@ -10950,12 +10984,7 @@ namespace ts { } function checkStringLiteralExpression(node: StringLiteral): Type { - const contextualType = getContextualType(node); - if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { - return getStringLiteralTypeForText(node.text); - } - - return stringType; + return getStringLiteralTypeForText(node.text, /*shouldGetFreshType*/ true); } function checkTemplateExpression(node: TemplateExpression): Type { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index cfdcb2b930c63..f259fec5998ac 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -774,7 +774,7 @@ namespace ts { */ export const supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"]; export const supportedJavascriptExtensions = [".js", ".jsx"]; - const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); + const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { return options && options.allowJs ? allSupportedExtensions : supportedTypeScriptExtensions; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 74c1af6ae521f..961e2b4fce997 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2084,39 +2084,42 @@ namespace ts { } export const enum TypeFlags { - Any = 0x00000001, - String = 0x00000002, - Number = 0x00000004, - Boolean = 0x00000008, - Void = 0x00000010, - Undefined = 0x00000020, - Null = 0x00000040, - Enum = 0x00000080, // Enum type - StringLiteral = 0x00000100, // String literal type - TypeParameter = 0x00000200, // Type parameter - Class = 0x00000400, // Class - Interface = 0x00000800, // Interface - Reference = 0x00001000, // Generic type reference - Tuple = 0x00002000, // Tuple - Union = 0x00004000, // Union (T | U) - Intersection = 0x00008000, // Intersection (T & U) - Anonymous = 0x00010000, // Anonymous - Instantiated = 0x00020000, // Instantiated anonymous type + None = 0x00000000, + Any = 0x00000001, + String = 0x00000002, + Number = 0x00000004, + Boolean = 0x00000008, + Void = 0x00000010, + Undefined = 0x00000020, + Null = 0x00000040, + Enum = 0x00000080, // Enum type + StringLiteral = 0x00000100, // String literal type + TypeParameter = 0x00000200, // Type parameter + Class = 0x00000400, // Class + Interface = 0x00000800, // Interface + Reference = 0x00001000, // Generic type reference + Tuple = 0x00002000, // Tuple + Union = 0x00004000, // Union (T | U) + Intersection = 0x00008000, // Intersection (T & U) + Anonymous = 0x00010000, // Anonymous + Instantiated = 0x00020000, // Instantiated anonymous type /* @internal */ - FromSignature = 0x00040000, // Created for signature assignment check - ObjectLiteral = 0x00080000, // Originates in an object literal + FromSignature = 0x00040000, // Created for signature assignment check + ObjectLiteral = 0x00080000, // Originates in an object literal /* @internal */ - FreshObjectLiteral = 0x00100000, // Fresh object literal type + FreshObjectLiteral = 0x00100000, // Fresh object literal type /* @internal */ - ContainsUndefinedOrNull = 0x00200000, // Type is or contains Undefined or Null type + ContainsUndefinedOrNull = 0x00200000, // Type is or contains the Undefined or Null types /* @internal */ - ContainsObjectLiteral = 0x00400000, // Type is or contains object literal type + ContainsObjectLiteral = 0x00400000, // Type is or contains an object literal type /* @internal */ - ContainsAnyFunctionType = 0x00800000, // Type is or contains object literal type - ESSymbol = 0x01000000, // Type of symbol primitive introduced in ES6 - ThisType = 0x02000000, // This type + ContainsAnyFunctionType = 0x00800000, // Type is or contains a function type + ESSymbol = 0x01000000, // Type of symbol primitive introduced in ES6 + ThisType = 0x02000000, // This type ObjectLiteralPatternWithComputedProperties = 0x04000000, // Object literal type implied by binding pattern has computed properties - PredicateType = 0x08000000, // Predicate types are also Boolean types, but should not be considered Intrinsics - there's no way to capture this with flags + PredicateType = 0x08000000, // Predicate types are also Boolean types, but should not be considered Intrinsics - there's no way to capture this with flags + /* @internal */ + ContainsFreshLiteralType = 0x10000000, // The type contains a literal type inferred from a literal expression. /* @internal */ Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null, @@ -2128,9 +2131,9 @@ namespace ts { UnionOrIntersection = Union | Intersection, StructuredType = ObjectType | Union | Intersection, /* @internal */ - RequiresWidening = ContainsUndefinedOrNull | ContainsObjectLiteral | PredicateType, + RequiresWidening = ContainsUndefinedOrNull | ContainsObjectLiteral | PredicateType | ContainsFreshLiteralType, /* @internal */ - PropagatingFlags = ContainsUndefinedOrNull | ContainsObjectLiteral | ContainsAnyFunctionType + PropagatingFlags = ContainsUndefinedOrNull | ContainsObjectLiteral | ContainsAnyFunctionType | ContainsFreshLiteralType, } export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; From c349198f25ecf0c0c78f01df674a068e318576fc Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 14:02:07 -0800 Subject: [PATCH 02/22] Only perform mutability widening when the user does not supply a type annotation. --- src/compiler/checker.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 371f4ebb3abc5..22c0aed5fec60 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2751,7 +2751,17 @@ namespace ts { if (type.flags & TypeFlags.PredicateType && (declaration.kind === SyntaxKind.PropertyDeclaration || declaration.kind === SyntaxKind.PropertySignature)) { return type; } - return declaration.flags & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); + + if (!declaration.type) { + // Don't perform mutability widening if the user supplied a type. + // Otherwise, for something like + // let x: "hello" = "hello"; + // or + // function f(y: "blah"): void; + // We will widen the types of 'x' and 'y' to 'string'. + return declaration.flags & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); + } + return getWidenedType(type); } // Rest parameters default to type any[], other parameters default to type any From c1f49a845c2107a5f1226a5290d05b96fb6f0c93 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 14:19:17 -0800 Subject: [PATCH 03/22] Only perform mutability widening when an initializer is present so that contextual typing can succeed. Fixes breakage found in 'tests/cases/fourslash/quickInfoForOverloadOnConst1.ts' --- src/compiler/checker.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 22c0aed5fec60..c5447038699a4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2752,13 +2752,19 @@ namespace ts { return type; } - if (!declaration.type) { - // Don't perform mutability widening if the user supplied a type. + if (!declaration.type && declaration.initializer) { + // Don't perform mutability widening if the user supplied a type and there is an initializer. // Otherwise, for something like // let x: "hello" = "hello"; // or // function f(y: "blah"): void; // We will widen the types of 'x' and 'y' to 'string'. + // + // We also need to know if there is an initializer in case + // we are contextually typed by something like in the following: + // + // function f(callback: (x: "foo") => "foo") { } + // f(x => x); return declaration.flags & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); } return getWidenedType(type); From 1715f522331dbc4fdd39338a763109a3d98f2c36 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 14:52:18 -0800 Subject: [PATCH 04/22] Consider 'string' to be a common supertype when all constituents are string literal types. --- src/compiler/checker.ts | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c5447038699a4..317b17f1f94db 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5994,7 +5994,17 @@ namespace ts { } function getCommonSupertype(types: Type[]): Type { - return forEach(types, t => isSupertypeOfEach(t, types) ? t : undefined); + for (const t of types) { + if (isSupertypeOfEach(t, types)) { + return t; + } + } + + if (allTypesHaveKind(types, TypeFlags.StringLike)) { + return stringType; + } + + return undefined; } function reportNoCommonSupertypeError(types: Type[], errorLocation: Node, errorMessageChainHead: DiagnosticMessageChain): void { @@ -10574,16 +10584,19 @@ namespace ts { return true; } if (type.flags & TypeFlags.UnionOrIntersection) { - const types = (type).types; - for (const current of types) { - if (!(current.flags & kind)) { - return false; - } - } - return true; + return allTypesHaveKind((type).types, kind) } return false; } + + function allTypesHaveKind(types: Type[], kind: TypeFlags) { + for (const current of types) { + if (!(current.flags & kind)) { + return false; + } + } + return true; + } function isConstEnumObjectType(type: Type): boolean { return type.flags & (TypeFlags.ObjectType | TypeFlags.Anonymous) && type.symbol && isConstEnumSymbol(type.symbol); From 9ae177f1b852ddd8946689ba56d07bd5992fd24c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 14:55:59 -0800 Subject: [PATCH 05/22] Removed unused functions. --- src/compiler/checker.ts | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 317b17f1f94db..cfb312a75ebb3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -459,7 +459,7 @@ namespace ts { * Get symbols that represent parameter-property-declaration as parameter and as property declaration * @param parameter a parameterDeclaration node * @param parameterName a name of the parameter to get the symbols for. - * @return a tuple of two symbols + * @return a tuple of two symbols */ function getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): [Symbol, Symbol] { const constructoDeclaration = parameter.parent; @@ -2751,7 +2751,7 @@ namespace ts { if (type.flags & TypeFlags.PredicateType && (declaration.kind === SyntaxKind.PropertyDeclaration || declaration.kind === SyntaxKind.PropertySignature)) { return type; } - + if (!declaration.type && declaration.initializer) { // Don't perform mutability widening if the user supplied a type and there is an initializer. // Otherwise, for something like @@ -5999,11 +5999,11 @@ namespace ts { return t; } } - + if (allTypesHaveKind(types, TypeFlags.StringLike)) { return stringType; } - + return undefined; } @@ -6061,10 +6061,6 @@ namespace ts { return !!getPropertyOfType(type, "0"); } - function isStringLiteralType(type: Type) { - return type.flags & TypeFlags.StringLiteral; - } - /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. @@ -7499,10 +7495,6 @@ namespace ts { return applyToContextualType(type, t => getIndexTypeOfStructuredType(t, kind)); } - function contextualTypeIsStringLiteralType(type: Type): boolean { - return !!(type.flags & TypeFlags.Union ? forEach((type).types, isStringLiteralType) : isStringLiteralType(type)); - } - // Return true if the given contextual type is a tuple-like type function contextualTypeIsTupleLikeType(type: Type): boolean { return !!(type.flags & TypeFlags.Union ? forEach((type).types, isTupleLikeType) : isTupleLikeType(type)); @@ -10584,11 +10576,11 @@ namespace ts { return true; } if (type.flags & TypeFlags.UnionOrIntersection) { - return allTypesHaveKind((type).types, kind) + return allTypesHaveKind((type).types, kind); } return false; } - + function allTypesHaveKind(types: Type[], kind: TypeFlags) { for (const current of types) { if (!(current.flags & kind)) { From 132583458d277762fb85d63004162392f6a2b536 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 17:16:15 -0800 Subject: [PATCH 06/22] Correctly check for if a declaration is const, and strip freshness off of string literal types in unions. --- src/compiler/checker.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cfb312a75ebb3..3cfe84a950033 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2765,7 +2765,7 @@ namespace ts { // // function f(callback: (x: "foo") => "foo") { } // f(x => x); - return declaration.flags & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); + return getCombinedNodeFlags(declaration) & NodeFlags.Const ? getWidenedTypeForImmutableBinding(type) : getWidenedTypeForMutableBinding(type); } return getWidenedType(type); } @@ -6120,8 +6120,14 @@ namespace ts { } function getWidenedTypeForImmutableBinding(type: Type): Type { - if (type.flags & (TypeFlags.ContainsFreshLiteralType | TypeFlags.StringLiteral)) { - return getStringLiteralTypeForText((type as StringLiteralType).text, /*shouldGetFreshType*/ false); + const { flags } = type; + if (flags & TypeFlags.ContainsFreshLiteralType) { + if (flags & TypeFlags.StringLiteral) { + return getStringLiteralTypeForText((type as StringLiteralType).text, /*shouldGetFreshType*/ false); + } + if (flags & TypeFlags.Union) { + return getUnionType(map((type).types, getWidenedTypeForImmutableBinding), /*noSubtypeReduction*/ true); + } } return getWidenedType(type); } @@ -10583,7 +10589,7 @@ namespace ts { function allTypesHaveKind(types: Type[], kind: TypeFlags) { for (const current of types) { - if (!(current.flags & kind)) { + if (!allConstituentTypesHaveKind(current, kind)) { return false; } } From a46f923e04be48308c5482ea906d4d8a19b1c09f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 15 Jan 2016 17:35:11 -0800 Subject: [PATCH 07/22] Removed ad-hoc string-like checking for type assertions, switch/cases, and equality comparisons. --- src/compiler/checker.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3cfe84a950033..dd6aee27d6e6b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10011,11 +10011,7 @@ namespace ts { if (produceDiagnostics && targetType !== unknownType) { const widenedType = getWidenedType(exprType); - // Permit 'number[] | "foo"' to be asserted to 'string'. - const bothAreStringLike = - someConstituentTypeHasKind(targetType, TypeFlags.StringLike) && - someConstituentTypeHasKind(widenedType, TypeFlags.StringLike); - if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { + if (!isTypeAssignableTo(targetType, widenedType)) { checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -10868,10 +10864,6 @@ namespace ts { case SyntaxKind.ExclamationEqualsToken: case SyntaxKind.EqualsEqualsEqualsToken: case SyntaxKind.ExclamationEqualsEqualsToken: - // Permit 'number[] | "foo"' to be asserted to 'string'. - if (someConstituentTypeHasKind(leftType, TypeFlags.StringLike) && someConstituentTypeHasKind(rightType, TypeFlags.StringLike)) { - return booleanType; - } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -13390,7 +13382,6 @@ namespace ts { let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); - const expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, TypeFlags.StringLike); forEach(node.caseBlock.clauses, clause => { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause if (clause.kind === SyntaxKind.DefaultClause && !hasDuplicateDefaultClause) { @@ -13412,12 +13403,7 @@ namespace ts { // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. const caseType = checkExpression(caseClause.expression); - const expressionTypeIsAssignableToCaseType = - // Permit 'number[] | "foo"' to be asserted to 'string'. - (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, TypeFlags.StringLike)) || - isTypeAssignableTo(expressionType, caseType); - - if (!expressionTypeIsAssignableToCaseType) { + if (!isTypeAssignableTo(expressionType, caseType)) { // 'expressionType is not assignable to caseType', try the reversed check and report errors if it fails checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); } From 2b3e119ee3303d3710b89bfc85b185f2216e9f05 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 20 Jan 2016 14:00:11 -0800 Subject: [PATCH 08/22] Let 'isRelatedTo' fall down to the error case. --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index dd6aee27d6e6b..e990f19136bb4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5203,9 +5203,9 @@ namespace ts { if (source === target) return Ternary.True; if (source.flags & TypeFlags.StringLiteral && target.flags & TypeFlags.StringLiteral) { // String literal freshness may affect identity checking. - return (source as StringLiteralType).text === (target as StringLiteralType).text ? - Ternary.True : - Ternary.False; + if ((source as StringLiteralType).text === (target as StringLiteralType).text) { + return Ternary.True; + } } if (relation === identityRelation) { return isIdenticalTo(source, target); From df20678b52d4a6405a6301d362e0dd5e75300142 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 20 Jan 2016 17:47:05 -0800 Subject: [PATCH 09/22] Accepted symbol baselines. --- tests/baselines/reference/enumIndexer.symbols | 4 +- .../objectLiteralArraySpecialization.symbols | 4 +- ...ructuringForOfObjectBindingPattern.symbols | 20 ++--- ...fObjectBindingPatternDefaultValues.symbols | 6 +- .../stringLiteralTypeAssertion01.symbols | 83 ------------------- ...eralTypesAndLogicalOrExpressions01.symbols | 24 ------ .../stringLiteralTypesOverloads04.symbols | 19 ----- .../reference/switchBreakStatements.symbols | 59 ------------- .../reference/underscoreTest1.symbols | 4 +- 9 files changed, 19 insertions(+), 204 deletions(-) delete mode 100644 tests/baselines/reference/stringLiteralTypeAssertion01.symbols delete mode 100644 tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloads04.symbols delete mode 100644 tests/baselines/reference/switchBreakStatements.symbols diff --git a/tests/baselines/reference/enumIndexer.symbols b/tests/baselines/reference/enumIndexer.symbols index 59191a73276f4..0efe9cef9f7c6 100644 --- a/tests/baselines/reference/enumIndexer.symbols +++ b/tests/baselines/reference/enumIndexer.symbols @@ -24,8 +24,8 @@ var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same ty >map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >o : Symbol(o, Decl(enumIndexer.ts, 5, 17)) >MyEnumType : Symbol(MyEnumType, Decl(enumIndexer.ts, 0, 0)) ->o.key : Symbol(key, Decl(enumIndexer.ts, 3, 13)) +>o.key : Symbol(key, Decl(enumIndexer.ts, 3, 13), Decl(enumIndexer.ts, 3, 29)) >o : Symbol(o, Decl(enumIndexer.ts, 5, 17)) ->key : Symbol(key, Decl(enumIndexer.ts, 3, 13)) +>key : Symbol(key, Decl(enumIndexer.ts, 3, 13), Decl(enumIndexer.ts, 3, 29)) >enumValue : Symbol(enumValue, Decl(enumIndexer.ts, 4, 3)) diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.symbols b/tests/baselines/reference/objectLiteralArraySpecialization.symbols index 4cc1188dcc451..8261b5223abad 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.symbols +++ b/tests/baselines/reference/objectLiteralArraySpecialization.symbols @@ -38,7 +38,7 @@ thing.doSomething((x, y) => x.name === "bob"); // should not error >doSomething : Symbol(MyArrayWrapper.doSomething, Decl(objectLiteralArraySpecialization.ts, 2, 33)) >x : Symbol(x, Decl(objectLiteralArraySpecialization.ts, 6, 19)) >y : Symbol(y, Decl(objectLiteralArraySpecialization.ts, 6, 21)) ->x.name : Symbol(name, Decl(objectLiteralArraySpecialization.ts, 5, 22)) +>x.name : Symbol(name, Decl(objectLiteralArraySpecialization.ts, 5, 22), Decl(objectLiteralArraySpecialization.ts, 5, 47)) >x : Symbol(x, Decl(objectLiteralArraySpecialization.ts, 6, 19)) ->name : Symbol(name, Decl(objectLiteralArraySpecialization.ts, 5, 22)) +>name : Symbol(name, Decl(objectLiteralArraySpecialization.ts, 5, 22), Decl(objectLiteralArraySpecialization.ts, 5, 47)) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols index 8fef1fabd6d54..2258fedcdfeaa 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols @@ -93,7 +93,7 @@ for (let {name: nameA } of getRobots()) { >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 31, 10)) } for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 65)) >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 10)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) >skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 44)) @@ -135,10 +135,10 @@ for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRob >primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 20)) } for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, ->skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) ->primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 32)) >primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 20)) ->secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 53)) >secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 39)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 71)) >skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) @@ -185,9 +185,9 @@ for (let {name: nameA, skill: skillA } of getRobots()) { >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 10)) } for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 80)) >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 10)) ->skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 97)) >skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 22)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) >skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) @@ -233,12 +233,12 @@ for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 10)) } for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, ->name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 5)) >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 10)) ->skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) ->primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 32)) >primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 32)) ->secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127), Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 53)) >secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 51)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) >skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols index f73adeb77614d..c773ffa8f8f83 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols @@ -93,7 +93,7 @@ for (let {name: nameA = "noName" } of getRobots()) { >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 31, 10)) } for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 40)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 40), Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 76)) >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 10)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 40)) >skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 55)) @@ -200,9 +200,9 @@ for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 55, 10)) } for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 68)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 68), Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 104)) >nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 10)) ->skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 83)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 83), Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 121)) >skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 33)) >name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 68)) >skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 83)) diff --git a/tests/baselines/reference/stringLiteralTypeAssertion01.symbols b/tests/baselines/reference/stringLiteralTypeAssertion01.symbols deleted file mode 100644 index 1491a32b6f8bf..0000000000000 --- a/tests/baselines/reference/stringLiteralTypeAssertion01.symbols +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts === - -type S = "a" | "b"; ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) - -type T = S[] | S; ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) - -var s: S; ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) - -var t: T; ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) - -var str: string; ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) - -//////////////// - -s = t; ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) - -s = t as S; ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) - -s = str; ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) - -s = str as S; ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) - -//////////////// - -t = s; ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) - -t = s as T; ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) - -t = str; ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) - -t = str as T; ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) - -//////////////// - -str = s; ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) - -str = s as string; ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) - -str = t; ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) - -str = t as string; ->str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) ->t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) - diff --git a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols deleted file mode 100644 index 2a9f28e85a5ca..0000000000000 --- a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols +++ /dev/null @@ -1,24 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts === - -declare function myRandBool(): boolean; ->myRandBool : Symbol(myRandBool, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 0, 0)) - -let a: "foo" = "foo"; ->a : Symbol(a, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 3, 3)) - -let b = a || "foo"; ->b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) ->a : Symbol(a, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 3, 3)) - -let c: "foo" = b; ->c : Symbol(c, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 5, 3)) ->b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) - -let d = b || "bar"; ->d : Symbol(d, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 6, 3)) ->b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) - -let e: "foo" | "bar" = d; ->e : Symbol(e, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 7, 3)) ->d : Symbol(d, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 6, 3)) - diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.symbols b/tests/baselines/reference/stringLiteralTypesOverloads04.symbols deleted file mode 100644 index 9f468b8bd9502..0000000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.symbols +++ /dev/null @@ -1,19 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts === - -declare function f(x: (p: "foo" | "bar") => "foo"); ->f : Symbol(f, Decl(stringLiteralTypesOverloads04.ts, 0, 0)) ->x : Symbol(x, Decl(stringLiteralTypesOverloads04.ts, 1, 19)) ->p : Symbol(p, Decl(stringLiteralTypesOverloads04.ts, 1, 23)) - -f(y => { ->f : Symbol(f, Decl(stringLiteralTypesOverloads04.ts, 0, 0)) ->y : Symbol(y, Decl(stringLiteralTypesOverloads04.ts, 3, 2)) - - let z = y = "foo"; ->z : Symbol(z, Decl(stringLiteralTypesOverloads04.ts, 4, 7)) ->y : Symbol(y, Decl(stringLiteralTypesOverloads04.ts, 3, 2)) - - return z; ->z : Symbol(z, Decl(stringLiteralTypesOverloads04.ts, 4, 7)) - -}) diff --git a/tests/baselines/reference/switchBreakStatements.symbols b/tests/baselines/reference/switchBreakStatements.symbols deleted file mode 100644 index dde7ca028ccd3..0000000000000 --- a/tests/baselines/reference/switchBreakStatements.symbols +++ /dev/null @@ -1,59 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts === - -switch ('') { - case 'a': - break; -} - -ONE: -switch ('') { - case 'a': - break ONE; -} - -TWO: -THREE: -switch ('') { - case 'a': - break THREE; -} - -FOUR: -switch ('') { - case 'a': - FIVE: - switch ('') { - case 'a': - break FOUR; - } -} - -switch ('') { - case 'a': - SIX: - switch ('') { - case 'a': - break SIX; - } -} - -SEVEN: -switch ('') { - case 'a': - switch ('') { - case 'a': - switch ('') { - case 'a': - break SEVEN; - EIGHT: - switch ('') { - case 'a': - var fn = function () { } ->fn : Symbol(fn, Decl(switchBreakStatements.ts, 49, 35)) - - break EIGHT; - } - } - } -} - diff --git a/tests/baselines/reference/underscoreTest1.symbols b/tests/baselines/reference/underscoreTest1.symbols index 9de509de417e0..fee959b24b24f 100644 --- a/tests/baselines/reference/underscoreTest1.symbols +++ b/tests/baselines/reference/underscoreTest1.symbols @@ -164,9 +164,9 @@ _.max(stooges, (stooge) => stooge.age); >max : Symbol(Underscore.Static.max, Decl(underscoreTest1_underscore.ts, 467, 66), Decl(underscoreTest1_underscore.ts, 469, 73)) >stooges : Symbol(stooges, Decl(underscoreTest1_underscoreTests.ts, 33, 3)) >stooge : Symbol(stooge, Decl(underscoreTest1_underscoreTests.ts, 36, 16)) ->stooge.age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 29)) +>stooge.age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 29), Decl(underscoreTest1_underscoreTests.ts, 33, 57), Decl(underscoreTest1_underscoreTests.ts, 33, 85)) >stooge : Symbol(stooge, Decl(underscoreTest1_underscoreTests.ts, 36, 16)) ->age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 29)) +>age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 29), Decl(underscoreTest1_underscoreTests.ts, 33, 57), Decl(underscoreTest1_underscoreTests.ts, 33, 85)) var numbers = [10, 5, 100, 2, 1000]; >numbers : Symbol(numbers, Decl(underscoreTest1_underscoreTests.ts, 38, 3)) From ba04c0647a6dec049e651278f7d53f6e43b77bc1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 20 Jan 2016 17:47:39 -0800 Subject: [PATCH 10/22] Accepted type baselines. --- ...AndNonExportedFunctionThatShareAName.types | 4 +- ...iableAndNonExportedVarThatShareAName.types | 4 +- tests/baselines/reference/ES5For-of13.types | 8 +- tests/baselines/reference/ES5For-of3.types | 8 +- .../reference/ES5For-ofTypeCheck1.types | 2 +- .../reference/ES5For-ofTypeCheck3.types | 4 +- ...AndNonExportedLocalVarsOfTheSameName.types | 2 +- .../reference/TypeGuardWithEnumUnion.types | 8 +- .../abstractIdentifierNameStrict.types | 2 +- .../accessOverriddenBaseClassMember1.types | 6 +- .../additionOperatorWithAnyAndEveryType.types | 8 +- ...peratorWithNullValueAndValidOperator.types | 8 +- .../additionOperatorWithNumberAndEnum.types | 8 +- ...ditionOperatorWithStringAndEveryType.types | 8 +- ...orWithUndefinedValueAndValidOperator.types | 8 +- tests/baselines/reference/anonterface.types | 2 +- .../reference/anonymousClassExpression1.types | 2 +- .../reference/anyAsFunctionCall.types | 2 +- tests/baselines/reference/anyPlusAny1.types | 4 +- .../reference/anyPropertyAccess.types | 6 +- tests/baselines/reference/arrayAugment.types | 4 +- .../reference/arrayBestCommonTypes.types | 252 +++---- tests/baselines/reference/arrayConcat2.types | 8 +- .../reference/arrayConstructors1.types | 8 +- .../reference/arrayLiteralComments.types | 4 +- .../arrayLiteralContextualType.types | 8 +- .../arrayLiteralInNonVarArgParameter.types | 4 +- .../reference/arrayLiteralSpread.types | 4 +- .../reference/arrayLiterals2ES5.types | 42 +- .../reference/arrayLiterals2ES6.types | 42 +- .../reference/arrayOfFunctionTypes3.types | 4 +- .../reference/arrowFunctionExpressions.types | 8 +- .../arrowFunctionWithObjectLiteralBody5.types | 44 +- .../arrowFunctionWithObjectLiteralBody6.types | 44 +- tests/baselines/reference/asOperator1.types | 4 +- ...entsParsingAsAmbientExternalModule01.types | 2 +- ...entsParsingAsAmbientExternalModule02.types | 2 +- .../reference/assignEveryTypeToAny.types | 6 +- .../reference/assignmentCompatForEnums.types | 2 +- .../assignmentCompatWithObjectMembers.types | 12 +- .../assignmentCompatWithObjectMembers2.types | 12 +- .../assignmentCompatWithObjectMembers3.types | 12 +- ...tCompatWithObjectMembersNumericNames.types | 8 +- .../reference/assignmentLHSIsReference.types | 4 +- .../assignmentStricterConstraints.types | 2 +- ...mentedTypeBracketNamedPropertyAccess.types | 8 +- .../awaitBinaryExpression1_es6.types | 4 +- .../awaitBinaryExpression2_es6.types | 4 +- .../awaitBinaryExpression3_es6.types | 4 +- .../awaitBinaryExpression4_es6.types | 4 +- .../awaitBinaryExpression5_es6.types | 4 +- .../reference/awaitCallExpression1_es6.types | 4 +- .../reference/awaitCallExpression2_es6.types | 4 +- .../reference/awaitCallExpression3_es6.types | 4 +- .../reference/awaitCallExpression4_es6.types | 4 +- .../reference/awaitCallExpression5_es6.types | 4 +- .../reference/awaitCallExpression6_es6.types | 4 +- .../reference/awaitCallExpression7_es6.types | 4 +- .../reference/awaitCallExpression8_es6.types | 4 +- ...tCommonTypeOfConditionalExpressions2.types | 4 +- .../reference/bestCommonTypeOfTuple.types | 2 +- .../reference/bestCommonTypeOfTuple2.types | 4 +- .../reference/binaryIntegerLiteral.types | 34 +- .../reference/binaryIntegerLiteralES6.types | 34 +- .../binopAssignmentShouldHaveType.types | 4 +- .../bitwiseNotOperatorWithEnumType.types | 10 +- .../bitwiseNotOperatorWithStringType.types | 28 +- .../reference/booleanPropertyAccess.types | 2 +- ...meterConstrainedToOuterTypeParameter.types | 2 +- .../baselines/reference/callWithSpread.types | 22 +- .../reference/callWithSpreadES6.types | 22 +- .../reference/capturedLetConstInLoop5.types | 4 +- .../capturedLetConstInLoop5_ES6.types | 4 +- .../reference/capturedLetConstInLoop6.types | 8 +- .../capturedLetConstInLoop6_ES6.types | 8 +- .../reference/capturedLetConstInLoop7.types | 16 +- .../capturedLetConstInLoop7_ES6.types | 16 +- .../reference/capturedLetConstInLoop8.types | 8 +- .../capturedLetConstInLoop8_ES6.types | 8 +- .../reference/castExpressionParentheses.types | 4 +- tests/baselines/reference/castTest.types | 2 +- ...eckSwitchStatementIfCaseTypeIsString.types | 2 +- .../circularObjectLiteralAccessors.types | 6 +- .../classAppearsToHaveMembersOfObject.types | 2 +- .../classDoesNotDependOnBaseTypes.types | 6 +- .../reference/classExpression5.types | 2 +- .../reference/classExtendingClass.types | 2 +- .../reference/classWithEmptyBody.types | 16 +- .../classWithProtectedProperty.types | 12 +- .../reference/classWithPublicProperty.types | 12 +- tests/baselines/reference/classdecl.types | 2 +- tests/baselines/reference/cloduleTest1.types | 4 +- ...xportsRequireAndFunctionInGlobalFile.types | 6 +- ...llisionRestParameterUnderscoreIUsage.types | 2 +- .../commaOperatorOtherValidOperation.types | 2 +- ...ommaOperatorWithSecondOperandAnyType.types | 12 +- ...aOperatorWithSecondOperandNumberType.types | 4 +- ...aOperatorWithSecondOperandObjectType.types | 14 +- ...aOperatorWithSecondOperandStringType.types | 36 +- .../commentBeforeStaticMethod1.types | 2 +- .../reference/commentEmitAtEndOfFile1.types | 2 +- .../commentsArgumentsOfCallExpression2.types | 2 +- .../reference/commentsFunction.types | 2 +- .../reference/commentsInterface.types | 4 +- .../commentsOnPropertyOfObjectLiteral1.types | 6 +- .../reference/commentsOnStaticMembers.types | 4 +- .../reference/commentsOverloads.types | 18 +- .../baselines/reference/commentsVarDecl.types | 2 +- ...ndAdditionAssignmentLHSCanBeAssigned.types | 6 +- .../compoundAssignmentLHSIsReference.types | 8 +- ...ponentiationAssignmentLHSIsReference.types | 4 +- .../computedPropertiesInDestructuring2.types | 2 +- ...mputedPropertiesInDestructuring2_ES6.types | 2 +- .../computedPropertyNames10_ES5.types | 2 +- .../computedPropertyNames10_ES6.types | 2 +- .../computedPropertyNames11_ES5.types | 2 +- .../computedPropertyNames11_ES6.types | 2 +- .../computedPropertyNames13_ES5.types | 2 +- .../computedPropertyNames13_ES6.types | 2 +- .../computedPropertyNames16_ES5.types | 2 +- .../computedPropertyNames16_ES6.types | 2 +- .../computedPropertyNames28_ES5.types | 6 +- .../computedPropertyNames28_ES6.types | 6 +- .../computedPropertyNames33_ES5.types | 2 +- .../computedPropertyNames33_ES6.types | 2 +- .../computedPropertyNames37_ES5.types | 4 +- .../computedPropertyNames37_ES6.types | 4 +- .../computedPropertyNames41_ES5.types | 2 +- .../computedPropertyNames41_ES6.types | 2 +- .../computedPropertyNames46_ES5.types | 4 +- .../computedPropertyNames46_ES6.types | 4 +- .../computedPropertyNames48_ES5.types | 14 +- .../computedPropertyNames48_ES6.types | 14 +- .../computedPropertyNames4_ES5.types | 2 +- .../computedPropertyNames4_ES6.types | 2 +- ...utedPropertyNamesContextualType1_ES5.types | 4 +- ...utedPropertyNamesContextualType1_ES6.types | 4 +- ...utedPropertyNamesContextualType2_ES5.types | 4 +- ...utedPropertyNamesContextualType2_ES6.types | 4 +- ...utedPropertyNamesContextualType3_ES5.types | 4 +- ...utedPropertyNamesContextualType3_ES6.types | 4 +- ...utedPropertyNamesContextualType4_ES5.types | 12 +- ...utedPropertyNamesContextualType4_ES6.types | 12 +- ...utedPropertyNamesContextualType5_ES5.types | 8 +- ...utedPropertyNamesContextualType5_ES6.types | 8 +- ...utedPropertyNamesContextualType6_ES5.types | 12 +- ...utedPropertyNamesContextualType6_ES6.types | 12 +- ...utedPropertyNamesContextualType7_ES5.types | 12 +- ...utedPropertyNamesContextualType7_ES6.types | 12 +- ...tedPropertyNamesDeclarationEmit1_ES5.types | 12 +- ...tedPropertyNamesDeclarationEmit1_ES6.types | 12 +- ...tedPropertyNamesDeclarationEmit2_ES5.types | 12 +- ...tedPropertyNamesDeclarationEmit2_ES6.types | 12 +- ...tedPropertyNamesDeclarationEmit5_ES5.types | 16 +- ...tedPropertyNamesDeclarationEmit5_ES6.types | 16 +- .../computedPropertyNamesSourceMap1_ES5.types | 2 +- .../computedPropertyNamesSourceMap1_ES6.types | 2 +- .../computedPropertyNamesSourceMap2_ES5.types | 2 +- .../computedPropertyNamesSourceMap2_ES6.types | 2 +- ...putedPropertyNamesWithStaticProperty.types | 2 +- .../reference/conditionalExpressions2.types | 6 +- ...tionalOperatorConditionIsBooleanType.types | 12 +- ...itionalOperatorConditionIsNumberType.types | 4 +- ...itionalOperatorConditionIsObjectType.types | 48 +- ...onditionalOperatorConditoinIsAnyType.types | 8 +- ...itionalOperatorConditoinIsStringType.types | 38 +- .../conditionalOperatorWithIdenticalBCT.types | 36 +- ...DeclarationShadowedByVarDeclaration2.types | 2 +- ...DeclarationShadowedByVarDeclaration3.types | 4 +- .../reference/constDeclarations-es5.types | 2 +- .../reference/constDeclarations-scopes2.types | 4 +- .../reference/constDeclarations.types | 2 +- .../reference/constDeclarations2.types | 2 +- .../reference/constEnumPropertyAccess1.types | 2 +- .../constEnumToStringNoComments.types | 12 +- .../constEnumToStringWithComments.types | 12 +- tests/baselines/reference/constEnums.types | 8 +- .../reference/constIndexedAccess.types | 4 +- ...ructSignaturesWithIdenticalOverloads.types | 12 +- .../constructSignaturesWithOverloads.types | 12 +- .../reference/constructorOverloads2.types | 2 +- .../contextualSignatureInstantiation.types | 8 +- ...meterConstrainedToOuterTypeParameter.types | 2 +- .../reference/contextualTypeAny.types | 8 +- ...tualTypeWithUnionTypeIndexSignatures.types | 10 +- .../contextualTypeWithUnionTypeMembers.types | 82 +-- .../reference/contextualTyping35.types | 6 +- .../reference/contextualTyping37.types | 8 +- ...ypedObjectLiteralMethodDeclaration01.types | 12 +- .../reference/declFileAccessors.types | 4 +- .../reference/declFileConstructors.types | 8 +- .../reference/declFileFunctions.types | 6 +- .../baselines/reference/declFileMethods.types | 16 +- .../reference/declFileRegressionTests.types | 6 +- .../declFileTypeAnnotationBuiltInType.types | 4 +- .../declFileTypeAnnotationParenType.types | 8 +- .../declFileTypeAnnotationStringLiteral.types | 2 +- tests/baselines/reference/declInput.types | 4 +- tests/baselines/reference/declInput3.types | 4 +- .../declarationEmitDefaultExport3.types | 2 +- .../declarationEmitDestructuring3.types | 4 +- ...rationEmitDestructuringArrayPattern1.types | 16 +- ...rationEmitDestructuringArrayPattern4.types | 16 +- ...itDestructuringObjectLiteralPattern2.types | 12 +- ...orInstantiateModulesInFunctionBodies.types | 4 +- .../decoratorMetadataOnInferredType.types | 2 +- ...decoratorMetadataWithConstructorType.types | 2 +- .../reference/decoratorOnClassMethod13.types | 4 +- .../reference/decoratorOnClassMethod4.types | 2 +- .../reference/decoratorOnClassMethod5.types | 2 +- .../reference/decoratorOnClassMethod7.types | 2 +- .../decrementOperatorWithAnyOtherType.types | 6 +- .../reference/defaultIndexProps1.types | 12 +- .../reference/defaultIndexProps2.types | 10 +- .../deleteOperatorWithEnumType.types | 6 +- .../deleteOperatorWithStringType.types | 30 +- ...rivedClassOverridesProtectedMembers2.types | 2 +- .../baselines/reference/derivedClasses.types | 8 +- ...bjectBindingPatternAndAssignment1ES5.types | 20 +- ...bjectBindingPatternAndAssignment1ES6.types | 20 +- ...estructuringParameterDeclaration3ES5.types | 26 +- ...estructuringParameterDeclaration3ES6.types | 26 +- ...destructuringVariableDeclaration1ES5.types | 56 +- ...destructuringVariableDeclaration1ES6.types | 56 +- .../doNotemitTripleSlashComments.types | 4 +- .../reference/dottedSymbolResolution1.types | 6 +- .../reference/downlevelLetConst13.types | 6 +- .../reference/downlevelLetConst14.types | 6 +- .../reference/downlevelLetConst15.types | 14 +- .../reference/downlevelLetConst17.types | 2 +- .../reference/downlevelLetConst18.types | 2 +- .../reference/downlevelLetConst19.types | 2 +- ...rrowFunctionWhenUsingArguments15_ES6.types | 2 +- ...rrowFunctionWhenUsingArguments16_ES6.types | 4 +- ...rrowFunctionWhenUsingArguments17_ES6.types | 8 +- .../emitClassDeclarationOverloadInES6.types | 2 +- ...ClassDeclarationWithConstructorInES6.types | 4 +- ...itClassDeclarationWithExtensionInES6.types | 2 +- ...lassDeclarationWithGetterSetterInES6.types | 20 +- ...larationWithLiteralPropertyNameInES6.types | 12 +- .../emitClassDeclarationWithMethodInES6.types | 14 +- ...clarationWithPropertyAssignmentInES6.types | 8 +- ...ionWithStaticPropertyAssignmentInES6.types | 2 +- ...tDefaultParametersFunctionExpression.types | 10 +- ...faultParametersFunctionExpressionES6.types | 10 +- ...mitDefaultParametersFunctionProperty.types | 6 +- ...DefaultParametersFunctionPropertyES6.types | 6 +- .../emitDefaultParametersMethod.types | 6 +- .../emitDefaultParametersMethodES6.types | 6 +- .../emitMemberAccessExpression.types | 4 +- tests/baselines/reference/emptyIndexer.types | 2 +- .../reference/emptyThenWithoutWarning.types | 2 +- tests/baselines/reference/enumBasics.types | 14 +- tests/baselines/reference/enumIndexer.types | 28 +- .../reference/enumMapBackIntoItself.types | 2 +- tests/baselines/reference/enumMerging.types | 12 +- .../reference/es3defaultAliasIsQuoted.types | 6 +- tests/baselines/reference/es5-commonjs5.types | 2 +- .../reference/es6ClassSuperCodegenBug.types | 8 +- ...6ImportNamedImportWithTypesAndValues.types | 4 +- .../baselines/reference/es6ModuleConst.types | 46 +- tests/baselines/reference/es6ModuleLet.types | 2 +- .../es6ModuleVariableStatement.types | 2 +- .../reference/escapedIdentifiers.types | 10 +- ...capedReservedCompilerNamedIdentifier.types | 12 +- ...veryTypeWithAnnotationAndInitializer.types | 4 +- .../reference/everyTypeWithInitializer.types | 2 +- .../excessPropertyErrorsSuppressed.types | 6 +- .../exportAssignmentMergedInterface.types | 2 +- .../exportAssignmentTopLevelClodule.types | 2 +- .../exportAssignmentTopLevelFundule.types | 2 +- ...onWithModuleSpecifierNameOnNextLine1.types | 2 +- ...ssWithStaticPropertyAssignmentsInES6.types | 2 +- tests/baselines/reference/exportImport.types | 2 +- .../reference/exportImportAlias.types | 4 +- .../reference/exportImportAndClodule.types | 2 +- .../exportImportNonInstantiatedModule2.types | 6 +- .../reference/exportedVariable1.types | 6 +- .../reference/exportsAndImports2-amd.types | 4 +- .../reference/exportsAndImports2-es6.types | 4 +- .../reference/exportsAndImports2.types | 4 +- .../reference/exportsAndImports4-amd.types | 46 +- .../reference/exportsAndImports4-es6.types | 46 +- .../reference/exportsAndImports4.types | 46 +- .../reference/extendBooleanInterface.types | 8 +- .../reference/extendNumberInterface.types | 8 +- .../reference/extendStringInterface.types | 10 +- tests/baselines/reference/externFunc.types | 2 +- .../externalModuleQualification.types | 2 +- tests/baselines/reference/fatArrowSelf.types | 2 +- .../reference/fatarrowfunctions.types | 6 +- .../fatarrowfunctionsInFunctions.types | 6 +- .../reference/fileWithNextLine1.types | 2 +- .../fixingTypeParametersRepeatedly1.types | 4 +- tests/baselines/reference/for-of13.types | 4 +- tests/baselines/reference/for-of18.types | 6 +- tests/baselines/reference/for-of36.types | 4 +- tests/baselines/reference/for-of37.types | 6 +- tests/baselines/reference/for-of38.types | 6 +- tests/baselines/reference/for-of40.types | 8 +- tests/baselines/reference/for-of41.types | 12 +- tests/baselines/reference/for-of42.types | 8 +- tests/baselines/reference/for-of44.types | 6 +- tests/baselines/reference/for-of45.types | 12 +- tests/baselines/reference/for-of50.types | 6 +- tests/baselines/reference/for-of9.types | 6 +- tests/baselines/reference/forStatements.types | 4 +- .../forStatementsMultipleValidDecl.types | 8 +- .../reference/fromAsIdentifier2.types | 2 +- tests/baselines/reference/funcdecl.types | 10 +- .../reference/functionAssignmentError.types | 4 +- tests/baselines/reference/functionCall1.types | 2 +- tests/baselines/reference/functionCall4.types | 2 +- .../functionExpressionContextualTyping1.types | 8 +- .../reference/functionOnlyHasThrow.types | 2 +- .../reference/functionOverloads12.types | 2 +- .../reference/functionOverloads13.types | 2 +- .../reference/functionOverloads15.types | 2 +- .../reference/functionOverloads16.types | 2 +- .../reference/functionOverloads22.types | 8 +- .../reference/functionOverloads25.types | 2 +- .../reference/functionOverloads26.types | 4 +- .../reference/functionOverloads28.types | 2 +- .../reference/functionOverloads30.types | 2 +- .../reference/functionOverloads36.types | 6 +- .../reference/functionOverloads42.types | 8 +- .../reference/functionOverloads43.types | 8 +- .../reference/functionOverloads44.types | 16 +- .../reference/functionOverloads45.types | 16 +- .../reference/functionOverloads7.types | 4 +- .../reference/functionOverloads8.types | 2 +- .../reference/functionOverloads9.types | 4 +- .../baselines/reference/functionReturn.types | 4 +- tests/baselines/reference/functionType.types | 4 +- ...ithDefaultParameterWithNoStatements3.types | 4 +- .../functionWithThrowButNoReturn1.types | 2 +- .../reference/generatorTypeCheck12.types | 2 +- .../reference/generatorTypeCheck13.types | 2 +- .../reference/generatorTypeCheck14.types | 2 +- .../reference/generatorTypeCheck15.types | 2 +- .../reference/generatorTypeCheck33.types | 4 +- .../reference/generatorTypeCheck34.types | 2 +- .../reference/generatorTypeCheck35.types | 2 +- .../reference/generatorTypeCheck45.types | 2 +- .../reference/generatorTypeCheck46.types | 2 +- ...nericArgumentCallSigAssignmentCompat.types | 4 +- tests/baselines/reference/genericArray1.types | 8 +- .../genericBaseClassLiteralProperty2.types | 2 +- .../genericCallTypeArgumentInference.types | 22 +- .../genericCallWithArrayLiteralArgs.types | 12 +- ...ricCallWithObjectTypeArgsAndIndexers.types | 2 +- ...lWithObjectTypeArgsAndIndexersErrors.types | 2 +- ...llWithObjectTypeArgsAndStringIndexer.types | 4 +- ...WithOverloadedFunctionTypedArguments.types | 6 +- .../reference/genericInference1.types | 8 +- .../reference/genericInference2.types | 4 +- .../genericMethodOverspecialization.types | 12 +- .../genericReversingTypeParameters.types | 2 +- .../reference/genericTypeAliases.types | 38 +- .../genericTypeArgumentInference1.types | 4 +- ...nericWithIndexerOfTypeParameterType1.types | 2 +- .../reference/getterSetterNonAccessor.types | 2 +- .../reference/globalIsContextualKeyword.types | 6 +- .../heterogeneousArrayLiterals.types | 42 +- .../reference/hidingCallSignatures.types | 8 +- .../reference/hidingConstructSignatures.types | 8 +- .../reference/hidingIndexSignatures.types | 4 +- .../reference/ifDoWhileStatements.types | 40 +- .../implicitAnyAnyReturningFunction.types | 4 +- ...mportAndVariableDeclarationConflict2.types | 4 +- .../import_reference-exported-alias.types | 2 +- .../import_reference-to-type-alias.types | 2 +- .../reference/inOperatorWithFunction.types | 2 +- .../inOperatorWithValidOperands.types | 2 +- .../incrementOperatorWithAnyOtherType.types | 6 +- tests/baselines/reference/indexer.types | 14 +- tests/baselines/reference/indexer3.types | 2 +- tests/baselines/reference/indexerA.types | 14 +- .../reference/indexerWithTuple.types | 30 +- .../reference/inferSecondaryParameter.types | 2 +- .../inferenceFromParameterlessLambda.types | 2 +- ...nferentialTypingObjectLiteralMethod1.types | 2 +- ...nferentialTypingObjectLiteralMethod2.types | 2 +- .../inferentialTypingUsingApparentType3.types | 2 +- .../inferentialTypingWithFunctionType.types | 2 +- ...erentialTypingWithFunctionTypeNested.types | 2 +- ...ngWithFunctionTypeSyntacticScenarios.types | 20 +- ...inferentialTypingWithFunctionTypeZip.types | 6 +- ...nheritanceMemberFuncOverridingMethod.types | 4 +- ...nheritanceStaticFuncOverridingMethod.types | 4 +- ...aticFuncOverridingPropertyOfFuncType.types | 2 +- ...ritedOverloadedSpecializedSignatures.types | 4 +- .../reference/interfaceContextualType.types | 2 +- .../interfaceDoesNotDependOnBaseTypes.types | 8 +- .../reference/interfaceSubtyping.types | 2 +- ...OverloadedCallAndConstructSignatures.types | 4 +- .../interfaceWithPropertyOfEveryType.types | 6 +- ...pecializedCallAndConstructSignatures.types | 4 +- .../reference/intersectionTypeMembers.types | 26 +- .../intersectionTypeOverloading.types | 4 +- .../reference/invalidUndefinedValues.types | 4 +- tests/baselines/reference/ipromise4.types | 2 +- .../reference/iterableArrayPattern30.types | 10 +- .../reference/iteratorSpreadInCall12.types | 6 +- .../reference/iteratorSpreadInCall5.types | 6 +- .../jsFileCompilationShortHandProperty.types | 2 +- .../reference/jsxReactTestSuite.types | 20 +- tests/baselines/reference/keywordField.types | 8 +- .../reference/letDeclarations-es5-1.types | 2 +- .../reference/letDeclarations-es5.types | 2 +- .../baselines/reference/letDeclarations.types | 2 +- .../reference/letDeclarations2.types | 2 +- .../library_ObjectPrototypeProperties.types | 4 +- tests/baselines/reference/literals1.types | 8 +- .../reference/localClassesInLoop.types | 2 +- .../reference/localClassesInLoop_ES6.types | 2 +- tests/baselines/reference/localTypes1.types | 12 +- tests/baselines/reference/localTypes3.types | 6 +- .../logicalNotOperatorWithEnumType.types | 6 +- .../logicalNotOperatorWithStringType.types | 30 +- .../logicalOrOperatorWithTypeParameters.types | 10 +- .../matchingOfObjectLiteralConstraints.types | 8 +- .../mergedInterfacesWithIndexers.types | 4 +- .../moduleAugmentationsBundledOutput1.types | 2 +- .../reference/moduleCodeGenTest3.types | 6 +- .../reference/moduleCodegenTest4.types | 6 +- tests/baselines/reference/moduleMerge.types | 4 +- .../reference/modulePrologueAMD.types | 2 +- .../reference/modulePrologueCommonjs.types | 2 +- .../reference/modulePrologueES6.types | 2 +- .../reference/modulePrologueSystem.types | 2 +- .../reference/modulePrologueUmd.types | 2 +- .../reference/moduleResolutionNoResolve.types | 2 +- ...resNameWithImportDeclarationInsideIt.types | 2 +- ...esNameWithImportDeclarationInsideIt2.types | 2 +- ...esNameWithImportDeclarationInsideIt4.types | 2 +- ...esNameWithImportDeclarationInsideIt6.types | 2 +- .../reference/moduleVisibilityTest1.types | 2 +- .../moduleWithStatementsOfEveryKind.types | 16 +- tests/baselines/reference/moduledecl.types | 6 +- .../reference/multiModuleClodule1.types | 2 +- tests/baselines/reference/nameCollision.types | 4 +- .../negateOperatorWithAnyOtherType.types | 12 +- .../negateOperatorWithEnumType.types | 6 +- .../negateOperatorWithStringType.types | 30 +- ...meterConstrainedToOuterTypeParameter.types | 2 +- .../reference/newWithSpreadES5.types | 90 +-- .../reference/newWithSpreadES6.types | 90 +-- ...yInContextuallyTypesFunctionParamter.types | 10 +- .../noImplicitAnyIndexingSuppressed.types | 8 +- .../reference/nonIterableRestElement1.types | 6 +- .../reference/nonIterableRestElement2.types | 6 +- ...ullIsSubtypeOfEverythingButUndefined.types | 8 +- .../reference/numberPropertyAccess.types | 8 +- .../reference/numericIndexingResults.types | 46 +- .../reference/objectLitGetterSetter.types | 4 +- .../objectLiteralArraySpecialization.types | 34 +- .../objectLiteralContextualTyping.types | 22 +- ...LiteralShorthandPropertiesAssignment.types | 8 +- ...eralShorthandPropertiesAssignmentES6.types | 8 +- ...lShorthandPropertiesFunctionArgument.types | 2 +- .../reference/objectTypePropertyAccess.types | 18 +- ...atureHidingMembersOfExtendedFunction.types | 4 +- ...atureHidingMembersOfExtendedFunction.types | 4 +- .../objectTypeWithNumericProperty.types | 20 +- ...ctTypeWithStringNamedNumericProperty.types | 68 +- ...ringNamedPropertyOfIllegalCharacters.types | 36 +- .../reference/objectTypesIdentity.types | 6 +- ...bjectTypesIdentityWithCallSignatures.types | 2 +- ...jectTypesIdentityWithCallSignatures2.types | 2 +- ...thCallSignaturesDifferingParamCounts.types | 2 +- ...ntityWithCallSignaturesWithOverloads.types | 2 +- ...ypesIdentityWithConstructSignatures2.types | 2 +- ...structSignaturesDifferingParamCounts.types | 2 +- ...CallSignaturesDifferingByConstraints.types | 2 +- ...allSignaturesDifferingByConstraints2.types | 2 +- ...allSignaturesDifferingByConstraints3.types | 2 +- ...ructSignaturesDifferingByConstraints.types | 2 +- ...uctSignaturesDifferingByConstraints2.types | 2 +- ...uctSignaturesDifferingByConstraints3.types | 2 +- ...ectTypesIdentityWithNumericIndexers1.types | 6 +- ...ectTypesIdentityWithNumericIndexers3.types | 6 +- .../objectTypesIdentityWithOptionality.types | 6 +- .../objectTypesIdentityWithPrivates.types | 6 +- .../objectTypesIdentityWithPublics.types | 6 +- ...bjectTypesIdentityWithStringIndexers.types | 6 +- .../reference/octalIntegerLiteral.types | 34 +- .../reference/octalIntegerLiteralES6.types | 34 +- .../optionalAccessorsInInterface1.types | 4 +- .../reference/overloadCallTest.types | 6 +- .../overloadResolutionOverNonCTLambdas.types | 4 +- ...overloadResolutionOverNonCTObjectLit.types | 14 +- .../reference/overloadResolutionWithAny.types | 10 +- .../reference/overloadReturnTypes.types | 4 +- .../overloadsAndTypeArgumentArity.types | 4 +- .../reference/overloadsWithConstraints.types | 2 +- tests/baselines/reference/parser630933.types | 2 +- .../parserInterfaceKeywordInEnum1.types | 2 +- .../reference/parserModuleDeclaration11.types | 2 +- .../reference/parserStrictMode16.types | 4 +- .../reference/parserSymbolProperty6.types | 2 +- .../reference/plusOperatorWithEnumType.types | 4 +- .../plusOperatorWithStringType.types | 30 +- ...ssignmentOnExportedGenericInterface2.types | 2 +- .../baselines/reference/promiseChaining.types | 2 +- .../reference/promiseTypeInference.types | 2 +- .../reference/promiseVoidErrorCallback.types | 10 +- .../propagationOfPromiseInitialization.types | 2 +- ...AccessOnTypeParameterWithConstraints.types | 8 +- ...ccessOnTypeParameterWithConstraints2.types | 16 +- ...ccessOnTypeParameterWithConstraints3.types | 16 +- ...essOnTypeParameterWithoutConstraints.types | 8 +- .../propertyNamesWithStringLiteral.types | 4 +- .../protoAsIndexInIndexExpression.types | 2 +- .../baselines/reference/protoInIndexer.types | 2 +- .../prototypeOnConstructorFunctions.types | 4 +- .../reference/quotedPropertyName3.types | 2 +- ...nstantiationsWithDefaultConstructors.types | 2 +- .../reference/recursiveInitializer.types | 4 +- .../regExpWithSlashInCharClass.types | 12 +- .../reference/requireEmitSemicolon.types | 2 +- .../restElementWithAssignmentPattern5.types | 8 +- .../reference/returnStatement1.types | 4 +- .../reference/returnStatements.types | 2 +- ...gLiteralWithContainingNullCharacter1.types | Bin 132 -> 132 bytes .../scannerUnicodeEscapeInKeyword1.types | 2 +- tests/baselines/reference/selfInLambdas.types | 2 +- tests/baselines/reference/shebang.types | 2 +- .../reference/sourceMap-LineBreaks.types | 4 +- .../sourceMap-StringLiteralWithNewLine.types | 4 +- .../reference/sourceMapValidationClass.types | 4 +- ...alidationClassWithDefaultConstructor.types | 2 +- ...thDefaultConstructorAndExtendsClause.types | 2 +- .../sourceMapValidationClasses.types | 14 +- .../sourceMapValidationDecorators.types | 4 +- ...nDestructuringForArrayBindingPattern.types | 90 +-- ...DestructuringForArrayBindingPattern2.types | 102 +-- ...gForArrayBindingPatternDefaultValues.types | 170 ++--- ...ForArrayBindingPatternDefaultValues2.types | 278 ++++---- ...DestructuringForObjectBindingPattern.types | 84 +-- ...estructuringForObjectBindingPattern2.types | 140 ++-- ...ForObjectBindingPatternDefaultValues.types | 192 +++--- ...orObjectBindingPatternDefaultValues2.types | 500 +++++++------- ...estructuringForOfArrayBindingPattern.types | 32 +- ...structuringForOfArrayBindingPattern2.types | 32 +- ...orOfArrayBindingPatternDefaultValues.types | 122 ++-- ...rOfArrayBindingPatternDefaultValues2.types | 230 +++---- ...structuringForOfObjectBindingPattern.types | 180 ++--- ...tructuringForOfObjectBindingPattern2.types | 324 ++++----- ...rOfObjectBindingPatternDefaultValues.types | 288 ++++---- ...OfObjectBindingPatternDefaultValues2.types | 630 +++++++++--------- ...gParameterNestedObjectBindingPattern.types | 72 +- ...tedObjectBindingPatternDefaultValues.types | 112 ++-- ...cturingParameterObjectBindingPattern.types | 42 +- ...terObjectBindingPatternDefaultValues.types | 50 +- ...cturingParametertArrayBindingPattern.types | 30 +- ...turingParametertArrayBindingPattern2.types | 50 +- ...tertArrayBindingPatternDefaultValues.types | 60 +- ...ertArrayBindingPatternDefaultValues2.types | 80 +-- ...dationDestructuringVariableStatement.types | 32 +- ...ationDestructuringVariableStatement1.types | 58 +- ...VariableStatementArrayBindingPattern.types | 24 +- ...ariableStatementArrayBindingPattern2.types | 40 +- ...ariableStatementArrayBindingPattern3.types | 110 +-- ...mentArrayBindingPatternDefaultValues.types | 34 +- ...entArrayBindingPatternDefaultValues2.types | 74 +- ...entArrayBindingPatternDefaultValues3.types | 224 +++---- ...turingVariableStatementDefaultValues.types | 42 +- ...eStatementNestedObjectBindingPattern.types | 54 +- ...bjectBindingPatternWithDefaultValues.types | 100 +-- ...urceMapValidationFunctionExpressions.types | 2 +- .../reference/specializeVarArgs1.types | 2 +- .../reference/staticInstanceResolution2.types | 4 +- ...staticMemberWithStringAndNumberNames.types | 8 +- .../strictModeUseContextualKeyword.types | 2 +- .../strictModeWordInExportDeclaration.types | 2 +- .../stringHasStringValuedNumericIndexer.types | 2 +- .../baselines/reference/stringIncludes.types | 8 +- .../reference/stringIndexingResults.types | 24 +- .../stringLiteralCheckedInIf01.types | 4 +- .../stringLiteralCheckedInIf02.types | 4 +- .../stringLiteralMatchedInSwitch01.types | 4 +- ...ralPropertyNameWithLineContinuation1.types | 8 +- .../stringLiteralTypeAssertion01.types | 107 --- ...iteralTypesAndLogicalOrExpressions01.types | 29 - .../stringLiteralTypesAndTuples01.types | 20 +- ...eralTypesAsTypeParameterConstraint01.types | 4 +- .../stringLiteralTypesInUnionTypes01.types | 4 +- .../stringLiteralTypesInUnionTypes02.types | 4 +- .../stringLiteralTypesInUnionTypes03.types | 4 +- .../stringLiteralTypesInUnionTypes04.types | 8 +- .../stringLiteralTypesOverloads01.types | 10 +- .../stringLiteralTypesOverloads04.types | 23 - ...ngLiteralTypesWithVariousOperators01.types | 8 +- .../reference/stringNamedPropertyAccess.types | 10 +- .../reference/stringPropertyAccess.types | 10 +- ...typesOfTypeParameterWithConstraints2.types | 8 +- .../reference/subtypingTransitivity.types | 4 +- .../subtypingWithCallSignatures.types | 4 +- .../subtypingWithCallSignatures2.types | 12 +- .../subtypingWithCallSignatures3.types | 12 +- .../subtypingWithCallSignatures4.types | 12 +- tests/baselines/reference/super2.types | 10 +- tests/baselines/reference/superCalls.types | 6 +- .../reference/superPropertyAccess_ES6.types | 2 +- .../reference/superSymbolIndexedAccess1.types | 2 +- .../reference/switchBreakStatements.types | 127 ---- .../reference/switchFallThroughs.types | 6 +- .../reference/symbolDeclarationEmit10.types | 2 +- .../reference/symbolDeclarationEmit11.types | 2 +- .../reference/symbolDeclarationEmit13.types | 2 +- .../reference/symbolDeclarationEmit14.types | 4 +- .../reference/symbolDeclarationEmit2.types | 2 +- .../reference/symbolDeclarationEmit4.types | 2 +- .../reference/symbolProperty18.types | 2 +- .../reference/symbolProperty22.types | 2 +- .../reference/symbolProperty26.types | 4 +- .../reference/symbolProperty27.types | 2 +- .../reference/symbolProperty28.types | 6 +- .../reference/symbolProperty40.types | 2 +- .../reference/symbolProperty41.types | 2 +- .../reference/symbolProperty45.types | 4 +- .../reference/symbolProperty56.types | 2 +- .../reference/symbolProperty57.types | 2 +- tests/baselines/reference/symbolType11.types | 2 +- tests/baselines/reference/symbolType17.types | 2 +- tests/baselines/reference/symbolType18.types | 2 +- tests/baselines/reference/symbolType19.types | 2 +- .../baselines/reference/systemModule13.types | 10 +- .../baselines/reference/systemModule15.types | 4 +- tests/baselines/reference/systemModule8.types | 10 +- .../taggedTemplateContextualTyping2.types | 4 +- ...gedTemplateStringsHexadecimalEscapes.types | 2 +- ...TemplateStringsHexadecimalEscapesES6.types | 2 +- ...ainCharactersThatArePartsOfEscapes02.types | 58 +- ...haractersThatArePartsOfEscapes02_ES6.types | 58 +- ...ingsWithManyCallAndMemberExpressions.types | 2 +- ...sWithManyCallAndMemberExpressionsES6.types | 2 +- ...gedTemplateStringsWithTagsTypedAsAny.types | 8 +- ...TemplateStringsWithTagsTypedAsAnyES6.types | 8 +- .../taggedTemplateStringsWithTypedTags.types | 6 +- ...aggedTemplateStringsWithTypedTagsES6.types | 6 +- ...gedTemplateStringsWithUnicodeEscapes.types | 2 +- ...TemplateStringsWithUnicodeEscapesES6.types | 2 +- .../baselines/reference/targetTypeArgs.types | 14 +- .../targetTypeObjectLiteralToAny.types | 6 +- .../baselines/reference/targetTypeTest2.types | 4 +- .../templateStringInConditional.types | 6 +- .../templateStringInConditionalES6.types | 6 +- .../templateStringInEqualityChecks.types | 4 +- .../templateStringInEqualityChecksES6.types | 4 +- .../templateStringInInOperator.types | 2 +- .../templateStringInInOperatorES6.types | 2 +- ...ainCharactersThatArePartsOfEscapes02.types | 58 +- ...haractersThatArePartsOfEscapes02_ES6.types | 58 +- ...emplateStringWithEmbeddedConditional.types | 4 +- ...lateStringWithEmbeddedConditionalES6.types | 4 +- ...templateStringWithEmbeddedInOperator.types | 2 +- ...plateStringWithEmbeddedInOperatorES6.types | 2 +- ...emplateStringWithEmbeddedNewOperator.types | 2 +- ...lateStringWithEmbeddedNewOperatorES6.types | 2 +- ...lateStringWithEmbeddedTemplateString.types | 4 +- ...eStringWithEmbeddedTemplateStringES6.types | 4 +- ...lateStringWithEmbeddedTypeOfOperator.types | 2 +- ...eStringWithEmbeddedTypeOfOperatorES6.types | 2 +- tests/baselines/reference/thisBinding2.types | 6 +- .../reference/thisInInnerFunctions.types | 6 +- tests/baselines/reference/thisInLambda.types | 2 +- .../thisInPropertyBoundDeclarations.types | 4 +- .../reference/thisTypeInTuples.types | 4 +- .../throwInEnclosingStatements.types | 2 +- .../baselines/reference/throwStatements.types | 16 +- tests/baselines/reference/topLevel.types | 8 +- tests/baselines/reference/tsxEmit1.types | 2 +- tests/baselines/reference/tsxReactEmit1.types | 2 +- tests/baselines/reference/tsxTypeErrors.types | 6 +- tests/baselines/reference/typeAliases.types | 4 +- ...notationBestCommonTypeInArrayLiteral.types | 22 +- .../reference/typeArgInference.types | 6 +- .../reference/typeArgInferenceWithNull.types | 6 +- .../typeArgumentInferenceApparentType1.types | 2 +- ...rgumentInferenceWithClassExpression1.types | 2 +- ...rgumentInferenceWithClassExpression3.types | 2 +- .../baselines/reference/typeGuardEnums.types | 4 +- .../typeGuardFunctionOfFormThis.types | 4 +- .../reference/typeGuardInClass.types | 2 +- .../reference/typeGuardNesting.types | 32 +- .../typeGuardOfFormExpr1AndExpr2.types | 18 +- .../typeGuardOfFormExpr1OrExpr2.types | 18 +- .../reference/typeGuardOfFormNotExpr.types | 20 +- .../reference/typeGuardOfFormThisMember.types | 4 +- .../typeGuardOfFormTypeOfBoolean.types | 20 +- ...ardOfFormTypeOfEqualEqualHasNoEffect.types | 8 +- ...GuardOfFormTypeOfNotEqualHasNoEffect.types | 8 +- .../typeGuardOfFormTypeOfNumber.types | 20 +- .../typeGuardOfFormTypeOfOther.types | 16 +- ...ypeGuardOfFormTypeOfPrimitiveSubtype.types | 12 +- .../typeGuardOfFormTypeOfString.types | 20 +- .../reference/typeGuardRedundancy.types | 16 +- .../typeGuardTautologicalConsistiency.types | 8 +- .../reference/typeGuardTypeOfUndefined.types | 64 +- .../reference/typeGuardsDefeat.types | 14 +- .../typeGuardsInClassAccessors.types | 40 +- .../reference/typeGuardsInClassMethods.types | 30 +- .../typeGuardsInConditionalExpression.types | 46 +- .../typeGuardsInExternalModule.types | 4 +- .../reference/typeGuardsInFunction.types | 38 +- .../typeGuardsInFunctionAndModuleBlock.types | 26 +- .../reference/typeGuardsInGlobal.types | 2 +- .../reference/typeGuardsInIfStatement.types | 54 +- .../reference/typeGuardsInModule.types | 22 +- .../reference/typeGuardsInProperties.types | 12 +- ...GuardsInRightOperandOfAndAndOperator.types | 32 +- ...peGuardsInRightOperandOfOrOrOperator.types | 40 +- .../reference/typeGuardsObjectMethods.types | 20 +- .../typeInferenceFBoundedTypeParams.types | 6 +- .../typeInferenceWithTupleType.types | 8 +- .../baselines/reference/typeOfPrototype.types | 2 +- .../reference/typeOfThisInStaticMembers.types | 2 +- .../typeParameterAsElementType.types | 4 +- ...peParameterAsTypeParameterConstraint.types | 6 +- ...sTypeParameterConstraintTransitively.types | 28 +- ...TypeParameterConstraintTransitively2.types | 14 +- .../typedGenericPrototypeMember.types | 2 +- .../baselines/reference/typeofInterface.types | 6 +- .../typeofOperatorWithEnumType.types | 6 +- .../reference/typesWithOptionalProperty.types | 20 +- .../typesWithSpecializedCallSignatures.types | 2 +- ...esWithSpecializedConstructSignatures.types | 4 +- tests/baselines/reference/unaryPlus.types | 8 +- .../reference/uncaughtCompilerError1.types | 22 +- .../reference/underscoreMapFirst.types | 4 +- .../baselines/reference/underscoreTest1.types | 360 +++++----- ...nicodeExtendedEscapesInStrings01_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings01_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings02_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings02_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings03_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings03_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings04_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings04_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings05_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings05_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings06_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings06_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings08_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings08_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings09_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings09_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings10_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings10_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings11_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings11_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings13_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings13_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings15_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings15_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings16_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings16_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings18_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings18_ES6.types | 2 +- ...nicodeExtendedEscapesInStrings23_ES5.types | 2 +- ...nicodeExtendedEscapesInStrings23_ES6.types | 2 +- .../unionAndIntersectionInference1.types | 8 +- .../reference/unionTypeCallSignatures2.types | 6 +- .../reference/unionTypeCallSignatures3.types | 2 +- .../reference/unionTypeFromArrayLiteral.types | 22 +- .../reference/unionTypeIndexSignature.types | 8 +- .../reference/unionTypeInference.types | 18 +- .../untypedArgumentInLambdaExpression.types | 2 +- .../reference/unusedImportDeclaration.types | 10 +- ...oduleWithExportImportInValuePosition.types | 2 +- .../reference/validStringAssignments.types | 2 +- tests/baselines/reference/vardecl.types | 18 +- .../reference/voidOperatorWithEnumType.types | 6 +- .../voidOperatorWithStringType.types | 30 +- .../baselines/reference/wideningTuples1.types | 6 +- .../baselines/reference/wideningTuples2.types | 6 +- .../baselines/reference/wideningTuples4.types | 8 +- .../baselines/reference/wideningTuples6.types | 8 +- .../baselines/reference/withExportDecl.types | 36 +- .../baselines/reference/withImportDecl.types | 24 +- .../wrappedAndRecursiveConstraints2.types | 2 +- .../wrappedAndRecursiveConstraints3.types | 4 +- 784 files changed, 5767 insertions(+), 6053 deletions(-) delete mode 100644 tests/baselines/reference/stringLiteralTypeAssertion01.types delete mode 100644 tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloads04.types delete mode 100644 tests/baselines/reference/switchBreakStatements.types diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types index 9d943ab354c23..5d79983050857 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types @@ -21,7 +21,7 @@ module Point { function Origin() { return ""; }// not an error, since not exported >Origin : () => string ->"" : string +>"" : "" } @@ -50,6 +50,6 @@ module A { function Origin() { return ""; }// not an error since not exported >Origin : () => string ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types index 8f8ffc8839f48..886e556f2de6f 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types @@ -21,7 +21,7 @@ module Point { var Origin = ""; // not an error, since not exported >Origin : string ->"" : string +>"" : "" } @@ -50,6 +50,6 @@ module A { var Origin = ""; // not an error since not exported >Origin : string ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/ES5For-of13.types b/tests/baselines/reference/ES5For-of13.types index 46125af551e41..e301f25928efc 100644 --- a/tests/baselines/reference/ES5For-of13.types +++ b/tests/baselines/reference/ES5For-of13.types @@ -1,10 +1,10 @@ === tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts === for (let v of ['a', 'b', 'c']) { >v : string ->['a', 'b', 'c'] : string[] ->'a' : string ->'b' : string ->'c' : string +>['a', 'b', 'c'] : ("a" | "b" | "c")[] +>'a' : "a" +>'b' : "b" +>'c' : "c" var x = v; >x : string diff --git a/tests/baselines/reference/ES5For-of3.types b/tests/baselines/reference/ES5For-of3.types index 65267fe3f7055..92a970f21a92e 100644 --- a/tests/baselines/reference/ES5For-of3.types +++ b/tests/baselines/reference/ES5For-of3.types @@ -1,10 +1,10 @@ === tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts === for (var v of ['a', 'b', 'c']) >v : string ->['a', 'b', 'c'] : string[] ->'a' : string ->'b' : string ->'c' : string +>['a', 'b', 'c'] : ("a" | "b" | "c")[] +>'a' : "a" +>'b' : "b" +>'c' : "c" var x = v; >x : string diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.types b/tests/baselines/reference/ES5For-ofTypeCheck1.types index 395900d683b12..6faba8c23aaa3 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck1.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.types @@ -1,5 +1,5 @@ === tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts === for (var v of "") { } >v : string ->"" : string +>"" : "" diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.types b/tests/baselines/reference/ES5For-ofTypeCheck3.types index a62dcc94f989f..99486f03064ce 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck3.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.types @@ -1,8 +1,8 @@ === tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts === var tuple: [string, number] = ["", 0]; >tuple : [string, number] ->["", 0] : [string, number] ->"" : string +>["", 0] : ["", number] +>"" : "" >0 : number for (var v of tuple) { } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types index af3c0776b56f7..746f930e9982c 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types @@ -51,7 +51,7 @@ module A { // not a collision, since we don't export var Origin: string = "0,0"; >Origin : string ->"0,0" : string +>"0,0" : "0,0" export module Utils { >Utils : typeof Utils diff --git a/tests/baselines/reference/TypeGuardWithEnumUnion.types b/tests/baselines/reference/TypeGuardWithEnumUnion.types index 453ec220f021a..972832076405c 100644 --- a/tests/baselines/reference/TypeGuardWithEnumUnion.types +++ b/tests/baselines/reference/TypeGuardWithEnumUnion.types @@ -14,7 +14,7 @@ function f1(x: Color | string) { >typeof x === "number" : boolean >typeof x : string >x : Color | string ->"number" : string +>"number" : "number" var y = x; >y : Color @@ -43,7 +43,7 @@ function f2(x: Color | string | string[]) { >typeof x === "object" : boolean >typeof x : string >x : Color | string | string[] ->"object" : string +>"object" : "object" var y = x; >y : string[] @@ -56,7 +56,7 @@ function f2(x: Color | string | string[]) { >typeof x === "number" : boolean >typeof x : string >x : Color | string | string[] ->"number" : string +>"number" : "number" var z = x; >z : Color @@ -78,7 +78,7 @@ function f2(x: Color | string | string[]) { >typeof x === "string" : boolean >typeof x : string >x : Color | string | string[] ->"string" : string +>"string" : "string" var a = x; >a : string diff --git a/tests/baselines/reference/abstractIdentifierNameStrict.types b/tests/baselines/reference/abstractIdentifierNameStrict.types index 7c79ce58a372e..0b5ce7c2d430e 100644 --- a/tests/baselines/reference/abstractIdentifierNameStrict.types +++ b/tests/baselines/reference/abstractIdentifierNameStrict.types @@ -7,7 +7,7 @@ function foo() { >foo : () => void "use strict"; ->"use strict" : string +>"use strict" : "use strict" var abstract = true; >abstract : boolean diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.types b/tests/baselines/reference/accessOverriddenBaseClassMember1.types index f444544ea4891..f0dad0ccafcb7 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.types +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.types @@ -13,11 +13,11 @@ class Point { >"x=" + this.x + " y=" + this.y : string >"x=" + this.x + " y=" : string >"x=" + this.x : string ->"x=" : string +>"x=" : "x=" >this.x : number >this : this >x : number ->" y=" : string +>" y=" : " y=" >this.y : number >this : this >y : number @@ -48,7 +48,7 @@ class ColoredPoint extends Point { >super.toString : () => string >super : Point >toString : () => string ->" color=" : string +>" color=" : " color=" >this.color : string >this : this >color : string diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types index 9f1a9f03898ef..0c1683acccd61 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types @@ -144,7 +144,7 @@ var r17 = a + ''; >r17 : string >a + '' : string >a : any ->'' : string +>'' : "" var r18 = a + 123; >r18 : any @@ -156,9 +156,9 @@ var r19 = a + { a: '' }; >r19 : any >a + { a: '' } : any >a : any ->{ a: '' } : { a: string; } ->a : string ->'' : string +>{ a: '' } : { a: ""; } +>a : "" +>'' : "" var r20 = a + ((a: string) => { return a }); >r20 : any diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types index f4ea168ee0df8..bf3baba6e8ee9 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types @@ -66,7 +66,7 @@ var r7 = null + E['a']; >null : null >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" var r8 = b + null; >r8 : number @@ -99,7 +99,7 @@ var r12 = E['a'] + null; >E['a'] + null : number >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" >null : null // null + string @@ -113,7 +113,7 @@ var r14 = null + ''; >r14 : string >null + '' : string >null : null ->'' : string +>'' : "" var r15 = d + null; >r15 : string @@ -124,6 +124,6 @@ var r15 = d + null; var r16 = '' + null; >r16 : string >'' + null : string ->'' : string +>'' : "" >null : null diff --git a/tests/baselines/reference/additionOperatorWithNumberAndEnum.types b/tests/baselines/reference/additionOperatorWithNumberAndEnum.types index 2b1c27940653d..7163dcc94bbfd 100644 --- a/tests/baselines/reference/additionOperatorWithNumberAndEnum.types +++ b/tests/baselines/reference/additionOperatorWithNumberAndEnum.types @@ -74,20 +74,20 @@ var r8 = E['a'] + E['b']; >E['a'] + E['b'] : number >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" >E['b'] : E >E : typeof E ->'b' : string +>'b' : "b" var r9 = E['a'] + F['c']; >r9 : number >E['a'] + F['c'] : number >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" >F['c'] : F >F : typeof F ->'c' : string +>'c' : "c" var r10 = a + c; >r10 : number diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.types b/tests/baselines/reference/additionOperatorWithStringAndEveryType.types index 5413f5f5bdfb4..c921d7f2e69a4 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.types +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.types @@ -137,7 +137,7 @@ var r17 = x + ''; >r17 : string >x + '' : string >x : string ->'' : string +>'' : "" var r18 = x + 0; >r18 : string @@ -149,9 +149,9 @@ var r19 = x + { a: '' }; >r19 : string >x + { a: '' } : string >x : string ->{ a: '' } : { a: string; } ->a : string ->'' : string +>{ a: '' } : { a: ""; } +>a : "" +>'' : "" var r20 = x + []; >r20 : string diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types index 16f0a4dfa8433..460f4c15da12c 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types @@ -66,7 +66,7 @@ var r7 = undefined + E['a']; >undefined : undefined >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" var r8 = b + undefined; >r8 : number @@ -99,7 +99,7 @@ var r12 = E['a'] + undefined; >E['a'] + undefined : number >E['a'] : E >E : typeof E ->'a' : string +>'a' : "a" >undefined : undefined // undefined + string @@ -113,7 +113,7 @@ var r14 = undefined + ''; >r14 : string >undefined + '' : string >undefined : undefined ->'' : string +>'' : "" var r15 = d + undefined; >r15 : string @@ -124,6 +124,6 @@ var r15 = d + undefined; var r16 = '' + undefined; >r16 : string >'' + undefined : string ->'' : string +>'' : "" >undefined : undefined diff --git a/tests/baselines/reference/anonterface.types b/tests/baselines/reference/anonterface.types index b152ce79a1df0..6276ca4c8c4c9 100644 --- a/tests/baselines/reference/anonterface.types +++ b/tests/baselines/reference/anonterface.types @@ -34,7 +34,7 @@ c.m(function(n) { return "hello: "+n; },18); >function(n) { return "hello: "+n; } : (n: number) => string >n : number >"hello: "+n : string ->"hello: " : string +>"hello: " : "hello: " >n : number >18 : number diff --git a/tests/baselines/reference/anonymousClassExpression1.types b/tests/baselines/reference/anonymousClassExpression1.types index 1e38399f01ed7..0fbffffdf4b82 100644 --- a/tests/baselines/reference/anonymousClassExpression1.types +++ b/tests/baselines/reference/anonymousClassExpression1.types @@ -6,5 +6,5 @@ function f() { >typeof class {} === "function" : boolean >typeof class {} : string >class {} : typeof (Anonymous class) ->"function" : string +>"function" : "function" } diff --git a/tests/baselines/reference/anyAsFunctionCall.types b/tests/baselines/reference/anyAsFunctionCall.types index 340ccac463fdd..42d0f9fc9509b 100644 --- a/tests/baselines/reference/anyAsFunctionCall.types +++ b/tests/baselines/reference/anyAsFunctionCall.types @@ -14,7 +14,7 @@ var b = x('hello'); >b : any >x('hello') : any >x : any ->'hello' : string +>'hello' : "hello" var c = x(x); >c : any diff --git a/tests/baselines/reference/anyPlusAny1.types b/tests/baselines/reference/anyPlusAny1.types index 406d432f06ed0..f6ca9c4996eee 100644 --- a/tests/baselines/reference/anyPlusAny1.types +++ b/tests/baselines/reference/anyPlusAny1.types @@ -3,11 +3,11 @@ var x; >x : any x.name = "hello"; ->x.name = "hello" : string +>x.name = "hello" : "hello" >x.name : any >x : any >name : any ->"hello" : string +>"hello" : "hello" var z = x + x; >z : any diff --git a/tests/baselines/reference/anyPropertyAccess.types b/tests/baselines/reference/anyPropertyAccess.types index 13eec6b53b23a..f023f9f852149 100644 --- a/tests/baselines/reference/anyPropertyAccess.types +++ b/tests/baselines/reference/anyPropertyAccess.types @@ -12,14 +12,14 @@ var b = x['foo']; >b : any >x['foo'] : any >x : any ->'foo' : string +>'foo' : "foo" var c = x['fn'](); >c : any >x['fn']() : any >x['fn'] : any >x : any ->'fn' : string +>'fn' : "fn" var d = x.bar.baz; >d : any @@ -42,6 +42,6 @@ var f = x['0'].bar; >x['0'].bar : any >x['0'] : any >x : any ->'0' : string +>'0' : "0" >bar : any diff --git a/tests/baselines/reference/arrayAugment.types b/tests/baselines/reference/arrayAugment.types index 042b7265ec849..7175b9320829e 100644 --- a/tests/baselines/reference/arrayAugment.types +++ b/tests/baselines/reference/arrayAugment.types @@ -11,8 +11,8 @@ interface Array { var x = ['']; >x : string[] ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var y = x.split(4); >y : string[][] diff --git a/tests/baselines/reference/arrayBestCommonTypes.types b/tests/baselines/reference/arrayBestCommonTypes.types index fca66793f40ec..4cdb4ecd22ef4 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.types +++ b/tests/baselines/reference/arrayBestCommonTypes.types @@ -136,10 +136,10 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->['', "q"][0] : string ->['', "q"] : string[] ->'' : string ->"q" : string +>['', "q"][0] : "" | "q" +>['', "q"] : ("" | "q")[] +>'' : "" +>"q" : "q" >0 : number (this.voidIfAny(['', "q", undefined][0])); @@ -149,10 +149,10 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->['', "q", undefined][0] : string ->['', "q", undefined] : string[] ->'' : string ->"q" : string +>['', "q", undefined][0] : "" | "q" +>['', "q", undefined] : ("" | "q")[] +>'' : "" +>"q" : "q" >undefined : undefined >0 : number @@ -163,11 +163,11 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[undefined, "q", ''][0] : string ->[undefined, "q", ''] : string[] +>[undefined, "q", ''][0] : "q" | "" +>[undefined, "q", ''] : ("q" | "")[] >undefined : undefined ->"q" : string ->'' : string +>"q" : "q" +>'' : "" >0 : number (this.voidIfAny([null, "q", ''][0])); @@ -177,11 +177,11 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[null, "q", ''][0] : string ->[null, "q", ''] : string[] +>[null, "q", ''][0] : "q" | "" +>[null, "q", ''] : ("q" | "")[] >null : null ->"q" : string ->'' : string +>"q" : "q" +>'' : "" >0 : number (this.voidIfAny(["q", '', null][0])); @@ -191,10 +191,10 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->["q", '', null][0] : string ->["q", '', null] : string[] ->"q" : string ->'' : string +>["q", '', null][0] : "q" | "" +>["q", '', null] : ("q" | "")[] +>"q" : "q" +>'' : "" >null : null >0 : number @@ -205,10 +205,10 @@ module EmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[undefined, '', null][0] : string ->[undefined, '', null] : string[] +>[undefined, '', null][0] : "" +>[undefined, '', null] : ""[] >undefined : undefined ->'' : string +>'' : "" >null : null >0 : number @@ -274,16 +274,16 @@ module EmptyTypes { >x : string >y : base >base : base ->[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : { x: string; y: derived; }[] +>[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : { x: ""; y: derived; }[] >{ x: undefined, y: new base() } : { x: undefined; y: base; } >x : undefined >undefined : undefined >y : base >new base() : base >base : typeof base ->{ x: '', y: new derived() } : { x: string; y: derived; } ->x : string ->'' : string +>{ x: '', y: new derived() } : { x: ""; y: derived; } +>x : "" +>'' : "" >y : derived >new derived() : derived >derived : typeof derived @@ -295,60 +295,60 @@ module EmptyTypes { // Order matters here so test all the variants var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; >a1 : { x: any; y: string; }[] ->[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[] ->{ x: 0, y: 'a' } : { x: number; y: string; } +>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: "a"; }[] +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string +>y : "a" +>'a' : "a" var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; >a2 : { x: any; y: string; }[] ->[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[] ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: "a"; }[] +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string ->{ x: 0, y: 'a' } : { x: number; y: string; } +>y : "a" +>'a' : "a" +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; >a3 : { x: any; y: string; }[] ->[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[] ->{ x: 0, y: 'a' } : { x: number; y: string; } +>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: "a"; }[] +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>y : "a" +>'a' : "a" +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" var ifaceObj: iface = null; >ifaceObj : iface @@ -539,10 +539,10 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->['', "q"][0] : string ->['', "q"] : string[] ->'' : string ->"q" : string +>['', "q"][0] : "" | "q" +>['', "q"] : ("" | "q")[] +>'' : "" +>"q" : "q" >0 : number (this.voidIfAny(['', "q", undefined][0])); @@ -552,10 +552,10 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->['', "q", undefined][0] : string ->['', "q", undefined] : string[] ->'' : string ->"q" : string +>['', "q", undefined][0] : "" | "q" +>['', "q", undefined] : ("" | "q")[] +>'' : "" +>"q" : "q" >undefined : undefined >0 : number @@ -566,11 +566,11 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[undefined, "q", ''][0] : string ->[undefined, "q", ''] : string[] +>[undefined, "q", ''][0] : "q" | "" +>[undefined, "q", ''] : ("q" | "")[] >undefined : undefined ->"q" : string ->'' : string +>"q" : "q" +>'' : "" >0 : number (this.voidIfAny([null, "q", ''][0])); @@ -580,11 +580,11 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[null, "q", ''][0] : string ->[null, "q", ''] : string[] +>[null, "q", ''][0] : "q" | "" +>[null, "q", ''] : ("q" | "")[] >null : null ->"q" : string ->'' : string +>"q" : "q" +>'' : "" >0 : number (this.voidIfAny(["q", '', null][0])); @@ -594,10 +594,10 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->["q", '', null][0] : string ->["q", '', null] : string[] ->"q" : string ->'' : string +>["q", '', null][0] : "q" | "" +>["q", '', null] : ("q" | "")[] +>"q" : "q" +>'' : "" >null : null >0 : number @@ -608,10 +608,10 @@ module NonEmptyTypes { >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >this : this >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->[undefined, '', null][0] : string ->[undefined, '', null] : string[] +>[undefined, '', null][0] : "" +>[undefined, '', null] : ""[] >undefined : undefined ->'' : string +>'' : "" >null : null >0 : number @@ -677,16 +677,16 @@ module NonEmptyTypes { >x : string >y : base >base : base ->[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : ({ x: undefined; y: base; } | { x: string; y: derived; })[] +>[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : ({ x: undefined; y: base; } | { x: ""; y: derived; })[] >{ x: undefined, y: new base() } : { x: undefined; y: base; } >x : undefined >undefined : undefined >y : base >new base() : base >base : typeof base ->{ x: '', y: new derived() } : { x: string; y: derived; } ->x : string ->'' : string +>{ x: '', y: new derived() } : { x: ""; y: derived; } +>x : "" +>'' : "" >y : derived >new derived() : derived >derived : typeof derived @@ -698,60 +698,60 @@ module NonEmptyTypes { // Order matters here so test all the variants var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; >a1 : { x: any; y: string; }[] ->[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[] ->{ x: 0, y: 'a' } : { x: number; y: string; } +>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: "a"; }[] +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string +>y : "a" +>'a' : "a" var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; >a2 : { x: any; y: string; }[] ->[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[] ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: "a"; }[] +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string ->{ x: 0, y: 'a' } : { x: number; y: string; } +>y : "a" +>'a' : "a" +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; >a3 : { x: any; y: string; }[] ->[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[] ->{ x: 0, y: 'a' } : { x: number; y: string; } +>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: "a"; }[] +>{ x: 0, y: 'a' } : { x: number; y: "a"; } >x : number >0 : number ->y : string ->'a' : string ->{ x: anyObj, y: 'a' } : { x: any; y: string; } +>y : "a" +>'a' : "a" +>{ x: anyObj, y: 'a' } : { x: any; y: "a"; } >x : any >anyObj : any ->y : string ->'a' : string ->{ x: 'a', y: 'a' } : { x: string; y: string; } ->x : string ->'a' : string ->y : string ->'a' : string +>y : "a" +>'a' : "a" +>{ x: 'a', y: 'a' } : { x: "a"; y: "a"; } +>x : "a" +>'a' : "a" +>y : "a" +>'a' : "a" var ifaceObj: iface = null; >ifaceObj : iface diff --git a/tests/baselines/reference/arrayConcat2.types b/tests/baselines/reference/arrayConcat2.types index a49046c871f2f..6c8e0613869ce 100644 --- a/tests/baselines/reference/arrayConcat2.types +++ b/tests/baselines/reference/arrayConcat2.types @@ -8,15 +8,15 @@ a.concat("hello", 'world'); >a.concat : { (...items: U[]): string[]; (...items: string[]): string[]; } >a : string[] >concat : { (...items: U[]): string[]; (...items: string[]): string[]; } ->"hello" : string ->'world' : string +>"hello" : "hello" +>'world' : "world" a.concat('Hello'); >a.concat('Hello') : string[] >a.concat : { (...items: U[]): string[]; (...items: string[]): string[]; } >a : string[] >concat : { (...items: U[]): string[]; (...items: string[]): string[]; } ->'Hello' : string +>'Hello' : "Hello" var b = new Array(); >b : string[] @@ -28,5 +28,5 @@ b.concat('hello'); >b.concat : { (...items: U[]): string[]; (...items: string[]): string[]; } >b : string[] >concat : { (...items: U[]): string[]; (...items: string[]): string[]; } ->'hello' : string +>'hello' : "hello" diff --git a/tests/baselines/reference/arrayConstructors1.types b/tests/baselines/reference/arrayConstructors1.types index 89807cd034805..394f7f57ed398 100644 --- a/tests/baselines/reference/arrayConstructors1.types +++ b/tests/baselines/reference/arrayConstructors1.types @@ -14,16 +14,16 @@ x = new Array('hi', 'bye'); >x : string[] >new Array('hi', 'bye') : string[] >Array : ArrayConstructor ->'hi' : string ->'bye' : string +>'hi' : "hi" +>'bye' : "bye" x = new Array('hi', 'bye'); >x = new Array('hi', 'bye') : string[] >x : string[] >new Array('hi', 'bye') : string[] >Array : ArrayConstructor ->'hi' : string ->'bye' : string +>'hi' : "hi" +>'bye' : "bye" var y: number[]; >y : number[] diff --git a/tests/baselines/reference/arrayLiteralComments.types b/tests/baselines/reference/arrayLiteralComments.types index a8c32b48e41a3..c5275b2fb175f 100644 --- a/tests/baselines/reference/arrayLiteralComments.types +++ b/tests/baselines/reference/arrayLiteralComments.types @@ -1,7 +1,7 @@ === tests/cases/compiler/arrayLiteralComments.ts === var testArrayWithFunc = [ >testArrayWithFunc : ((() => void) | string | number | { a: number; } | number[])[] ->[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : ((() => void) | string | number | { a: number; } | number[])[] +>[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : ((() => void) | "1" | number | { a: number; } | number[])[] // Function comment function() { @@ -14,7 +14,7 @@ var testArrayWithFunc = [ }, // String comment '1', ->'1' : string +>'1' : "1" // Numeric comment 2, diff --git a/tests/baselines/reference/arrayLiteralContextualType.types b/tests/baselines/reference/arrayLiteralContextualType.types index 0513908929e5a..f9d65aa2dff36 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.types +++ b/tests/baselines/reference/arrayLiteralContextualType.types @@ -11,11 +11,11 @@ class Giraffe { name = "Giraffe"; >name : string ->"Giraffe" : string +>"Giraffe" : "Giraffe" neckLength = "3m"; >neckLength : string ->"3m" : string +>"3m" : "3m" } class Elephant { @@ -23,11 +23,11 @@ class Elephant { name = "Elephant"; >name : string ->"Elephant" : string +>"Elephant" : "Elephant" trunkDiameter = "20cm"; >trunkDiameter : string ->"20cm" : string +>"20cm" : "20cm" } function foo(animals: IAnimal[]) { } diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types index fcbaa22bc6a03..4b46e0bf29f00 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types @@ -8,6 +8,6 @@ panic([], 'one', 'two'); >panic([], 'one', 'two') : void >panic : (val: string[], ...opt: string[]) => void >[] : undefined[] ->'one' : string ->'two' : string +>'one' : "one" +>'two' : "two" diff --git a/tests/baselines/reference/arrayLiteralSpread.types b/tests/baselines/reference/arrayLiteralSpread.types index 7b9a34c0abee0..1c1dd7e134e00 100644 --- a/tests/baselines/reference/arrayLiteralSpread.types +++ b/tests/baselines/reference/arrayLiteralSpread.types @@ -88,8 +88,8 @@ function f1() { var b = ["hello", ...a, true]; >b : (string | number | boolean)[] ->["hello", ...a, true] : (string | number | boolean)[] ->"hello" : string +>["hello", ...a, true] : ("hello" | number | boolean)[] +>"hello" : "hello" >...a : number >a : number[] >true : boolean diff --git a/tests/baselines/reference/arrayLiterals2ES5.types b/tests/baselines/reference/arrayLiterals2ES5.types index a9cf31611c26f..eddb2d3dddc6d 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.types +++ b/tests/baselines/reference/arrayLiterals2ES5.types @@ -19,19 +19,19 @@ var a0 = [,, 2, 3, 4] var a1 = ["hello", "world"] >a1 : string[] ->["hello", "world"] : string[] ->"hello" : string ->"world" : string +>["hello", "world"] : ("hello" | "world")[] +>"hello" : "hello" +>"world" : "world" var a2 = [, , , ...a0, "hello"]; >a2 : (number | string)[] ->[, , , ...a0, "hello"] : (number | string)[] +>[, , , ...a0, "hello"] : (number | "hello")[] > : undefined > : undefined > : undefined >...a0 : number >a0 : number[] ->"hello" : string +>"hello" : "hello" var a3 = [,, ...a0] >a3 : number[] @@ -72,14 +72,14 @@ var b0: [any, any, any] = [undefined, null, undefined]; var b1: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; >b1 : [number[], string[]] ->[[1, 2, 3], ["hello", "string"]] : [number[], string[]] +>[[1, 2, 3], ["hello", "string"]] : [number[], ("hello" | "string")[]] >[1, 2, 3] : number[] >1 : number >2 : number >3 : number ->["hello", "string"] : string[] ->"hello" : string ->"string" : string +>["hello", "string"] : ("hello" | "string")[] +>"hello" : "hello" +>"string" : "string" // The resulting type an array literal expression is determined as follows: // - If the array literal contains no spread elements and is an array assignment pattern in a destructuring assignment (section 4.17.1), @@ -105,10 +105,10 @@ var [c2, c3] = [1, 2, true]; // tuple type [number, number, boolean] // non - spread element expressions and the numeric index signature types of the spread element expressions var temp = ["s", "t", "r"]; >temp : string[] ->["s", "t", "r"] : string[] ->"s" : string ->"t" : string ->"r" : string +>["s", "t", "r"] : ("s" | "t" | "r")[] +>"s" : "s" +>"t" : "t" +>"r" : "r" var temp1 = [1, 2, 3]; >temp1 : number[] @@ -119,14 +119,14 @@ var temp1 = [1, 2, 3]; var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; >temp2 : [number[], string[]] ->[[1, 2, 3], ["hello", "string"]] : [number[], string[]] +>[[1, 2, 3], ["hello", "string"]] : [number[], ("hello" | "string")[]] >[1, 2, 3] : number[] >1 : number >2 : number >3 : number ->["hello", "string"] : string[] ->"hello" : string ->"string" : string +>["hello", "string"] : ("hello" | "string")[] +>"hello" : "hello" +>"string" : "string" var temp3 = [undefined, null, undefined]; >temp3 : any[] @@ -215,11 +215,11 @@ var d8: number[][] = [[...temp1]] var d9 = [[...temp1], ...["hello"]]; >d9 : (number[] | string)[] ->[[...temp1], ...["hello"]] : (number[] | string)[] +>[[...temp1], ...["hello"]] : (number[] | "hello")[] >[...temp1] : number[] >...temp1 : number >temp1 : number[] ->...["hello"] : string ->["hello"] : string[] ->"hello" : string +>...["hello"] : "hello" +>["hello"] : "hello"[] +>"hello" : "hello" diff --git a/tests/baselines/reference/arrayLiterals2ES6.types b/tests/baselines/reference/arrayLiterals2ES6.types index b6bf4f1de1b39..4cb9a6a9bb26e 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.types +++ b/tests/baselines/reference/arrayLiterals2ES6.types @@ -19,19 +19,19 @@ var a0 = [, , 2, 3, 4] var a1 = ["hello", "world"] >a1 : string[] ->["hello", "world"] : string[] ->"hello" : string ->"world" : string +>["hello", "world"] : ("hello" | "world")[] +>"hello" : "hello" +>"world" : "world" var a2 = [, , , ...a0, "hello"]; >a2 : (number | string)[] ->[, , , ...a0, "hello"] : (number | string)[] +>[, , , ...a0, "hello"] : (number | "hello")[] > : undefined > : undefined > : undefined >...a0 : number >a0 : number[] ->"hello" : string +>"hello" : "hello" var a3 = [, , ...a0] >a3 : number[] @@ -72,14 +72,14 @@ var b0: [any, any, any] = [undefined, null, undefined]; var b1: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; >b1 : [number[], string[]] ->[[1, 2, 3], ["hello", "string"]] : [number[], string[]] +>[[1, 2, 3], ["hello", "string"]] : [number[], ("hello" | "string")[]] >[1, 2, 3] : number[] >1 : number >2 : number >3 : number ->["hello", "string"] : string[] ->"hello" : string ->"string" : string +>["hello", "string"] : ("hello" | "string")[] +>"hello" : "hello" +>"string" : "string" // The resulting type an array literal expression is determined as follows: // - If the array literal contains no spread elements and is an array assignment pattern in a destructuring assignment (section 4.17.1), @@ -105,10 +105,10 @@ var [c2, c3] = [1, 2, true]; // tuple type [number, number, boolean] // non - spread element expressions and the numeric index signature types of the spread element expressions var temp = ["s", "t", "r"]; >temp : string[] ->["s", "t", "r"] : string[] ->"s" : string ->"t" : string ->"r" : string +>["s", "t", "r"] : ("s" | "t" | "r")[] +>"s" : "s" +>"t" : "t" +>"r" : "r" var temp1 = [1, 2, 3]; >temp1 : number[] @@ -119,14 +119,14 @@ var temp1 = [1, 2, 3]; var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; >temp2 : [number[], string[]] ->[[1, 2, 3], ["hello", "string"]] : [number[], string[]] +>[[1, 2, 3], ["hello", "string"]] : [number[], ("hello" | "string")[]] >[1, 2, 3] : number[] >1 : number >2 : number >3 : number ->["hello", "string"] : string[] ->"hello" : string ->"string" : string +>["hello", "string"] : ("hello" | "string")[] +>"hello" : "hello" +>"string" : "string" interface myArray extends Array { } >myArray : myArray @@ -202,11 +202,11 @@ var d8: number[][] = [[...temp1]] var d9 = [[...temp1], ...["hello"]]; >d9 : (number[] | string)[] ->[[...temp1], ...["hello"]] : (number[] | string)[] +>[[...temp1], ...["hello"]] : (number[] | "hello")[] >[...temp1] : number[] >...temp1 : number >temp1 : number[] ->...["hello"] : string ->["hello"] : string[] ->"hello" : string +>...["hello"] : "hello" +>["hello"] : "hello"[] +>"hello" : "hello" diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.types b/tests/baselines/reference/arrayOfFunctionTypes3.types index 0ed92991ed08a..d5d211b0780fc 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.types +++ b/tests/baselines/reference/arrayOfFunctionTypes3.types @@ -66,7 +66,7 @@ var r5 = r4(''); // any not string >r5 : any >r4('') : any >r4 : { (x: number): number; (x: any): any; } ->'' : string +>'' : "" var r5b = r4(1); >r5b : number @@ -112,5 +112,5 @@ var r7 = r6(''); // any not string >r7 : any >r6('') : any >r6 : { (x: number): number; (x: T): any; } ->'' : string +>'' : "" diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types index eedd20944fe2f..c07115a08a430 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.types +++ b/tests/baselines/reference/arrowFunctionExpressions.types @@ -217,7 +217,7 @@ function someOtherFn() { >(n: number) => '' + n : (n: number) => string >n : number >'' + n : string ->'' : string +>'' : "" >n : number arr(4).charAt(0); @@ -277,7 +277,7 @@ var g = f('')(); >f('')() : string >f('') : () => string >f : (n: string) => () => string ->'' : string +>'' : "" var g: string; >g : string @@ -314,7 +314,7 @@ var h = someOuterFn()('')()(); >someOuterFn()('') : () => () => number >someOuterFn() : (n: string) => () => () => number >someOuterFn : () => (n: string) => () => () => number ->'' : string +>'' : "" h.toExponential(); >h.toExponential() : string @@ -348,7 +348,7 @@ function tryCatchFn() { >() => this + '' : () => string >this + '' : string >this : any ->'' : string +>'' : "" } } diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types index 0093ace2d9caf..62eb2eae28479 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types @@ -4,11 +4,11 @@ var a = () => { name: "foo", message: "bar" }; >() => { name: "foo", message: "bar" } : () => Error >{ name: "foo", message: "bar" } : Error >Error : Error ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var b = () => ({ name: "foo", message: "bar" }); >b : () => Error @@ -16,21 +16,21 @@ var b = () => ({ name: "foo", message: "bar" }); >({ name: "foo", message: "bar" }) : Error >{ name: "foo", message: "bar" } : Error >Error : Error ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var c = () => ({ name: "foo", message: "bar" }); >c : () => { name: string; message: string; } >() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } ->({ name: "foo", message: "bar" }) : { name: string; message: string; } ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>({ name: "foo", message: "bar" }) : { name: "foo"; message: "bar"; } +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var d = () => ((({ name: "foo", message: "bar" }))); >d : () => Error @@ -39,10 +39,10 @@ var d = () => ((({ name: "foo", message: "bar" }))); >(({ name: "foo", message: "bar" })) : Error >({ name: "foo", message: "bar" }) : Error >Error : Error ->({ name: "foo", message: "bar" }) : { name: string; message: string; } ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>({ name: "foo", message: "bar" }) : { name: "foo"; message: "bar"; } +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types index 31d2a63fec022..683f579b46921 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types @@ -4,11 +4,11 @@ var a = () => { name: "foo", message: "bar" }; >() => { name: "foo", message: "bar" } : () => Error >{ name: "foo", message: "bar" } : Error >Error : Error ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var b = () => ({ name: "foo", message: "bar" }); >b : () => Error @@ -16,21 +16,21 @@ var b = () => ({ name: "foo", message: "bar" }); >({ name: "foo", message: "bar" }) : Error >{ name: "foo", message: "bar" } : Error >Error : Error ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var c = () => ({ name: "foo", message: "bar" }); >c : () => { name: string; message: string; } >() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } ->({ name: "foo", message: "bar" }) : { name: string; message: string; } ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>({ name: "foo", message: "bar" }) : { name: "foo"; message: "bar"; } +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" var d = () => ((({ name: "foo", message: "bar" }))); >d : () => Error @@ -39,10 +39,10 @@ var d = () => ((({ name: "foo", message: "bar" }))); >(({ name: "foo", message: "bar" })) : Error >({ name: "foo", message: "bar" }) : Error >Error : Error ->({ name: "foo", message: "bar" }) : { name: string; message: string; } ->{ name: "foo", message: "bar" } : { name: string; message: string; } ->name : string ->"foo" : string ->message : string ->"bar" : string +>({ name: "foo", message: "bar" }) : { name: "foo"; message: "bar"; } +>{ name: "foo", message: "bar" } : { name: "foo"; message: "bar"; } +>name : "foo" +>"foo" : "foo" +>message : "bar" +>"bar" : "bar" diff --git a/tests/baselines/reference/asOperator1.types b/tests/baselines/reference/asOperator1.types index cc8a49ddc55fa..bc029532d669d 100644 --- a/tests/baselines/reference/asOperator1.types +++ b/tests/baselines/reference/asOperator1.types @@ -29,7 +29,7 @@ var j = 32 as number|string; >32 : number j = ''; ->j = '' : string +>j = '' : "" >j : number | string ->'' : string +>'' : "" diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types index 3e6aade9a2180..744687429ce14 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types @@ -13,6 +13,6 @@ module // this is the identifier 'module' >module : string "my external module" // this is just a string ->"my external module" : string +>"my external module" : "my external module" { } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types index 676718539938e..ae82f5f68a458 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types @@ -16,7 +16,7 @@ module container { >module : string "my external module" // this is just a string ->"my external module" : string +>"my external module" : "my external module" { } // this is a block body } diff --git a/tests/baselines/reference/assignEveryTypeToAny.types b/tests/baselines/reference/assignEveryTypeToAny.types index dfff671a875b3..92b51412c4da0 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.types +++ b/tests/baselines/reference/assignEveryTypeToAny.types @@ -33,13 +33,13 @@ x = b; >b : boolean x = ""; ->x = "" : string +>x = "" : "" >x : any ->"" : string +>"" : "" var c = ""; >c : string ->"" : string +>"" : "" x = c; >x = c : string diff --git a/tests/baselines/reference/assignmentCompatForEnums.types b/tests/baselines/reference/assignmentCompatForEnums.types index e8b48bd02bd3e..3d60cace4579a 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.types +++ b/tests/baselines/reference/assignmentCompatForEnums.types @@ -27,7 +27,7 @@ function foo() { >TokenType : TokenType >list['one'] : any >list : {} ->'one' : string +>'one' : "one" } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.types b/tests/baselines/reference/assignmentCompatWithObjectMembers.types index f56b0b1dc74bc..d2d4c79ed0847 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.types @@ -47,15 +47,15 @@ module SimpleTypes { var a2 = { foo: '' }; >a2 : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" var b2 = { foo: '' }; >b2 : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" s = t; >s = t : T diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.types b/tests/baselines/reference/assignmentCompatWithObjectMembers2.types index 560644f860e46..4674c08502650 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.types @@ -48,15 +48,15 @@ var b: { foo: string; baz?: string } var a2 = { foo: '' }; >a2 : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" var b2 = { foo: '' }; >b2 : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" s = t; >s = t : T diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.types b/tests/baselines/reference/assignmentCompatWithObjectMembers3.types index 3046c2f609d5b..07e342045a008 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.types @@ -51,16 +51,16 @@ var b: { foo: string; baz?: string } var a2: S2 = { foo: '' }; >a2 : S2 >S2 : S2 ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" var b2: T2 = { foo: '' }; >b2 : T2 >T2 : T2 ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" s = t; >s = t : T diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types index 440ef006e0a67..1c0d596a3ca0c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types @@ -42,13 +42,13 @@ var b: { 1.0: string; baz?: string } var a2 = { 1.0: '' }; >a2 : { 1.0: string; } ->{ 1.0: '' } : { 1.0: string; } ->'' : string +>{ 1.0: '' } : { 1.0: ""; } +>'' : "" var b2 = { 1: '' }; >b2 : { 1: string; } ->{ 1: '' } : { 1: string; } ->'' : string +>{ 1: '' } : { 1: ""; } +>'' : "" s = t; >s = t : T diff --git a/tests/baselines/reference/assignmentLHSIsReference.types b/tests/baselines/reference/assignmentLHSIsReference.types index 47204740165ff..dfb3b236c0aa2 100644 --- a/tests/baselines/reference/assignmentLHSIsReference.types +++ b/tests/baselines/reference/assignmentLHSIsReference.types @@ -37,7 +37,7 @@ x3['a'] = value; >x3['a'] = value : any >x3['a'] : string >x3 : { a: string; } ->'a' : string +>'a' : "a" >value : any // parentheses, the contained expression is reference @@ -71,6 +71,6 @@ function fn2(x4: number) { >(x3['a']) : string >x3['a'] : string >x3 : { a: string; } ->'a' : string +>'a' : "a" >value : any diff --git a/tests/baselines/reference/assignmentStricterConstraints.types b/tests/baselines/reference/assignmentStricterConstraints.types index 3a72d92f51c06..d81b0ed3d2dc9 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.types +++ b/tests/baselines/reference/assignmentStricterConstraints.types @@ -35,5 +35,5 @@ g(1, "") >g(1, "") : void >g : (x: T, y: S) => void >1 : number ->"" : string +>"" : "" diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types index c47c98ebc9c9a..d8388fc81a883 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types @@ -23,23 +23,23 @@ var r1 = o['data']; // Should be number >r1 : number >o['data'] : number >o : {} ->'data' : string +>'data' : "data" var r2 = o['functionData']; // Should be any (no property found) >r2 : any >o['functionData'] : any >o : {} ->'functionData' : string +>'functionData' : "functionData" var r3 = f['functionData']; // Should be string >r3 : string >f['functionData'] : string >f : () => void ->'functionData' : string +>'functionData' : "functionData" var r4 = f['data']; // Should be number >r4 : number >f['data'] : number >f : () => void ->'data' : string +>'data' : "data" diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.types b/tests/baselines/reference/awaitBinaryExpression1_es6.types index 4718f5f8fe9a2..7dd9a1a4315d2 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.types @@ -11,7 +11,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = await p || a; >b : boolean @@ -21,5 +21,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.types b/tests/baselines/reference/awaitBinaryExpression2_es6.types index 6154377a6f1df..d9f3aed7a6690 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.types @@ -11,7 +11,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = await p && a; >b : boolean @@ -21,5 +21,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.types b/tests/baselines/reference/awaitBinaryExpression3_es6.types index 2d5b087d6e38a..6b8da1c7c5870 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.types @@ -11,7 +11,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = await p + a; >b : number @@ -21,5 +21,5 @@ async function func(): Promise { >a : number "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.types b/tests/baselines/reference/awaitBinaryExpression4_es6.types index 80135203a8237..3106a52b9015b 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.types @@ -11,7 +11,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = await p, a; >b : boolean @@ -20,5 +20,5 @@ async function func(): Promise { >a : any "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.types b/tests/baselines/reference/awaitBinaryExpression5_es6.types index 8b76b6f8b883b..7d659589950d0 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.types @@ -11,7 +11,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var o: { a: boolean; }; >o : { a: boolean; } @@ -26,5 +26,5 @@ async function func(): Promise { >p : Promise "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression1_es6.types b/tests/baselines/reference/awaitCallExpression1_es6.types index 334175b7edbcd..12734d538e07b 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.types +++ b/tests/baselines/reference/awaitCallExpression1_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = fn(a, a, a); >b : void @@ -50,5 +50,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression2_es6.types b/tests/baselines/reference/awaitCallExpression2_es6.types index 1617f4a14ff26..4791e4e072ff7 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.types +++ b/tests/baselines/reference/awaitCallExpression2_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = fn(await p, a, a); >b : void @@ -51,5 +51,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression3_es6.types b/tests/baselines/reference/awaitCallExpression3_es6.types index 6304a803f644a..defd54e5601a9 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.types +++ b/tests/baselines/reference/awaitCallExpression3_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = fn(a, await p, a); >b : void @@ -51,5 +51,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression4_es6.types b/tests/baselines/reference/awaitCallExpression4_es6.types index ff5d8f4012b3d..e0e45fc1ca34b 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.types +++ b/tests/baselines/reference/awaitCallExpression4_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = (await pfn)(a, a, a); >b : void @@ -52,5 +52,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression5_es6.types b/tests/baselines/reference/awaitCallExpression5_es6.types index 5074c007743c3..5d7a85e9845b0 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.types +++ b/tests/baselines/reference/awaitCallExpression5_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = o.fn(a, a, a); >b : void @@ -52,5 +52,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression6_es6.types b/tests/baselines/reference/awaitCallExpression6_es6.types index 3266733fab00e..f7901103c57b3 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.types +++ b/tests/baselines/reference/awaitCallExpression6_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = o.fn(await p, a, a); >b : void @@ -53,5 +53,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression7_es6.types b/tests/baselines/reference/awaitCallExpression7_es6.types index b1b382f732503..1c321bcb3632e 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.types +++ b/tests/baselines/reference/awaitCallExpression7_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = o.fn(a, await p, a); >b : void @@ -53,5 +53,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/awaitCallExpression8_es6.types b/tests/baselines/reference/awaitCallExpression8_es6.types index 76719c09c85b5..8cc95c375bea8 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.types +++ b/tests/baselines/reference/awaitCallExpression8_es6.types @@ -39,7 +39,7 @@ async function func(): Promise { >Promise : Promise "before"; ->"before" : string +>"before" : "before" var b = (await po).fn(a, a, a); >b : void @@ -54,5 +54,5 @@ async function func(): Promise { >a : boolean "after"; ->"after" : string +>"after" : "after" } diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types index ef9ecfb2a1190..de1dd9d81e6d6 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types @@ -30,10 +30,10 @@ var derived2: Derived2; var r2 = true ? 1 : ''; >r2 : number | string ->true ? 1 : '' : number | string +>true ? 1 : '' : number | "" >true : boolean >1 : number ->'' : string +>'' : "" var r9 = true ? derived : derived2; >r9 : Derived | Derived2 diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.types b/tests/baselines/reference/bestCommonTypeOfTuple.types index 7d3330f486341..bb787c6482a53 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple.types @@ -2,7 +2,7 @@ function f1(x: number): string { return "foo"; } >f1 : (x: number) => string >x : number ->"foo" : string +>"foo" : "foo" function f2(x: number): number { return 10; } >f2 : (x: number) => number diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.types b/tests/baselines/reference/bestCommonTypeOfTuple2.types index 573e346637601..c1d7794b51705 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.types @@ -30,14 +30,14 @@ class C1 implements base1 { i = "foo"; c } >C1 : C1 >base1 : base1 >i : string ->"foo" : string +>"foo" : "foo" >c : any class D1 extends C1 { i = "bar"; d } >D1 : D1 >C1 : C1 >i : string ->"bar" : string +>"bar" : "bar" >d : any var t1: [C, base]; diff --git a/tests/baselines/reference/binaryIntegerLiteral.types b/tests/baselines/reference/binaryIntegerLiteral.types index 4ff3c3c28a37c..3ad1f285484dd 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.types +++ b/tests/baselines/reference/binaryIntegerLiteral.types @@ -17,10 +17,10 @@ var bin4 = 0B1111111111111111111111111111111111111111111111111111111111111111111 var obj1 = { >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } +>{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: "Hello"; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0b11010: "Hello", ->"Hello" : string +>"Hello" : "Hello" a: bin1, >a : number @@ -39,10 +39,10 @@ var obj1 = { var obj2 = { >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } +>{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: "World"; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0B11010: "World", ->"World" : string +>"World" : "World" a: bin2, >a : number @@ -72,32 +72,32 @@ obj1[26]; // string obj1["26"]; // string >obj1["26"] : string >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"26" : string +>"26" : "26" obj1["0b11010"]; // any >obj1["0b11010"] : any >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"0b11010" : string +>"0b11010" : "0b11010" obj1["a"]; // number >obj1["a"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"a" : string +>"a" : "a" obj1["b"]; // number >obj1["b"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"b" : string +>"b" : "b" obj1["bin1"]; // number >obj1["bin1"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"bin1" : string +>"bin1" : "bin1" obj1["Infinity"]; // boolean >obj1["Infinity"] : boolean >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" obj2[0B11010]; // string >obj2[0B11010] : string @@ -112,27 +112,27 @@ obj2[26]; // string obj2["26"]; // string >obj2["26"] : string >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"26" : string +>"26" : "26" obj2["0B11010"]; // any >obj2["0B11010"] : any >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"0B11010" : string +>"0B11010" : "0B11010" obj2["a"]; // number >obj2["a"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"a" : string +>"a" : "a" obj2["b"]; // number >obj2["b"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"b" : string +>"b" : "b" obj2["bin2"]; // number >obj2["bin2"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"bin2" : string +>"bin2" : "bin2" obj2[9.671406556917009e+24]; // boolean >obj2[9.671406556917009e+24] : boolean @@ -142,11 +142,11 @@ obj2[9.671406556917009e+24]; // boolean obj2["9.671406556917009e+24"]; // boolean >obj2["9.671406556917009e+24"] : boolean >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"9.671406556917009e+24" : string +>"9.671406556917009e+24" : "9.671406556917009e+24" obj2["Infinity"]; // any >obj2["Infinity"] : any >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.types b/tests/baselines/reference/binaryIntegerLiteralES6.types index 47bfe6f548d92..6eb5eab1d1b34 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.types +++ b/tests/baselines/reference/binaryIntegerLiteralES6.types @@ -17,10 +17,10 @@ var bin4 = 0B1111111111111111111111111111111111111111111111111111111111111111111 var obj1 = { >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } +>{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: "Hello"; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0b11010: "Hello", ->"Hello" : string +>"Hello" : "Hello" a: bin1, >a : number @@ -39,10 +39,10 @@ var obj1 = { var obj2 = { >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } +>{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: "World"; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0B11010: "World", ->"World" : string +>"World" : "World" a: bin2, >a : number @@ -72,32 +72,32 @@ obj1[26]; // string obj1["26"]; // string >obj1["26"] : string >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"26" : string +>"26" : "26" obj1["0b11010"]; // any >obj1["0b11010"] : any >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"0b11010" : string +>"0b11010" : "0b11010" obj1["a"]; // number >obj1["a"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"a" : string +>"a" : "a" obj1["b"]; // number >obj1["b"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"b" : string +>"b" : "b" obj1["bin1"]; // number >obj1["bin1"] : number >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"bin1" : string +>"bin1" : "bin1" obj1["Infinity"]; // boolean >obj1["Infinity"] : boolean >obj1 : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" obj2[0B11010]; // string >obj2[0B11010] : string @@ -112,27 +112,27 @@ obj2[26]; // string obj2["26"]; // string >obj2["26"] : string >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"26" : string +>"26" : "26" obj2["0B11010"]; // any >obj2["0B11010"] : any >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"0B11010" : string +>"0B11010" : "0B11010" obj2["a"]; // number >obj2["a"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"a" : string +>"a" : "a" obj2["b"]; // number >obj2["b"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"b" : string +>"b" : "b" obj2["bin2"]; // number >obj2["bin2"] : number >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"bin2" : string +>"bin2" : "bin2" obj2[9.671406556917009e+24]; // boolean >obj2[9.671406556917009e+24] : boolean @@ -142,12 +142,12 @@ obj2[9.671406556917009e+24]; // boolean obj2["9.671406556917009e+24"]; // boolean >obj2["9.671406556917009e+24"] : boolean >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"9.671406556917009e+24" : string +>"9.671406556917009e+24" : "9.671406556917009e+24" obj2["Infinity"]; // any >obj2["Infinity"] : any >obj2 : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.types b/tests/baselines/reference/binopAssignmentShouldHaveType.types index d09138bbb8851..0d47f9039d04b 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.types +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.types @@ -3,7 +3,7 @@ declare var console; >console : any "use strict"; ->"use strict" : string +>"use strict" : "use strict" module Test { >Test : typeof Test @@ -15,7 +15,7 @@ module Test { >getName : () => string return "name"; ->"name" : string +>"name" : "name" } bug() { >bug : () => void diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types index bb8be9b3f54e3..cf570cc012653 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types @@ -18,7 +18,7 @@ var ResultIsNumber2 = ~ENUM1["A"]; >~ENUM1["A"] : number >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" var ResultIsNumber3 = ~(ENUM1.A + ENUM1["B"]); >ResultIsNumber3 : number @@ -30,7 +30,7 @@ var ResultIsNumber3 = ~(ENUM1.A + ENUM1["B"]); >A : ENUM1 >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" // multiple ~ operators var ResultIsNumber4 = ~~~(ENUM1["A"] + ENUM1.B); @@ -42,7 +42,7 @@ var ResultIsNumber4 = ~~~(ENUM1["A"] + ENUM1.B); >ENUM1["A"] + ENUM1.B : number >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" >ENUM1.B : ENUM1 >ENUM1 : typeof ENUM1 >B : ENUM1 @@ -56,7 +56,7 @@ var ResultIsNumber4 = ~~~(ENUM1["A"] + ENUM1.B); >~ENUM1["A"] : number >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" ~ENUM1.A, ~ENUM1["B"]; >~ENUM1.A, ~ENUM1["B"] : number @@ -67,5 +67,5 @@ var ResultIsNumber4 = ~~~(ENUM1["A"] + ENUM1.B); >~ENUM1["B"] : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types index 4f1ca481a1f60..0865934267914 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types @@ -5,13 +5,13 @@ var STRING: string; var STRING1: string[] = ["", "abc"]; >STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string +>["", "abc"] : ("" | "abc")[] +>"" : "" +>"abc" : "abc" function foo(): string { return "abc"; } >foo : () => string ->"abc" : string +>"abc" : "abc" class A { >A : A @@ -21,7 +21,7 @@ class A { static foo() { return ""; } >foo : () => string ->"" : string +>"" : "" } module M { >M : typeof M @@ -50,23 +50,23 @@ var ResultIsNumber2 = ~STRING1; var ResultIsNumber3 = ~""; >ResultIsNumber3 : number >~"" : number ->"" : string +>"" : "" var ResultIsNumber4 = ~{ x: "", y: "" }; >ResultIsNumber4 : number >~{ x: "", y: "" } : number ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string +>{ x: "", y: "" } : { x: ""; y: ""; } +>x : "" +>"" : "" +>y : "" +>"" : "" var ResultIsNumber5 = ~{ x: "", y: (s: string) => { return s; } }; >ResultIsNumber5 : number >~{ x: "", y: (s: string) => { return s; } } : number ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string +>{ x: "", y: (s: string) => { return s; } } : { x: ""; y: (s: string) => string; } +>x : "" +>"" : "" >y : (s: string) => string >(s: string) => { return s; } : (s: string) => string >s : string diff --git a/tests/baselines/reference/booleanPropertyAccess.types b/tests/baselines/reference/booleanPropertyAccess.types index 2795b36cee525..4ae74b01a92f9 100644 --- a/tests/baselines/reference/booleanPropertyAccess.types +++ b/tests/baselines/reference/booleanPropertyAccess.types @@ -15,5 +15,5 @@ var b = x['toString'](); >x['toString']() : string >x['toString'] : () => string >x : boolean ->'toString' : string +>'toString' : "toString" diff --git a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types index fe7d3a6ad089c..26f767a1600c0 100644 --- a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types @@ -18,5 +18,5 @@ var y = i(""); // y should be string >y : string >i("") : string >i : I ->"" : string +>"" : "" diff --git a/tests/baselines/reference/callWithSpread.types b/tests/baselines/reference/callWithSpread.types index eae92c471e91f..b768fba7e2356 100644 --- a/tests/baselines/reference/callWithSpread.types +++ b/tests/baselines/reference/callWithSpread.types @@ -35,7 +35,7 @@ foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"abc" : string +>"abc" : "abc" foo(1, 2, ...a); >foo(1, 2, ...a) : void @@ -52,7 +52,7 @@ foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" obj.foo(1, 2, "abc"); >obj.foo(1, 2, "abc") : any @@ -61,7 +61,7 @@ obj.foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" obj.foo(1, 2, ...a); >obj.foo(1, 2, ...a) : any @@ -82,7 +82,7 @@ obj.foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" (obj.foo)(1, 2, "abc"); >(obj.foo)(1, 2, "abc") : any @@ -92,7 +92,7 @@ obj.foo(1, 2, ...a, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" (obj.foo)(1, 2, ...a); >(obj.foo)(1, 2, ...a) : any @@ -115,7 +115,7 @@ obj.foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" xa[1].foo(1, 2, "abc"); >xa[1].foo(1, 2, "abc") : any @@ -126,7 +126,7 @@ xa[1].foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" xa[1].foo(1, 2, ...a); >xa[1].foo(1, 2, ...a) : any @@ -151,7 +151,7 @@ xa[1].foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" (xa[1].foo)(...[1, 2, "abc"]); >(xa[1].foo)(...[1, 2, "abc"]) : any @@ -163,11 +163,11 @@ xa[1].foo(1, 2, ...a, "abc"); >xa : X[] >1 : number >foo : (x: number, y: number, ...z: string[]) => any ->...[1, 2, "abc"] : number | string ->[1, 2, "abc"] : (number | string)[] +>...[1, 2, "abc"] : number | "abc" +>[1, 2, "abc"] : (number | "abc")[] >1 : number >2 : number ->"abc" : string +>"abc" : "abc" class C { >C : C diff --git a/tests/baselines/reference/callWithSpreadES6.types b/tests/baselines/reference/callWithSpreadES6.types index b0c118855fef7..b3866baf89748 100644 --- a/tests/baselines/reference/callWithSpreadES6.types +++ b/tests/baselines/reference/callWithSpreadES6.types @@ -36,7 +36,7 @@ foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"abc" : string +>"abc" : "abc" foo(1, 2, ...a); >foo(1, 2, ...a) : void @@ -53,7 +53,7 @@ foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" obj.foo(1, 2, "abc"); >obj.foo(1, 2, "abc") : any @@ -62,7 +62,7 @@ obj.foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" obj.foo(1, 2, ...a); >obj.foo(1, 2, ...a) : any @@ -83,7 +83,7 @@ obj.foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" (obj.foo)(1, 2, "abc"); >(obj.foo)(1, 2, "abc") : any @@ -93,7 +93,7 @@ obj.foo(1, 2, ...a, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" (obj.foo)(1, 2, ...a); >(obj.foo)(1, 2, ...a) : any @@ -116,7 +116,7 @@ obj.foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" xa[1].foo(1, 2, "abc"); >xa[1].foo(1, 2, "abc") : any @@ -127,7 +127,7 @@ xa[1].foo(1, 2, "abc"); >foo : (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"abc" : string +>"abc" : "abc" xa[1].foo(1, 2, ...a); >xa[1].foo(1, 2, ...a) : any @@ -152,7 +152,7 @@ xa[1].foo(1, 2, ...a, "abc"); >2 : number >...a : string >a : string[] ->"abc" : string +>"abc" : "abc" (xa[1].foo)(...[1, 2, "abc"]); >(xa[1].foo)(...[1, 2, "abc"]) : any @@ -164,11 +164,11 @@ xa[1].foo(1, 2, ...a, "abc"); >xa : X[] >1 : number >foo : (x: number, y: number, ...z: string[]) => any ->...[1, 2, "abc"] : number | string ->[1, 2, "abc"] : (number | string)[] +>...[1, 2, "abc"] : number | "abc" +>[1, 2, "abc"] : (number | "abc")[] >1 : number >2 : number ->"abc" : string +>"abc" : "abc" class C { >C : C diff --git a/tests/baselines/reference/capturedLetConstInLoop5.types b/tests/baselines/reference/capturedLetConstInLoop5.types index b7b4b880dc4c1..ab03cc453bdfa 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.types +++ b/tests/baselines/reference/capturedLetConstInLoop5.types @@ -74,7 +74,7 @@ function foo00(x) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" return; } @@ -549,7 +549,7 @@ function foo00_c(x) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" return; } diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.types b/tests/baselines/reference/capturedLetConstInLoop5_ES6.types index 855bbfc63086a..d7e8675b312ad 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.types @@ -75,7 +75,7 @@ function foo00(x) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" return; } @@ -550,7 +550,7 @@ function foo00_c(x) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" return; } diff --git a/tests/baselines/reference/capturedLetConstInLoop6.types b/tests/baselines/reference/capturedLetConstInLoop6.types index f2b1103305fb8..2ce18c5c62ce7 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.types +++ b/tests/baselines/reference/capturedLetConstInLoop6.types @@ -47,14 +47,14 @@ for (let x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } @@ -412,14 +412,14 @@ for (const x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.types b/tests/baselines/reference/capturedLetConstInLoop6_ES6.types index cfd55a63aaab2..ea6eb5858081a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.types @@ -47,14 +47,14 @@ for (let x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } @@ -412,14 +412,14 @@ for (const x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } diff --git a/tests/baselines/reference/capturedLetConstInLoop7.types b/tests/baselines/reference/capturedLetConstInLoop7.types index 29ea34e39a16b..456343cd67f39 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.types +++ b/tests/baselines/reference/capturedLetConstInLoop7.types @@ -69,14 +69,14 @@ for (let x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break l00; >l00 : any @@ -84,14 +84,14 @@ for (let x in []) { if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue l00; >l00 : any @@ -623,14 +623,14 @@ for (const x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break l00_c; >l00_c : any @@ -638,14 +638,14 @@ for (const x in []) { if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue l00_c; >l00_c : any diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.types b/tests/baselines/reference/capturedLetConstInLoop7_ES6.types index c72afb4194200..288e68948a13c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.types @@ -69,14 +69,14 @@ for (let x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break l00; >l00 : any @@ -84,14 +84,14 @@ for (let x in []) { if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue l00; >l00 : any @@ -623,14 +623,14 @@ for (const x in []) { if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break; } if (x == "1") { >x == "1" : boolean >x : string ->"1" : string +>"1" : "1" break l00_c; >l00_c : any @@ -638,14 +638,14 @@ for (const x in []) { if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue; } if (x == "2") { >x == "2" : boolean >x : string ->"2" : string +>"2" : "2" continue l00_c; >l00_c : any diff --git a/tests/baselines/reference/capturedLetConstInLoop8.types b/tests/baselines/reference/capturedLetConstInLoop8.types index 9c3db88535c86..dd26be013f537 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.types +++ b/tests/baselines/reference/capturedLetConstInLoop8.types @@ -113,7 +113,7 @@ function foo() { >2 : number return "123" ->"123" : string +>"123" : "123" } if (x == 3) { >x == 3 : boolean @@ -167,7 +167,7 @@ function foo() { >2 : number return "456"; ->"456" : string +>"456" : "456" } if (x == 3) { >x == 3 : boolean @@ -288,7 +288,7 @@ function foo_c() { >2 : number return "123" ->"123" : string +>"123" : "123" } if (x == 3) { >x == 3 : boolean @@ -342,7 +342,7 @@ function foo_c() { >2 : number return "456"; ->"456" : string +>"456" : "456" } if (x == 3) { >x == 3 : boolean diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.types b/tests/baselines/reference/capturedLetConstInLoop8_ES6.types index 7911e9b63a259..5023b8a689b31 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.types @@ -113,7 +113,7 @@ function foo() { >2 : number return "123" ->"123" : string +>"123" : "123" } if (x == 3) { >x == 3 : boolean @@ -167,7 +167,7 @@ function foo() { >2 : number return "456"; ->"456" : string +>"456" : "456" } if (x == 3) { >x == 3 : boolean @@ -288,7 +288,7 @@ function foo_c() { >2 : number return "123" ->"123" : string +>"123" : "123" } if (x == 3) { >x == 3 : boolean @@ -342,7 +342,7 @@ function foo_c() { >2 : number return "456"; ->"456" : string +>"456" : "456" } if (x == 3) { >x == 3 : boolean diff --git a/tests/baselines/reference/castExpressionParentheses.types b/tests/baselines/reference/castExpressionParentheses.types index cdfbf4f7db236..ff1454d1dc650 100644 --- a/tests/baselines/reference/castExpressionParentheses.types +++ b/tests/baselines/reference/castExpressionParentheses.types @@ -21,7 +21,7 @@ declare var a; ("string"); >("string") : any >"string" : any ->"string" : string +>"string" : "string" (23.0); >(23.0) : any @@ -115,7 +115,7 @@ declare var a; >a.b : any >a : any >b : any ->"0" : string +>"0" : "0" (a()).x; >(a()).x : any diff --git a/tests/baselines/reference/castTest.types b/tests/baselines/reference/castTest.types index 35698219fd43f..1d0c4847bcd86 100644 --- a/tests/baselines/reference/castTest.types +++ b/tests/baselines/reference/castTest.types @@ -28,7 +28,7 @@ var b = true; var s = ""; >s : string >"" : string ->"" : string +>"" : "" var ar = null; >ar : any[] diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types index fa394b4e0bd32..30f584894fcc3 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -23,7 +23,7 @@ class A { >v : string case "test": use(this); ->"test" : string +>"test" : "test" >use(this) : void >use : (a: any) => void >this : this diff --git a/tests/baselines/reference/circularObjectLiteralAccessors.types b/tests/baselines/reference/circularObjectLiteralAccessors.types index 1f01432db5a24..eb6e86db4d8f2 100644 --- a/tests/baselines/reference/circularObjectLiteralAccessors.types +++ b/tests/baselines/reference/circularObjectLiteralAccessors.types @@ -4,7 +4,7 @@ const a = { >a : { b: { foo: string; }; foo: string; } ->{ b: { get foo(): string { return a.foo; }, set foo(value: string) { a.foo = value; } }, foo: ''} : { b: { foo: string; }; foo: string; } +>{ b: { get foo(): string { return a.foo; }, set foo(value: string) { a.foo = value; } }, foo: ''} : { b: { foo: string; }; foo: ""; } b: { >b : { foo: string; } @@ -32,7 +32,7 @@ const a = { } }, foo: '' ->foo : string ->'' : string +>foo : "" +>'' : "" }; diff --git a/tests/baselines/reference/classAppearsToHaveMembersOfObject.types b/tests/baselines/reference/classAppearsToHaveMembersOfObject.types index 65c37e7dfeb47..9c87fa18ecddb 100644 --- a/tests/baselines/reference/classAppearsToHaveMembersOfObject.types +++ b/tests/baselines/reference/classAppearsToHaveMembersOfObject.types @@ -20,7 +20,7 @@ var r2 = c.hasOwnProperty(''); >c.hasOwnProperty : (v: string) => boolean >c : C >hasOwnProperty : (v: string) => boolean ->'' : string +>'' : "" var o: Object = c; >o : Object diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.types b/tests/baselines/reference/classDoesNotDependOnBaseTypes.types index c342f0ea002cd..7e6677c08ba89 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.types +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.types @@ -7,14 +7,14 @@ if (typeof x !== "string") { >typeof x !== "string" : boolean >typeof x : string >x : string | StringTreeCollection ->"string" : string +>"string" : "string" x[0] = ""; ->x[0] = "" : string +>x[0] = "" : "" >x[0] : string | StringTreeCollection >x : StringTreeCollection >0 : number ->"" : string +>"" : "" x[0] = new StringTreeCollection; >x[0] = new StringTreeCollection : StringTreeCollection diff --git a/tests/baselines/reference/classExpression5.types b/tests/baselines/reference/classExpression5.types index 25c4b66b8f331..cf207c1cb0baa 100644 --- a/tests/baselines/reference/classExpression5.types +++ b/tests/baselines/reference/classExpression5.types @@ -9,7 +9,7 @@ new class { >hi : () => string return "Hi!"; ->"Hi!" : string +>"Hi!" : "Hi!" } }().hi(); >hi : () => string diff --git a/tests/baselines/reference/classExtendingClass.types b/tests/baselines/reference/classExtendingClass.types index f91493e97fdf5..831a490cea047 100644 --- a/tests/baselines/reference/classExtendingClass.types +++ b/tests/baselines/reference/classExtendingClass.types @@ -102,7 +102,7 @@ var r7 = d2.thing(''); >d2.thing : (x: string) => void >d2 : D2 >thing : (x: string) => void ->'' : string +>'' : "" var r8 = D2.other(1); >r8 : void diff --git a/tests/baselines/reference/classWithEmptyBody.types b/tests/baselines/reference/classWithEmptyBody.types index 1ac111796e807..d3fc31f451ab2 100644 --- a/tests/baselines/reference/classWithEmptyBody.types +++ b/tests/baselines/reference/classWithEmptyBody.types @@ -17,11 +17,11 @@ c = 1; >1 : number c = { foo: '' } ->c = { foo: '' } : { foo: string; } +>c = { foo: '' } : { foo: ""; } >c : C ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" c = () => { } >c = () => { } : () => void @@ -51,11 +51,11 @@ d = 1; >1 : number d = { foo: '' } ->d = { foo: '' } : { foo: string; } +>d = { foo: '' } : { foo: ""; } >d : D ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" d = () => { } >d = () => { } : () => void diff --git a/tests/baselines/reference/classWithProtectedProperty.types b/tests/baselines/reference/classWithProtectedProperty.types index 1f53ea2aad9b4..079c749c377c4 100644 --- a/tests/baselines/reference/classWithProtectedProperty.types +++ b/tests/baselines/reference/classWithProtectedProperty.types @@ -9,32 +9,32 @@ class C { protected a = ''; >a : string ->'' : string +>'' : "" protected b: string = ''; >b : string ->'' : string +>'' : "" protected c() { return '' } >c : () => string ->'' : string +>'' : "" protected d = () => ''; >d : () => string >() => '' : () => string ->'' : string +>'' : "" protected static e; >e : any protected static f() { return '' } >f : () => string ->'' : string +>'' : "" protected static g = () => ''; >g : () => string >() => '' : () => string ->'' : string +>'' : "" } class D extends C { diff --git a/tests/baselines/reference/classWithPublicProperty.types b/tests/baselines/reference/classWithPublicProperty.types index 09d3c0668d155..1ea0c2920e47d 100644 --- a/tests/baselines/reference/classWithPublicProperty.types +++ b/tests/baselines/reference/classWithPublicProperty.types @@ -7,32 +7,32 @@ class C { public a = ''; >a : string ->'' : string +>'' : "" public b: string = ''; >b : string ->'' : string +>'' : "" public c() { return '' } >c : () => string ->'' : string +>'' : "" public d = () => ''; >d : () => string >() => '' : () => string ->'' : string +>'' : "" public static e; >e : any public static f() { return '' } >f : () => string ->'' : string +>'' : "" public static g = () => ''; >g : () => string >() => '' : () => string ->'' : string +>'' : "" } // all of these are valid diff --git a/tests/baselines/reference/classdecl.types b/tests/baselines/reference/classdecl.types index 6339873656343..18049016c5fe5 100644 --- a/tests/baselines/reference/classdecl.types +++ b/tests/baselines/reference/classdecl.types @@ -49,7 +49,7 @@ class a { >p3 : string return "string"; ->"string" : string +>"string" : "string" } private pv3; >pv3 : any diff --git a/tests/baselines/reference/cloduleTest1.types b/tests/baselines/reference/cloduleTest1.types index 67c1fd6120fe2..059329a3d8a12 100644 --- a/tests/baselines/reference/cloduleTest1.types +++ b/tests/baselines/reference/cloduleTest1.types @@ -30,7 +30,7 @@ >$('.foo').addClass : (className: string) => $ >$('.foo') : $ >$ : typeof $ ->'.foo' : string +>'.foo' : ".foo" >addClass : (className: string) => $ ->'bar' : string +>'bar' : "bar" diff --git a/tests/baselines/reference/collisionExportsRequireAndFunctionInGlobalFile.types b/tests/baselines/reference/collisionExportsRequireAndFunctionInGlobalFile.types index 3cc0835950811..dc876bb29be29 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunctionInGlobalFile.types +++ b/tests/baselines/reference/collisionExportsRequireAndFunctionInGlobalFile.types @@ -9,7 +9,7 @@ function require() { >require : () => string return "require"; ->"require" : string +>"require" : "require" } module m3 { >m3 : typeof m3 @@ -24,7 +24,7 @@ module m3 { >require : () => string return "require"; ->"require" : string +>"require" : "require" } } module m4 { @@ -40,6 +40,6 @@ module m4 { >require : () => string return "require"; ->"require" : string +>"require" : "require" } } diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types index fadc27dfa6c4a..8245f487915d9 100644 --- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types +++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types @@ -6,7 +6,7 @@ declare var console: { log(msg?: string): void; }; var _i = "This is what I'd expect to see"; >_i : string ->"This is what I'd expect to see" : string +>"This is what I'd expect to see" : "This is what I'd expect to see" class Foo { >Foo : Foo diff --git a/tests/baselines/reference/commaOperatorOtherValidOperation.types b/tests/baselines/reference/commaOperatorOtherValidOperation.types index bc7bdd8115701..1711d4a862220 100644 --- a/tests/baselines/reference/commaOperatorOtherValidOperation.types +++ b/tests/baselines/reference/commaOperatorOtherValidOperation.types @@ -32,7 +32,7 @@ var resultIsString = foo(1, "123"); >foo(1, "123") : string >foo : (x: number, y: string) => string >1 : number ->"123" : string +>"123" : "123" //TypeParameters function foo1() diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.types b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.types index a8217c2d2485d..abbb545ccc77c 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.types +++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.types @@ -94,7 +94,7 @@ var x: any; "string", [null, 1]; >"string", [null, 1] : number[] ->"string" : string +>"string" : "string" >[null, 1] : number[] >null : null >1 : number @@ -103,7 +103,7 @@ var x: any; >"string".charAt(0), [null, 1] : number[] >"string".charAt(0) : string >"string".charAt : (pos: number) => string ->"string" : string +>"string" : "string" >charAt : (pos: number) => string >0 : number >[null, 1] : number[] @@ -115,7 +115,7 @@ true, x("any"); >true : boolean >x("any") : any >x : any ->"any" : string +>"any" : "any" !BOOLEAN, x.doSomeThing(); >!BOOLEAN, x.doSomeThing() : any @@ -145,7 +145,7 @@ var resultIsAny8 = ("string", null); >resultIsAny8 : any >("string", null) : null >"string", null : null ->"string" : string +>"string" : "string" >null : null var resultIsAny9 = ("string".charAt(0), undefined); @@ -154,7 +154,7 @@ var resultIsAny9 = ("string".charAt(0), undefined); >"string".charAt(0), undefined : undefined >"string".charAt(0) : string >"string".charAt : (pos: number) => string ->"string" : string +>"string" : "string" >charAt : (pos: number) => string >0 : number >undefined : undefined @@ -166,7 +166,7 @@ var resultIsAny10 = (true, x("any")); >true : boolean >x("any") : any >x : any ->"any" : string +>"any" : "any" var resultIsAny11 = (!BOOLEAN, x.doSomeThing()); >resultIsAny11 : any diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.types b/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.types index 13aae51e0cb33..0b8c4b967d292 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.types +++ b/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.types @@ -104,7 +104,7 @@ BOOLEAN = false, 1; "", NUMBER = 1; >"", NUMBER = 1 : number ->"" : string +>"" : "" >NUMBER = 1 : number >NUMBER : number >1 : number @@ -155,7 +155,7 @@ var resultIsNumber10 = ("", NUMBER = 1); >resultIsNumber10 : number >("", NUMBER = 1) : number >"", NUMBER = 1 : number ->"" : string +>"" : "" >NUMBER = 1 : number >NUMBER : number >1 : number diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.types b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.types index 9c948da969978..c186f608e0657 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.types +++ b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.types @@ -110,7 +110,7 @@ true, {} "string", new Date() >"string", new Date() : Date ->"string" : string +>"string" : "string" >new Date() : Date >Date : DateConstructor @@ -148,21 +148,21 @@ var resultIsObject8 = (true, {}); var resultIsObject9 = (!BOOLEAN, { a: 1, b: "s" }); >resultIsObject9 : { a: number; b: string; } ->(!BOOLEAN, { a: 1, b: "s" }) : { a: number; b: string; } ->!BOOLEAN, { a: 1, b: "s" } : { a: number; b: string; } +>(!BOOLEAN, { a: 1, b: "s" }) : { a: number; b: "s"; } +>!BOOLEAN, { a: 1, b: "s" } : { a: number; b: "s"; } >!BOOLEAN : boolean >BOOLEAN : boolean ->{ a: 1, b: "s" } : { a: number; b: string; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" var resultIsObject10 = ("string", new Date()); >resultIsObject10 : Date >("string", new Date()) : Date >"string", new Date() : Date ->"string" : string +>"string" : "string" >new Date() : Date >Date : DateConstructor diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.types b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.types index a28202876d25e..19bd5de8445fc 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.types +++ b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.types @@ -95,22 +95,22 @@ ANY = new Date(), STRING; >STRING : string true, ""; ->true, "" : string +>true, "" : "" >true : boolean ->"" : string +>"" : "" BOOLEAN == undefined, ""; ->BOOLEAN == undefined, "" : string +>BOOLEAN == undefined, "" : "" >BOOLEAN == undefined : boolean >BOOLEAN : boolean >undefined : undefined ->"" : string +>"" : "" ["a", "b"], NUMBER.toString(); >["a", "b"], NUMBER.toString() : string ->["a", "b"] : string[] ->"a" : string ->"b" : string +>["a", "b"] : ("a" | "b")[] +>"a" : "a" +>"b" : "b" >NUMBER.toString() : string >NUMBER.toString : (radix?: number) => string >NUMBER : number @@ -124,7 +124,7 @@ OBJECT = new Object, STRING + "string"; >Object : ObjectConstructor >STRING + "string" : string >STRING : string ->"string" : string +>"string" : "string" var resultIsString6 = (null, STRING); >resultIsString6 : string @@ -145,27 +145,27 @@ var resultIsString7 = (ANY = new Date(), STRING); var resultIsString8 = (true, ""); >resultIsString8 : string ->(true, "") : string ->true, "" : string +>(true, "") : "" +>true, "" : "" >true : boolean ->"" : string +>"" : "" var resultIsString9 = (BOOLEAN == undefined, ""); >resultIsString9 : string ->(BOOLEAN == undefined, "") : string ->BOOLEAN == undefined, "" : string +>(BOOLEAN == undefined, "") : "" +>BOOLEAN == undefined, "" : "" >BOOLEAN == undefined : boolean >BOOLEAN : boolean >undefined : undefined ->"" : string +>"" : "" var resultIsString10 = (["a", "b"], NUMBER.toString()); >resultIsString10 : string >(["a", "b"], NUMBER.toString()) : string >["a", "b"], NUMBER.toString() : string ->["a", "b"] : string[] ->"a" : string ->"b" : string +>["a", "b"] : ("a" | "b")[] +>"a" : "a" +>"b" : "b" >NUMBER.toString() : string >NUMBER.toString : (radix?: number) => string >NUMBER : number @@ -179,5 +179,5 @@ var resultIsString11 = (new Object, STRING + "string"); >Object : ObjectConstructor >STRING + "string" : string >STRING : string ->"string" : string +>"string" : "string" diff --git a/tests/baselines/reference/commentBeforeStaticMethod1.types b/tests/baselines/reference/commentBeforeStaticMethod1.types index 1b16709a701d1..0c9e69ed7a08c 100644 --- a/tests/baselines/reference/commentBeforeStaticMethod1.types +++ b/tests/baselines/reference/commentBeforeStaticMethod1.types @@ -9,6 +9,6 @@ class C { >foo : () => string return "bar"; ->"bar" : string +>"bar" : "bar" } } diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.types b/tests/baselines/reference/commentEmitAtEndOfFile1.types index f96a1069a06cf..2071e98af8d8f 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.types +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.types @@ -3,7 +3,7 @@ // test var f = '' >f : string ->'' : string +>'' : "" // test #2 module foo { diff --git a/tests/baselines/reference/commentsArgumentsOfCallExpression2.types b/tests/baselines/reference/commentsArgumentsOfCallExpression2.types index f0a10077e669a..3a4522b05ab7f 100644 --- a/tests/baselines/reference/commentsArgumentsOfCallExpression2.types +++ b/tests/baselines/reference/commentsArgumentsOfCallExpression2.types @@ -51,5 +51,5 @@ foo( /*e4*/ /*e5*/ "hello"); ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/commentsFunction.types b/tests/baselines/reference/commentsFunction.types index db5e518339d0e..314e17b1e1e76 100644 --- a/tests/baselines/reference/commentsFunction.types +++ b/tests/baselines/reference/commentsFunction.types @@ -26,7 +26,7 @@ function fooWithParameters(/** this is comment about a*/a: string, fooWithParameters("a", 10); >fooWithParameters("a", 10) : void >fooWithParameters : (a: string, b: number) => void ->"a" : string +>"a" : "a" >10 : number /** fooFunc diff --git a/tests/baselines/reference/commentsInterface.types b/tests/baselines/reference/commentsInterface.types index 13cc2b19f605c..f194de4555295 100644 --- a/tests/baselines/reference/commentsInterface.types +++ b/tests/baselines/reference/commentsInterface.types @@ -92,7 +92,7 @@ var i2_i_i2_si = i2_i["hello"]; >i2_i_i2_si : any >i2_i["hello"] : any >i2_i : i2 ->"hello" : string +>"hello" : "hello" var i2_i_i2_ii = i2_i[30]; >i2_i_i2_ii : number @@ -203,7 +203,7 @@ i3_i = { >(/**i3_i a*/a: number) => "Hello" + a : (a: number) => string >a : number >"Hello" + a : string ->"Hello" : string +>"Hello" : "Hello" >a : number l: this.f, diff --git a/tests/baselines/reference/commentsOnPropertyOfObjectLiteral1.types b/tests/baselines/reference/commentsOnPropertyOfObjectLiteral1.types index 93ce87558d8b7..e6b35d090aa53 100644 --- a/tests/baselines/reference/commentsOnPropertyOfObjectLiteral1.types +++ b/tests/baselines/reference/commentsOnPropertyOfObjectLiteral1.types @@ -1,7 +1,7 @@ === tests/cases/compiler/commentsOnPropertyOfObjectLiteral1.ts === var resolve = { >resolve : { id: (details: any) => any; id1: string; id2: (details: any) => any; id3: (details: any) => any; id4: (details: any) => any; } ->{ id: /*! @ngInject */ (details: any) => details.id, id1: /* c1 */ "hello", id2: /*! @ngInject */ (details: any) => details.id, id3: /*! @ngInject */ (details: any) => details.id, id4: /*! @ngInject */ /* C2 */ (details: any) => details.id,} : { id: (details: any) => any; id1: string; id2: (details: any) => any; id3: (details: any) => any; id4: (details: any) => any; } +>{ id: /*! @ngInject */ (details: any) => details.id, id1: /* c1 */ "hello", id2: /*! @ngInject */ (details: any) => details.id, id3: /*! @ngInject */ (details: any) => details.id, id4: /*! @ngInject */ /* C2 */ (details: any) => details.id,} : { id: (details: any) => any; id1: "hello"; id2: (details: any) => any; id3: (details: any) => any; id4: (details: any) => any; } id: /*! @ngInject */ (details: any) => details.id, >id : (details: any) => any @@ -12,8 +12,8 @@ var resolve = { >id : any id1: /* c1 */ "hello", ->id1 : string ->"hello" : string +>id1 : "hello" +>"hello" : "hello" id2: >id2 : (details: any) => any diff --git a/tests/baselines/reference/commentsOnStaticMembers.types b/tests/baselines/reference/commentsOnStaticMembers.types index 46a1ca211ffd1..b4fae1094b68e 100644 --- a/tests/baselines/reference/commentsOnStaticMembers.types +++ b/tests/baselines/reference/commentsOnStaticMembers.types @@ -8,7 +8,7 @@ class test { */ public static p1: string = ""; >p1 : string ->"" : string +>"" : "" /** * p2 comment does not appear in output @@ -21,7 +21,7 @@ class test { */ private static p3: string = ""; >p3 : string ->"" : string +>"" : "" /** * p4 comment does not appear in output diff --git a/tests/baselines/reference/commentsOverloads.types b/tests/baselines/reference/commentsOverloads.types index 3281ab83ab600..998f1b0926691 100644 --- a/tests/baselines/reference/commentsOverloads.types +++ b/tests/baselines/reference/commentsOverloads.types @@ -18,7 +18,7 @@ function f1(aOrb: any) { f1("hello"); >f1("hello") : number >f1 : { (a: number): number; (b: string): number; } ->"hello" : string +>"hello" : "hello" f1(10); >f1(10) : number @@ -45,7 +45,7 @@ function f2(aOrb: any) { f2("hello"); >f2("hello") : number >f2 : { (a: number): number; (b: string): number; } ->"hello" : string +>"hello" : "hello" f2(10); >f2(10) : number @@ -70,7 +70,7 @@ function f3(aOrb: any) { f3("hello"); >f3("hello") : number >f3 : { (a: number): number; (b: string): number; } ->"hello" : string +>"hello" : "hello" f3(10); >f3(10) : number @@ -97,7 +97,7 @@ function f4(aOrb: any) { f4("hello"); >f4("hello") : number >f4 : { (a: number): number; (b: string): number; } ->"hello" : string +>"hello" : "hello" f4(10); >f4(10) : number @@ -411,7 +411,7 @@ var c1_i_2 = new c1("hello"); >c1_i_2 : c1 >new c1("hello") : c1 >c1 : typeof c1 ->"hello" : string +>"hello" : "hello" var c2_i_1 = new c2(10); >c2_i_1 : c2 @@ -423,7 +423,7 @@ var c2_i_2 = new c2("hello"); >c2_i_2 : c2 >new c2("hello") : c2 >c2 : typeof c2 ->"hello" : string +>"hello" : "hello" var c3_i_1 = new c3(10); >c3_i_1 : c3 @@ -435,7 +435,7 @@ var c3_i_2 = new c3("hello"); >c3_i_2 : c3 >new c3("hello") : c3 >c3 : typeof c3 ->"hello" : string +>"hello" : "hello" var c4_i_1 = new c4(10); >c4_i_1 : c4 @@ -447,7 +447,7 @@ var c4_i_2 = new c4("hello"); >c4_i_2 : c4 >new c4("hello") : c4 >c4 : typeof c4 ->"hello" : string +>"hello" : "hello" var c5_i_1 = new c5(10); >c5_i_1 : c5 @@ -459,5 +459,5 @@ var c5_i_2 = new c5("hello"); >c5_i_2 : c5 >new c5("hello") : c5 >c5 : typeof c5 ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/commentsVarDecl.types b/tests/baselines/reference/commentsVarDecl.types index 033590b344516..63e673a5ca0ac 100644 --- a/tests/baselines/reference/commentsVarDecl.types +++ b/tests/baselines/reference/commentsVarDecl.types @@ -13,7 +13,7 @@ var anotherVariable = 30; // shouldn't appear var aVar = ""; >aVar : string ->"" : string +>"" : "" /** this is multiline comment * All these variables are of number type */ diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCanBeAssigned.types b/tests/baselines/reference/compoundAdditionAssignmentLHSCanBeAssigned.types index 92835611c6dcc..16e5a9cc7f10d 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCanBeAssigned.types +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCanBeAssigned.types @@ -36,7 +36,7 @@ x1 += 0; x1 += ''; >x1 += '' : string >x1 : any ->'' : string +>'' : "" x1 += E.a; >x1 += E.a : any @@ -86,7 +86,7 @@ x2 += 0; x2 += ''; >x2 += '' : string >x2 : string ->'' : string +>'' : "" x2 += E.a; >x2 += E.a : string @@ -190,7 +190,7 @@ x6 += a; x6 += ''; >x6 += '' : string >x6 : {} ->'' : string +>'' : "" var x7: void; >x7 : void diff --git a/tests/baselines/reference/compoundAssignmentLHSIsReference.types b/tests/baselines/reference/compoundAssignmentLHSIsReference.types index 12c601d377f65..4816307f50895 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsReference.types +++ b/tests/baselines/reference/compoundAssignmentLHSIsReference.types @@ -54,14 +54,14 @@ x3['a'] *= value; >x3['a'] *= value : number >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any x3['a'] += value; >x3['a'] += value : any >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any // parentheses, the contained expression is reference @@ -115,7 +115,7 @@ function fn2(x4: number) { >(x3['a']) : number >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any (x3['a']) += value; @@ -123,6 +123,6 @@ function fn2(x4: number) { >(x3['a']) : number >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types index 35f42f4fa77db..55b90382d7ba8 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types @@ -37,7 +37,7 @@ x3['a'] **= value; >x3['a'] **= value : number >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any // parentheses, the contained expression is reference @@ -71,6 +71,6 @@ function fn2(x4: number) { >(x3['a']) : number >x3['a'] : number >x3 : { a: number; } ->'a' : string +>'a' : "a" >value : any diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2.types b/tests/baselines/reference/computedPropertiesInDestructuring2.types index 0fa2066227047..137a0793e6dd7 100644 --- a/tests/baselines/reference/computedPropertiesInDestructuring2.types +++ b/tests/baselines/reference/computedPropertiesInDestructuring2.types @@ -2,7 +2,7 @@ let foo2 = () => "bar"; >foo2 : () => string >() => "bar" : () => string ->"bar" : string +>"bar" : "bar" let {[foo2()]: bar3} = {}; >foo2() : string diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types index f0d8b1033c829..979689438d299 100644 --- a/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types +++ b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types @@ -3,7 +3,7 @@ let foo2 = () => "bar"; >foo2 : () => string >() => "bar" : () => string ->"bar" : string +>"bar" : "bar" let {[foo2()]: bar3} = {}; >foo2() : string diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.types b/tests/baselines/reference/computedPropertyNames10_ES5.types index 9dea9cfca9390..6c242461180d3 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.types +++ b/tests/baselines/reference/computedPropertyNames10_ES5.types @@ -33,7 +33,7 @@ var v = { >s : string [""]() { }, ->"" : string +>"" : "" [0]() { }, >0 : number diff --git a/tests/baselines/reference/computedPropertyNames10_ES6.types b/tests/baselines/reference/computedPropertyNames10_ES6.types index d2faa13898076..903e36908fddf 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES6.types +++ b/tests/baselines/reference/computedPropertyNames10_ES6.types @@ -33,7 +33,7 @@ var v = { >s : string [""]() { }, ->"" : string +>"" : "" [0]() { }, >0 : number diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index e0787fc3ee712..ad3e0773e5a1d 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -38,7 +38,7 @@ var v = { >0 : number set [""](v) { }, ->"" : string +>"" : "" >v : any get [0]() { return 0; }, diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index 8ad31a7c2a14e..69a9050d4c9ba 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -38,7 +38,7 @@ var v = { >0 : number set [""](v) { }, ->"" : string +>"" : "" >v : any get [0]() { return 0; }, diff --git a/tests/baselines/reference/computedPropertyNames13_ES5.types b/tests/baselines/reference/computedPropertyNames13_ES5.types index 59694df32a7f7..65624b45a835b 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES5.types +++ b/tests/baselines/reference/computedPropertyNames13_ES5.types @@ -32,7 +32,7 @@ class C { >s : string static [""]() { } ->"" : string +>"" : "" [0]() { } >0 : number diff --git a/tests/baselines/reference/computedPropertyNames13_ES6.types b/tests/baselines/reference/computedPropertyNames13_ES6.types index a2d0f14e72c66..d54146eed41e9 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES6.types +++ b/tests/baselines/reference/computedPropertyNames13_ES6.types @@ -32,7 +32,7 @@ class C { >s : string static [""]() { } ->"" : string +>"" : "" [0]() { } >0 : number diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.types b/tests/baselines/reference/computedPropertyNames16_ES5.types index ab7ea23cffea1..b23c44a1a2a93 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.types +++ b/tests/baselines/reference/computedPropertyNames16_ES5.types @@ -37,7 +37,7 @@ class C { >0 : number static set [""](v) { } ->"" : string +>"" : "" >v : any get [0]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNames16_ES6.types b/tests/baselines/reference/computedPropertyNames16_ES6.types index c7286e6640e1b..45b873f2951ad 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES6.types +++ b/tests/baselines/reference/computedPropertyNames16_ES6.types @@ -37,7 +37,7 @@ class C { >0 : number static set [""](v) { } ->"" : string +>"" : "" >v : any get [0]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.types b/tests/baselines/reference/computedPropertyNames28_ES5.types index 273dcd426d82f..f251d2958a38e 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.types +++ b/tests/baselines/reference/computedPropertyNames28_ES5.types @@ -16,11 +16,11 @@ class C extends Base { >{ [(super(), "prop")]() { } } : {} [(super(), "prop")]() { } ->(super(), "prop") : string ->super(), "prop" : string +>(super(), "prop") : "prop" +>super(), "prop" : "prop" >super() : void >super : typeof Base ->"prop" : string +>"prop" : "prop" }; } diff --git a/tests/baselines/reference/computedPropertyNames28_ES6.types b/tests/baselines/reference/computedPropertyNames28_ES6.types index a34fb33f6c7d7..b9129bda95aa2 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES6.types +++ b/tests/baselines/reference/computedPropertyNames28_ES6.types @@ -16,11 +16,11 @@ class C extends Base { >{ [(super(), "prop")]() { } } : {} [(super(), "prop")]() { } ->(super(), "prop") : string ->super(), "prop" : string +>(super(), "prop") : "prop" +>super(), "prop" : "prop" >super() : void >super : typeof Base ->"prop" : string +>"prop" : "prop" }; } diff --git a/tests/baselines/reference/computedPropertyNames33_ES5.types b/tests/baselines/reference/computedPropertyNames33_ES5.types index f44ac3ca7695d..126c8334659b3 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES5.types +++ b/tests/baselines/reference/computedPropertyNames33_ES5.types @@ -2,7 +2,7 @@ function foo() { return '' } >foo : () => string >T : T ->'' : string +>'' : "" class C { >C : C diff --git a/tests/baselines/reference/computedPropertyNames33_ES6.types b/tests/baselines/reference/computedPropertyNames33_ES6.types index 3081337c8bb3e..6fd0237516d31 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES6.types +++ b/tests/baselines/reference/computedPropertyNames33_ES6.types @@ -2,7 +2,7 @@ function foo() { return '' } >foo : () => string >T : T ->'' : string +>'' : "" class C { >C : C diff --git a/tests/baselines/reference/computedPropertyNames37_ES5.types b/tests/baselines/reference/computedPropertyNames37_ES5.types index 21b68c7c12cb3..b1ba3a4315e95 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5.types +++ b/tests/baselines/reference/computedPropertyNames37_ES5.types @@ -17,12 +17,12 @@ class C { // Computed properties get ["get1"]() { return new Foo } ->"get1" : string +>"get1" : "get1" >new Foo : Foo >Foo : typeof Foo set ["set1"](p: Foo2) { } ->"set1" : string +>"set1" : "set1" >p : Foo2 >Foo2 : Foo2 } diff --git a/tests/baselines/reference/computedPropertyNames37_ES6.types b/tests/baselines/reference/computedPropertyNames37_ES6.types index e436a54172bbc..67c84380e8b50 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES6.types +++ b/tests/baselines/reference/computedPropertyNames37_ES6.types @@ -17,12 +17,12 @@ class C { // Computed properties get ["get1"]() { return new Foo } ->"get1" : string +>"get1" : "get1" >new Foo : Foo >Foo : typeof Foo set ["set1"](p: Foo2) { } ->"set1" : string +>"set1" : "set1" >p : Foo2 >Foo2 : Foo2 } diff --git a/tests/baselines/reference/computedPropertyNames41_ES5.types b/tests/baselines/reference/computedPropertyNames41_ES5.types index 5aa7ae44404f1..0be69bec4a5ea 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES5.types +++ b/tests/baselines/reference/computedPropertyNames41_ES5.types @@ -17,7 +17,7 @@ class C { // Computed properties static [""]() { return new Foo } ->"" : string +>"" : "" >new Foo : Foo >Foo : typeof Foo } diff --git a/tests/baselines/reference/computedPropertyNames41_ES6.types b/tests/baselines/reference/computedPropertyNames41_ES6.types index 70bfcf12a7548..297a41eececdc 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES6.types +++ b/tests/baselines/reference/computedPropertyNames41_ES6.types @@ -17,7 +17,7 @@ class C { // Computed properties static [""]() { return new Foo } ->"" : string +>"" : "" >new Foo : Foo >Foo : typeof Foo } diff --git a/tests/baselines/reference/computedPropertyNames46_ES5.types b/tests/baselines/reference/computedPropertyNames46_ES5.types index 394b22bd9042c..8cf6fdfa6e811 100644 --- a/tests/baselines/reference/computedPropertyNames46_ES5.types +++ b/tests/baselines/reference/computedPropertyNames46_ES5.types @@ -4,8 +4,8 @@ var o = { >{ ["" || 0]: 0} : {} ["" || 0]: 0 ->"" || 0 : string | number ->"" : string +>"" || 0 : "" | number +>"" : "" >0 : number >0 : number diff --git a/tests/baselines/reference/computedPropertyNames46_ES6.types b/tests/baselines/reference/computedPropertyNames46_ES6.types index 864fd81321d29..3ceeae29cffb0 100644 --- a/tests/baselines/reference/computedPropertyNames46_ES6.types +++ b/tests/baselines/reference/computedPropertyNames46_ES6.types @@ -4,8 +4,8 @@ var o = { >{ ["" || 0]: 0} : {} ["" || 0]: 0 ->"" || 0 : string | number ->"" : string +>"" || 0 : "" | number +>"" : "" >0 : number >0 : number diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.types b/tests/baselines/reference/computedPropertyNames48_ES5.types index 2b9131a11c8b0..850f3af115709 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.types +++ b/tests/baselines/reference/computedPropertyNames48_ES5.types @@ -17,24 +17,24 @@ var a: any; extractIndexer({ >extractIndexer({ [a]: ""}) : string >extractIndexer : (p: { [n: number]: T; }) => T ->{ [a]: ""} : { [x: number]: string; } +>{ [a]: ""} : { [x: number]: ""; } [a]: "" >a : any ->"" : string +>"" : "" }); // Should return string extractIndexer({ >extractIndexer({ [E.x]: ""}) : string >extractIndexer : (p: { [n: number]: T; }) => T ->{ [E.x]: ""} : { [x: number]: string; } +>{ [E.x]: ""} : { [x: number]: ""; } [E.x]: "" >E.x : E >E : typeof E >x : E ->"" : string +>"" : "" }); // Should return string @@ -44,9 +44,9 @@ extractIndexer({ >{ ["" || 0]: ""} : { [x: number]: undefined; } ["" || 0]: "" ->"" || 0 : string | number ->"" : string +>"" || 0 : "" | number +>"" : "" >0 : number ->"" : string +>"" : "" }); // Should return any (widened form of undefined) diff --git a/tests/baselines/reference/computedPropertyNames48_ES6.types b/tests/baselines/reference/computedPropertyNames48_ES6.types index 2b803b19bd69b..cd6d71b160758 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES6.types +++ b/tests/baselines/reference/computedPropertyNames48_ES6.types @@ -17,24 +17,24 @@ var a: any; extractIndexer({ >extractIndexer({ [a]: ""}) : string >extractIndexer : (p: { [n: number]: T; }) => T ->{ [a]: ""} : { [x: number]: string; } +>{ [a]: ""} : { [x: number]: ""; } [a]: "" >a : any ->"" : string +>"" : "" }); // Should return string extractIndexer({ >extractIndexer({ [E.x]: ""}) : string >extractIndexer : (p: { [n: number]: T; }) => T ->{ [E.x]: ""} : { [x: number]: string; } +>{ [E.x]: ""} : { [x: number]: ""; } [E.x]: "" >E.x : E >E : typeof E >x : E ->"" : string +>"" : "" }); // Should return string @@ -44,9 +44,9 @@ extractIndexer({ >{ ["" || 0]: ""} : { [x: number]: undefined; } ["" || 0]: "" ->"" || 0 : string | number ->"" : string +>"" || 0 : "" | number +>"" : "" >0 : number ->"" : string +>"" : "" }); // Should return any (widened form of undefined) diff --git a/tests/baselines/reference/computedPropertyNames4_ES5.types b/tests/baselines/reference/computedPropertyNames4_ES5.types index 6984d2e69b8a4..8c24f13d3934d 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES5.types +++ b/tests/baselines/reference/computedPropertyNames4_ES5.types @@ -38,7 +38,7 @@ var v = { >s : string [""]: 0, ->"" : string +>"" : "" >0 : number [0]: 0, diff --git a/tests/baselines/reference/computedPropertyNames4_ES6.types b/tests/baselines/reference/computedPropertyNames4_ES6.types index 1fece561f5ae8..7af0976204964 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES6.types +++ b/tests/baselines/reference/computedPropertyNames4_ES6.types @@ -38,7 +38,7 @@ var v = { >s : string [""]: 0, ->"" : string +>"" : "" >0 : number [0]: 0, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.types index bea7267d7d12d..0fdf931d84994 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.types @@ -18,7 +18,7 @@ var o: I = { ["" + 0](y) { return y.length; }, >"" + 0 : string ->"" : string +>"" : "" >0 : number >y : string >y.length : number @@ -27,7 +27,7 @@ var o: I = { ["" + 1]: y => y.length >"" + 1 : string ->"" : string +>"" : "" >1 : number >y => y.length : (y: string) => number >y : string diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.types index c8d0be6e833d2..fcfec18ecc63c 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.types @@ -18,7 +18,7 @@ var o: I = { ["" + 0](y) { return y.length; }, >"" + 0 : string ->"" : string +>"" : "" >0 : number >y : string >y.length : number @@ -27,7 +27,7 @@ var o: I = { ["" + 1]: y => y.length >"" + 1 : string ->"" : string +>"" : "" >1 : number >y => y.length : (y: string) => number >y : string diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.types index 52de216b803b1..9786bccad6382 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.types @@ -18,7 +18,7 @@ var o: I = { [+"foo"](y) { return y.length; }, >+"foo" : number ->"foo" : string +>"foo" : "foo" >y : string >y.length : number >y : string @@ -26,7 +26,7 @@ var o: I = { [+"bar"]: y => y.length >+"bar" : number ->"bar" : string +>"bar" : "bar" >y => y.length : (y: string) => number >y : string >y.length : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.types index cbbe0edc6a177..ac03043355e70 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.types @@ -18,7 +18,7 @@ var o: I = { [+"foo"](y) { return y.length; }, >+"foo" : number ->"foo" : string +>"foo" : "foo" >y : string >y.length : number >y : string @@ -26,7 +26,7 @@ var o: I = { [+"bar"]: y => y.length >+"bar" : number ->"bar" : string +>"bar" : "bar" >y => y.length : (y: string) => number >y : string >y.length : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.types index 5f647fb4c1b70..81dd005cfbcc5 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.types @@ -14,7 +14,7 @@ var o: I = { [+"foo"](y) { return y.length; }, >+"foo" : number ->"foo" : string +>"foo" : "foo" >y : string >y.length : number >y : string @@ -22,7 +22,7 @@ var o: I = { [+"bar"]: y => y.length >+"bar" : number ->"bar" : string +>"bar" : "bar" >y => y.length : (y: string) => number >y : string >y.length : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.types index e872df6f1b21c..131df3fabe29a 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.types @@ -14,7 +14,7 @@ var o: I = { [+"foo"](y) { return y.length; }, >+"foo" : number ->"foo" : string +>"foo" : "foo" >y : string >y.length : number >y : string @@ -22,7 +22,7 @@ var o: I = { [+"bar"]: y => y.length >+"bar" : number ->"bar" : string +>"bar" : "bar" >y => y.length : (y: string) => number >y : string >y.length : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.types index e5a57363ca060..fffed44e27efc 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.types @@ -12,17 +12,17 @@ interface I { var o: I = { >o : I >I : I ->{ [""+"foo"]: "", [""+"bar"]: 0} : { [x: string]: string | number; [x: number]: undefined; } +>{ [""+"foo"]: "", [""+"bar"]: 0} : { [x: string]: "" | number; [x: number]: undefined; } [""+"foo"]: "", >""+"foo" : string ->"" : string ->"foo" : string ->"" : string +>"" : "" +>"foo" : "foo" +>"" : "" [""+"bar"]: 0 >""+"bar" : string ->"" : string ->"bar" : string +>"" : "" +>"bar" : "bar" >0 : number } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType4_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType4_ES6.types index bdfa569752bab..257f8a0538cb9 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType4_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType4_ES6.types @@ -12,17 +12,17 @@ interface I { var o: I = { >o : I >I : I ->{ [""+"foo"]: "", [""+"bar"]: 0} : { [x: string]: string | number; [x: number]: undefined; } +>{ [""+"foo"]: "", [""+"bar"]: 0} : { [x: string]: "" | number; [x: number]: undefined; } [""+"foo"]: "", >""+"foo" : string ->"" : string ->"foo" : string ->"" : string +>"" : "" +>"foo" : "foo" +>"" : "" [""+"bar"]: 0 >""+"bar" : string ->"" : string ->"bar" : string +>"" : "" +>"bar" : "bar" >0 : number } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.types index e142fe937b998..bc2d6538aa26d 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.types @@ -12,15 +12,15 @@ interface I { var o: I = { >o : I >I : I ->{ [+"foo"]: "", [+"bar"]: 0} : { [x: string]: string | number; [x: number]: string | number; } +>{ [+"foo"]: "", [+"bar"]: 0} : { [x: string]: "" | number; [x: number]: "" | number; } [+"foo"]: "", >+"foo" : number ->"foo" : string ->"" : string +>"foo" : "foo" +>"" : "" [+"bar"]: 0 >+"bar" : number ->"bar" : string +>"bar" : "bar" >0 : number } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType5_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType5_ES6.types index 7b385b36770ec..7642e3fe005d0 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType5_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType5_ES6.types @@ -12,15 +12,15 @@ interface I { var o: I = { >o : I >I : I ->{ [+"foo"]: "", [+"bar"]: 0} : { [x: string]: string | number; [x: number]: string | number; } +>{ [+"foo"]: "", [+"bar"]: 0} : { [x: string]: "" | number; [x: number]: "" | number; } [+"foo"]: "", >+"foo" : number ->"foo" : string ->"" : string +>"foo" : "foo" +>"" : "" [+"bar"]: 0 >+"bar" : number ->"bar" : string +>"bar" : "bar" >0 : number } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types index a3a393fba0cbd..4f642b6eeda48 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types @@ -19,19 +19,19 @@ declare function foo(obj: I): T foo({ >foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | (() => void) | boolean | number | number[] >foo : (obj: I) => T ->{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | (() => void) | boolean | number | number[]; 0: () => void; p: string; } +>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: "" | (() => void) | boolean | number | number[]; 0: () => void; p: ""; } p: "", ->p : string ->"" : string +>p : "" +>"" : "" 0: () => { }, >() => { } : () => void ["hi" + "bye"]: true, >"hi" + "bye" : string ->"hi" : string ->"bye" : string +>"hi" : "hi" +>"bye" : "bye" >true : boolean [0 + 1]: 0, @@ -42,7 +42,7 @@ foo({ [+"hi"]: [0] >+"hi" : number ->"hi" : string +>"hi" : "hi" >[0] : number[] >0 : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types index 4abefe4484331..d8550502a2bd4 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types @@ -19,19 +19,19 @@ declare function foo(obj: I): T foo({ >foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | (() => void) | boolean | number | number[] >foo : (obj: I) => T ->{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | (() => void) | boolean | number | number[]; 0: () => void; p: string; } +>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: "" | (() => void) | boolean | number | number[]; 0: () => void; p: ""; } p: "", ->p : string ->"" : string +>p : "" +>"" : "" 0: () => { }, >() => { } : () => void ["hi" + "bye"]: true, >"hi" + "bye" : string ->"hi" : string ->"bye" : string +>"hi" : "hi" +>"bye" : "bye" >true : boolean [0 + 1]: 0, @@ -42,7 +42,7 @@ foo({ [+"hi"]: [0] >+"hi" : number ->"hi" : string +>"hi" : "hi" >[0] : number[] >0 : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types index ae1004c9819e6..51c4ed53b3416 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types @@ -19,19 +19,19 @@ declare function foo(obj: I): T foo({ >foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : (() => void) | number | number[] >foo : (obj: I) => T ->{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: number]: (() => void) | number | number[]; 0: () => void; p: string; } +>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: number]: (() => void) | number | number[]; 0: () => void; p: ""; } p: "", ->p : string ->"" : string +>p : "" +>"" : "" 0: () => { }, >() => { } : () => void ["hi" + "bye"]: true, >"hi" + "bye" : string ->"hi" : string ->"bye" : string +>"hi" : "hi" +>"bye" : "bye" >true : boolean [0 + 1]: 0, @@ -42,7 +42,7 @@ foo({ [+"hi"]: [0] >+"hi" : number ->"hi" : string +>"hi" : "hi" >[0] : number[] >0 : number diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types index e98e0fb8941d6..47ac6105ec589 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types @@ -19,19 +19,19 @@ declare function foo(obj: I): T foo({ >foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : (() => void) | number | number[] >foo : (obj: I) => T ->{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: number]: (() => void) | number | number[]; 0: () => void; p: string; } +>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: number]: (() => void) | number | number[]; 0: () => void; p: ""; } p: "", ->p : string ->"" : string +>p : "" +>"" : "" 0: () => { }, >() => { } : () => void ["hi" + "bye"]: true, >"hi" + "bye" : string ->"hi" : string ->"bye" : string +>"hi" : "hi" +>"bye" : "bye" >true : boolean [0 + 1]: 0, @@ -42,7 +42,7 @@ foo({ [+"hi"]: [0] >+"hi" : number ->"hi" : string +>"hi" : "hi" >[0] : number[] >0 : number diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.types index a05d555649582..6999ca8c089a4 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.types @@ -4,18 +4,18 @@ class C { ["" + ""]() { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" get ["" + ""]() { return 0; } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.types index 8b635956dcd46..26c48e0665ddb 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.types @@ -4,18 +4,18 @@ class C { ["" + ""]() { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" get ["" + ""]() { return 0; } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.types index c49010b2c0940..f52090af67f1f 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.types @@ -4,18 +4,18 @@ class C { static ["" + ""]() { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" static get ["" + ""]() { return 0; } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number static set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.types index 0b0083b9a1ad1..f835fe45b939f 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.types @@ -4,18 +4,18 @@ class C { static ["" + ""]() { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" static get ["" + ""]() { return 0; } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number static set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.types index 62faa5c2716a8..49a102a631169 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.types @@ -5,24 +5,24 @@ var v = { ["" + ""]: 0, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number ["" + ""]() { }, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" get ["" + ""]() { return 0; }, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.types index 3eb313d268709..b2d1b68d6b2bb 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.types @@ -5,24 +5,24 @@ var v = { ["" + ""]: 0, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number ["" + ""]() { }, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" get ["" + ""]() { return 0; }, >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >0 : number set ["" + ""](x) { } >"" + "" : string ->"" : string ->"" : string +>"" : "" +>"" : "" >x : any } diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.types b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.types index 7f467698a6237..0ce0fd2a24f5d 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.types @@ -3,7 +3,7 @@ class C { >C : C ["hello"]() { ->"hello" : string +>"hello" : "hello" debugger; } diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.types b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.types index 4a78685e8a963..2f53e97cf491b 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.types @@ -3,7 +3,7 @@ class C { >C : C ["hello"]() { ->"hello" : string +>"hello" : "hello" debugger; } diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types index 147b296650998..ad5dc059da5cc 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types @@ -4,7 +4,7 @@ var v = { >{ ["hello"]() { debugger; }} : { ["hello"](): void; } ["hello"]() { ->"hello" : string +>"hello" : "hello" debugger; } diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types index 0033468036299..c8843fabb274a 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types @@ -4,7 +4,7 @@ var v = { >{ ["hello"]() { debugger; }} : { ["hello"](): void; } ["hello"]() { ->"hello" : string +>"hello" : "hello" debugger; } diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types index d003b6b32f110..a534104046869 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types @@ -12,7 +12,7 @@ class C { >staticProp : number return "hello"; ->"hello" : string +>"hello" : "hello" } set [C.staticProp](x: string) { >C.staticProp : number diff --git a/tests/baselines/reference/conditionalExpressions2.types b/tests/baselines/reference/conditionalExpressions2.types index 77714e664fb01..aaa19e3171af1 100644 --- a/tests/baselines/reference/conditionalExpressions2.types +++ b/tests/baselines/reference/conditionalExpressions2.types @@ -30,10 +30,10 @@ var d = false ? false : true; var e = false ? "foo" : "bar"; >e : string ->false ? "foo" : "bar" : string +>false ? "foo" : "bar" : "foo" | "bar" >false : boolean ->"foo" : string ->"bar" : string +>"foo" : "foo" +>"bar" : "bar" var f = false ? null : undefined; >f : any diff --git a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types index 4d28939b696ae..5fc803d83bdc5 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types @@ -121,8 +121,8 @@ typeof "123" == "string" ? exprBoolean1 : exprBoolean2; >typeof "123" == "string" ? exprBoolean1 : exprBoolean2 : boolean >typeof "123" == "string" : boolean >typeof "123" : string ->"123" : string ->"string" : string +>"123" : "123" +>"string" : "string" >exprBoolean1 : boolean >exprBoolean2 : boolean @@ -263,8 +263,8 @@ var resultIsBoolean3 = typeof "123" == "string" ? exprBoolean1 : exprBoolean2; >typeof "123" == "string" ? exprBoolean1 : exprBoolean2 : boolean >typeof "123" == "string" : boolean >typeof "123" : string ->"123" : string ->"string" : string +>"123" : "123" +>"string" : "string" >exprBoolean1 : boolean >exprBoolean2 : boolean @@ -300,8 +300,8 @@ var resultIsStringOrBoolean4 = typeof "123" === "string" ? exprString1 : exprBoo >typeof "123" === "string" ? exprString1 : exprBoolean1 : string | boolean >typeof "123" === "string" : boolean >typeof "123" : string ->"123" : string ->"string" : string +>"123" : "123" +>"string" : "string" >exprString1 : string >exprBoolean1 : boolean diff --git a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types index 5951dc0735008..9c1005f6604f1 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types @@ -141,7 +141,7 @@ var array = [1, 2, 3]; "string".length ? exprNumber1 : exprNumber2; >"string".length ? exprNumber1 : exprNumber2 : number >"string".length : number ->"string" : string +>"string" : "string" >length : number >exprNumber1 : number >exprNumber2 : number @@ -279,7 +279,7 @@ var resultIsNumber3 = "string".length ? exprNumber1 : exprNumber2; >resultIsNumber3 : number >"string".length ? exprNumber1 : exprNumber2 : number >"string".length : number ->"string" : string +>"string" : "string" >length : number >exprNumber1 : number >exprNumber2 : number diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types index 14a0f375ead04..a9f54fdee8b2b 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types @@ -112,34 +112,34 @@ condObject ? exprString1 : exprBoolean1; // union ({ a: 1, b: "s" }) ? exprString1 : exprString2; >({ a: 1, b: "s" }) ? exprString1 : exprString2 : string ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprString1 : string >exprString2 : string ({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; >({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2 : Object ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprIsObject1 : Object >exprIsObject2 : Object ({ a: 1, b: "s" }) ? exprString1: exprBoolean1; // union >({ a: 1, b: "s" }) ? exprString1: exprBoolean1 : string | boolean ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprString1 : string >exprBoolean1 : boolean @@ -268,36 +268,36 @@ var resultIsNumber2 = ({}) ? exprNumber1 : exprNumber2; var resultIsString2 = ({ a: 1, b: "s" }) ? exprString1 : exprString2; >resultIsString2 : string >({ a: 1, b: "s" }) ? exprString1 : exprString2 : string ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprString1 : string >exprString2 : string var resultIsObject2 = ({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; >resultIsObject2 : Object >({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2 : Object ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprIsObject1 : Object >exprIsObject2 : Object var resultIsStringOrBoolean2 = ({ a: 1, b: "s" }) ? exprString1 : exprBoolean1; // union >resultIsStringOrBoolean2 : string | boolean >({ a: 1, b: "s" }) ? exprString1 : exprBoolean1 : string | boolean ->({ a: 1, b: "s" }) : { a: number; b: string; } ->{ a: 1, b: "s" } : { a: number; b: string; } +>({ a: 1, b: "s" }) : { a: number; b: "s"; } +>{ a: 1, b: "s" } : { a: number; b: "s"; } >a : number >1 : number ->b : string ->"s" : string +>b : "s" +>"s" : "s" >exprString1 : string >exprBoolean1 : boolean diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.types b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.types index d79e570ec4245..5903a10d4e58f 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.types +++ b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.types @@ -130,7 +130,7 @@ x("x") ? exprBoolean1 : exprBoolean2; >x("x") ? exprBoolean1 : exprBoolean2 : boolean >x("x") : any >x : any ->"x" : string +>"x" : "x" >exprBoolean1 : boolean >exprBoolean2 : boolean @@ -146,7 +146,7 @@ x("x") ? exprString1 : exprString2; >x("x") ? exprString1 : exprString2 : string >x("x") : any >x : any ->"x" : string +>"x" : "x" >exprString1 : string >exprString2 : string @@ -288,7 +288,7 @@ var resultIsBoolean3 = x("x") ? exprBoolean1 : exprBoolean2; >x("x") ? exprBoolean1 : exprBoolean2 : boolean >x("x") : any >x : any ->"x" : string +>"x" : "x" >exprBoolean1 : boolean >exprBoolean2 : boolean @@ -306,7 +306,7 @@ var resultIsString3 = x("x") ? exprString1 : exprString2; >x("x") ? exprString1 : exprString2 : string >x("x") : any >x : any ->"x" : string +>"x" : "x" >exprString1 : string >exprString2 : string diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types index af5abb25063e8..63034573024ad 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types @@ -75,51 +75,51 @@ condString ? exprString1 : exprBoolean1; // union //Cond is a string type literal "" ? exprAny1 : exprAny2; >"" ? exprAny1 : exprAny2 : any ->"" : string +>"" : "" >exprAny1 : any >exprAny2 : any "string" ? exprBoolean1 : exprBoolean2; >"string" ? exprBoolean1 : exprBoolean2 : boolean ->"string" : string +>"string" : "string" >exprBoolean1 : boolean >exprBoolean2 : boolean 'c' ? exprNumber1 : exprNumber2; >'c' ? exprNumber1 : exprNumber2 : number ->'c' : string +>'c' : "c" >exprNumber1 : number >exprNumber2 : number 'string' ? exprString1 : exprString2; >'string' ? exprString1 : exprString2 : string ->'string' : string +>'string' : "string" >exprString1 : string >exprString2 : string " " ? exprIsObject1 : exprIsObject2; >" " ? exprIsObject1 : exprIsObject2 : Object ->" " : string +>" " : " " >exprIsObject1 : Object >exprIsObject2 : Object "hello " ? exprString1 : exprBoolean1; // union >"hello " ? exprString1 : exprBoolean1 : string | boolean ->"hello " : string +>"hello " : "hello " >exprString1 : string >exprBoolean1 : boolean //Cond is a string type expression function foo() { return "string" }; >foo : () => string ->"string" : string +>"string" : "string" var array = ["1", "2", "3"]; >array : string[] ->["1", "2", "3"] : string[] ->"1" : string ->"2" : string ->"3" : string +>["1", "2", "3"] : ("1" | "2" | "3")[] +>"1" : "1" +>"2" : "2" +>"3" : "3" typeof condString ? exprAny1 : exprAny2; >typeof condString ? exprAny1 : exprAny2 : any @@ -140,7 +140,7 @@ condString + "string" ? exprNumber1 : exprNumber2; >condString + "string" ? exprNumber1 : exprNumber2 : number >condString + "string" : string >condString : string ->"string" : string +>"string" : "string" >exprNumber1 : number >exprNumber2 : number @@ -212,42 +212,42 @@ var resultIsStringOrBoolean1 = condString ? exprString1 : exprBoolean1; // union var resultIsAny2 = "" ? exprAny1 : exprAny2; >resultIsAny2 : any >"" ? exprAny1 : exprAny2 : any ->"" : string +>"" : "" >exprAny1 : any >exprAny2 : any var resultIsBoolean2 = "string" ? exprBoolean1 : exprBoolean2; >resultIsBoolean2 : boolean >"string" ? exprBoolean1 : exprBoolean2 : boolean ->"string" : string +>"string" : "string" >exprBoolean1 : boolean >exprBoolean2 : boolean var resultIsNumber2 = 'c' ? exprNumber1 : exprNumber2; >resultIsNumber2 : number >'c' ? exprNumber1 : exprNumber2 : number ->'c' : string +>'c' : "c" >exprNumber1 : number >exprNumber2 : number var resultIsString2 = 'string' ? exprString1 : exprString2; >resultIsString2 : string >'string' ? exprString1 : exprString2 : string ->'string' : string +>'string' : "string" >exprString1 : string >exprString2 : string var resultIsObject2 = " " ? exprIsObject1 : exprIsObject2; >resultIsObject2 : Object >" " ? exprIsObject1 : exprIsObject2 : Object ->" " : string +>" " : " " >exprIsObject1 : Object >exprIsObject2 : Object var resultIsStringOrBoolean2 = "hello" ? exprString1 : exprBoolean1; // union >resultIsStringOrBoolean2 : string | boolean >"hello" ? exprString1 : exprBoolean1 : string | boolean ->"hello" : string +>"hello" : "hello" >exprString1 : string >exprBoolean1 : boolean @@ -273,7 +273,7 @@ var resultIsNumber3 = condString + "string" ? exprNumber1 : exprNumber2; >condString + "string" ? exprNumber1 : exprNumber2 : number >condString + "string" : string >condString : string ->"string" : string +>"string" : "string" >exprNumber1 : number >exprNumber2 : number diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.types b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.types index 026c8f4227218..05f628355a561 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.types +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.types @@ -51,16 +51,16 @@ true ? {} : 1; >1 : number true ? { a: 1 } : { a: 2, b: 'string' }; ->true ? { a: 1 } : { a: 2, b: 'string' } : { a: number; } | { a: number; b: string; } +>true ? { a: 1 } : { a: 2, b: 'string' } : { a: number; } | { a: number; b: "string"; } >true : boolean >{ a: 1 } : { a: number; } >a : number >1 : number ->{ a: 2, b: 'string' } : { a: number; b: string; } +>{ a: 2, b: 'string' } : { a: number; b: "string"; } >a : number >2 : number ->b : string ->'string' : string +>b : "string" +>'string' : "string" var result2 = true ? {} : 1; >result2 : {} @@ -71,16 +71,16 @@ var result2 = true ? {} : 1; var result3 = true ? { a: 1 } : { a: 2, b: 'string' }; >result3 : { a: number; } | { a: number; b: string; } ->true ? { a: 1 } : { a: 2, b: 'string' } : { a: number; } | { a: number; b: string; } +>true ? { a: 1 } : { a: 2, b: 'string' } : { a: number; } | { a: number; b: "string"; } >true : boolean >{ a: 1 } : { a: number; } >a : number >1 : number ->{ a: 2, b: 'string' } : { a: number; b: string; } +>{ a: 2, b: 'string' } : { a: number; b: "string"; } >a : number >2 : number ->b : string ->'string' : string +>b : "string" +>'string' : "string" //Contextually typed var resultIsX1: X = true ? x : a; @@ -131,13 +131,13 @@ true ? 1 : {}; >{} : {} true ? { a: 2, b: 'string' } : { a: 1 }; ->true ? { a: 2, b: 'string' } : { a: 1 } : { a: number; b: string; } | { a: number; } +>true ? { a: 2, b: 'string' } : { a: 1 } : { a: number; b: "string"; } | { a: number; } >true : boolean ->{ a: 2, b: 'string' } : { a: number; b: string; } +>{ a: 2, b: 'string' } : { a: number; b: "string"; } >a : number >2 : number ->b : string ->'string' : string +>b : "string" +>'string' : "string" >{ a: 1 } : { a: number; } >a : number >1 : number @@ -151,13 +151,13 @@ var result6 = true ? 1 : {}; var result7 = true ? { a: 2, b: 'string' } : { a: 1 }; >result7 : { a: number; b: string; } | { a: number; } ->true ? { a: 2, b: 'string' } : { a: 1 } : { a: number; b: string; } | { a: number; } +>true ? { a: 2, b: 'string' } : { a: 1 } : { a: number; b: "string"; } | { a: number; } >true : boolean ->{ a: 2, b: 'string' } : { a: number; b: string; } +>{ a: 2, b: 'string' } : { a: number; b: "string"; } >a : number >2 : number ->b : string ->'string' : string +>b : "string" +>'string' : "string" >{ a: 1 } : { a: number; } >a : number >1 : number @@ -218,8 +218,8 @@ var result10: (t: X) => any = true ? (m) => m.propertyX1 : (n) => n.propertyX2; //Expr1 and Expr2 are literals var result11: any = true ? 1 : 'string'; >result11 : any ->true ? 1 : 'string' : number | string +>true ? 1 : 'string' : number | "string" >true : boolean >1 : number ->'string' : string +>'string' : "string" diff --git a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration2.types b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration2.types index a5a7dd1d0cdff..f2e8ec586bfeb 100644 --- a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration2.types +++ b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration2.types @@ -13,6 +13,6 @@ function outer() { var x = "inner"; >x : string ->"inner" : string +>"inner" : "inner" } } diff --git a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types index 1271d4ef86999..919a9eb96f229 100644 --- a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types +++ b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types @@ -8,11 +8,11 @@ class Rule { >RegExp : RegExp >new RegExp('') : RegExp >RegExp : RegExpConstructor ->'' : string +>'' : "" public name: string = ''; >name : string ->'' : string +>'' : "" constructor(name: string) { >name : string diff --git a/tests/baselines/reference/constDeclarations-es5.types b/tests/baselines/reference/constDeclarations-es5.types index a897c3f9cd0f1..db15974391824 100644 --- a/tests/baselines/reference/constDeclarations-es5.types +++ b/tests/baselines/reference/constDeclarations-es5.types @@ -12,7 +12,7 @@ const z9 = 0, z10 :string = "", z11 = null; >z9 : number >0 : number >z10 : string ->"" : string +>"" : "" >z11 : any >null : null diff --git a/tests/baselines/reference/constDeclarations-scopes2.types b/tests/baselines/reference/constDeclarations-scopes2.types index a6bbdee7612ac..56813956af7d6 100644 --- a/tests/baselines/reference/constDeclarations-scopes2.types +++ b/tests/baselines/reference/constDeclarations-scopes2.types @@ -2,8 +2,8 @@ // global const c = "string"; ->c : string ->"string" : string +>c : "string" +>"string" : "string" var n: number; >n : number diff --git a/tests/baselines/reference/constDeclarations.types b/tests/baselines/reference/constDeclarations.types index efdc534ef1ca0..e93699fe5fb10 100644 --- a/tests/baselines/reference/constDeclarations.types +++ b/tests/baselines/reference/constDeclarations.types @@ -13,7 +13,7 @@ const c3 = 0, c4 :string = "", c5 = null; >c3 : number >0 : number >c4 : string ->"" : string +>"" : "" >c5 : any >null : null diff --git a/tests/baselines/reference/constDeclarations2.types b/tests/baselines/reference/constDeclarations2.types index f8184b8f8e033..572db987d107a 100644 --- a/tests/baselines/reference/constDeclarations2.types +++ b/tests/baselines/reference/constDeclarations2.types @@ -16,7 +16,7 @@ module M { >c3 : number >0 : number >c4 : string ->"" : string +>"" : "" >c5 : any >null : null } diff --git a/tests/baselines/reference/constEnumPropertyAccess1.types b/tests/baselines/reference/constEnumPropertyAccess1.types index 5ed2b932bd0da..830709c50c2be 100644 --- a/tests/baselines/reference/constEnumPropertyAccess1.types +++ b/tests/baselines/reference/constEnumPropertyAccess1.types @@ -52,7 +52,7 @@ var a1 = G["A"]; >a1 : G >G["A"] : G >G : typeof G ->"A" : string +>"A" : "A" var g = o[G.A]; >g : boolean diff --git a/tests/baselines/reference/constEnumToStringNoComments.types b/tests/baselines/reference/constEnumToStringNoComments.types index 21c4dc6c70341..d42145fc6d0d4 100644 --- a/tests/baselines/reference/constEnumToStringNoComments.types +++ b/tests/baselines/reference/constEnumToStringNoComments.types @@ -45,7 +45,7 @@ let x1 = Foo["X"].toString(); >Foo["X"].toString : (radix?: number) => string >Foo["X"] : Foo >Foo : typeof Foo ->"X" : string +>"X" : "X" >toString : (radix?: number) => string let y0 = Foo.Y.toString(); @@ -63,7 +63,7 @@ let y1 = Foo["Y"].toString(); >Foo["Y"].toString : (radix?: number) => string >Foo["Y"] : Foo >Foo : typeof Foo ->"Y" : string +>"Y" : "Y" >toString : (radix?: number) => string let z0 = Foo.Z.toString(); @@ -81,7 +81,7 @@ let z1 = Foo["Z"].toString(); >Foo["Z"].toString : (radix?: number) => string >Foo["Z"] : Foo >Foo : typeof Foo ->"Z" : string +>"Z" : "Z" >toString : (radix?: number) => string let a0 = Foo.A.toString(); @@ -99,7 +99,7 @@ let a1 = Foo["A"].toString(); >Foo["A"].toString : (radix?: number) => string >Foo["A"] : Foo >Foo : typeof Foo ->"A" : string +>"A" : "A" >toString : (radix?: number) => string let b0 = Foo.B.toString(); @@ -117,7 +117,7 @@ let b1 = Foo["B"].toString(); >Foo["B"].toString : (radix?: number) => string >Foo["B"] : Foo >Foo : typeof Foo ->"B" : string +>"B" : "B" >toString : (radix?: number) => string let c0 = Foo.C.toString(); @@ -135,6 +135,6 @@ let c1 = Foo["C"].toString(); >Foo["C"].toString : (radix?: number) => string >Foo["C"] : Foo >Foo : typeof Foo ->"C" : string +>"C" : "C" >toString : (radix?: number) => string diff --git a/tests/baselines/reference/constEnumToStringWithComments.types b/tests/baselines/reference/constEnumToStringWithComments.types index 72d7d367f5ddf..c91fe3ea2e5b8 100644 --- a/tests/baselines/reference/constEnumToStringWithComments.types +++ b/tests/baselines/reference/constEnumToStringWithComments.types @@ -45,7 +45,7 @@ let x1 = Foo["X"].toString(); >Foo["X"].toString : (radix?: number) => string >Foo["X"] : Foo >Foo : typeof Foo ->"X" : string +>"X" : "X" >toString : (radix?: number) => string let y0 = Foo.Y.toString(); @@ -63,7 +63,7 @@ let y1 = Foo["Y"].toString(); >Foo["Y"].toString : (radix?: number) => string >Foo["Y"] : Foo >Foo : typeof Foo ->"Y" : string +>"Y" : "Y" >toString : (radix?: number) => string let z0 = Foo.Z.toString(); @@ -81,7 +81,7 @@ let z1 = Foo["Z"].toString(); >Foo["Z"].toString : (radix?: number) => string >Foo["Z"] : Foo >Foo : typeof Foo ->"Z" : string +>"Z" : "Z" >toString : (radix?: number) => string let a0 = Foo.A.toString(); @@ -99,7 +99,7 @@ let a1 = Foo["A"].toString(); >Foo["A"].toString : (radix?: number) => string >Foo["A"] : Foo >Foo : typeof Foo ->"A" : string +>"A" : "A" >toString : (radix?: number) => string let b0 = Foo.B.toString(); @@ -117,7 +117,7 @@ let b1 = Foo["B"].toString(); >Foo["B"].toString : (radix?: number) => string >Foo["B"] : Foo >Foo : typeof Foo ->"B" : string +>"B" : "B" >toString : (radix?: number) => string let c0 = Foo.C.toString(); @@ -135,6 +135,6 @@ let c1 = Foo["C"].toString(); >Foo["C"].toString : (radix?: number) => string >Foo["C"] : Foo >Foo : typeof Foo ->"C" : string +>"C" : "C" >toString : (radix?: number) => string diff --git a/tests/baselines/reference/constEnums.types b/tests/baselines/reference/constEnums.types index a59bd2d012a6d..b16ad45db0581 100644 --- a/tests/baselines/reference/constEnums.types +++ b/tests/baselines/reference/constEnums.types @@ -159,13 +159,13 @@ const enum Enum1 { >W3 : Enum1 >Enum1["A0"] : Enum1 >Enum1 : typeof Enum1 ->"A0" : string +>"A0" : "A0" W4 = Enum1["W"], >W4 : Enum1 >Enum1["W"] : Enum1 >Enum1 : typeof Enum1 ->"W" : string +>"W" : "W" } @@ -226,7 +226,7 @@ module A { >B : typeof B >C : typeof C >E : typeof E ->"V2" : string +>"V2" : "V2" >200 : number } } @@ -496,7 +496,7 @@ function foo(x: Enum1) { case Enum1["T"]: >Enum1["T"] : Enum1 >Enum1 : typeof Enum1 ->"T" : string +>"T" : "T" case Enum1.U: >Enum1.U : Enum1 diff --git a/tests/baselines/reference/constIndexedAccess.types b/tests/baselines/reference/constIndexedAccess.types index eb02c7bde2eeb..fb02a9e96f10c 100644 --- a/tests/baselines/reference/constIndexedAccess.types +++ b/tests/baselines/reference/constIndexedAccess.types @@ -55,7 +55,7 @@ let s2 = test[numbers["zero"]]; >test : indexAccess >numbers["zero"] : numbers >numbers : typeof numbers ->"zero" : string +>"zero" : "zero" let n2 = test[numbers["one"]]; >n2 : number @@ -63,7 +63,7 @@ let n2 = test[numbers["one"]]; >test : indexAccess >numbers["one"] : numbers >numbers : typeof numbers ->"one" : string +>"one" : "one" enum numbersNotConst { >numbersNotConst : numbersNotConst diff --git a/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types b/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types index ca2cb6fefb75c..70706e9087bfa 100644 --- a/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types +++ b/tests/baselines/reference/constructSignaturesWithIdenticalOverloads.types @@ -21,7 +21,7 @@ var r1 = new C(1, ''); >new C(1, '') : C >C : typeof C >1 : number ->'' : string +>'' : "" class C2 { >C2 : C2 @@ -47,7 +47,7 @@ var r2 = new C2(1, ''); >new C2(1, '') : C2 >C2 : typeof C2 >1 : number ->'' : string +>'' : "" interface I { >I : I @@ -72,7 +72,7 @@ var r3 = new i(1, ''); >new i(1, '') : C >i : I >1 : number ->'' : string +>'' : "" interface I2 { >I2 : I2 @@ -118,7 +118,7 @@ var r4 = new i2(1, ''); >new i2(1, '') : C2 >i2 : I2 >1 : number ->'' : string +>'' : "" var a: { >a : { new (x: number, y: string): C; new (x: number, y: string): C; } @@ -139,7 +139,7 @@ var r5 = new a(1, ''); >new a(1, '') : C >a : { new (x: number, y: string): C; new (x: number, y: string): C; } >1 : number ->'' : string +>'' : "" var b: { >b : { new (x: T, y: string): C2; new (x: T, y: string): C2; } @@ -166,5 +166,5 @@ var r6 = new b(1, ''); >new b(1, '') : C2 >b : { new (x: T, y: string): C2; new (x: T, y: string): C2; } >1 : number ->'' : string +>'' : "" diff --git a/tests/baselines/reference/constructSignaturesWithOverloads.types b/tests/baselines/reference/constructSignaturesWithOverloads.types index 8ff678c5de8f8..690d51fe915f4 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloads.types +++ b/tests/baselines/reference/constructSignaturesWithOverloads.types @@ -21,7 +21,7 @@ var r1 = new C(1, ''); >new C(1, '') : C >C : typeof C >1 : number ->'' : string +>'' : "" class C2 { >C2 : C2 @@ -47,7 +47,7 @@ var r2 = new C2(1, ''); >new C2(1, '') : C2 >C2 : typeof C2 >1 : number ->'' : string +>'' : "" interface I { >I : I @@ -72,7 +72,7 @@ var r3 = new i(1, ''); >new i(1, '') : C >i : I >1 : number ->'' : string +>'' : "" interface I2 { >I2 : I2 @@ -119,7 +119,7 @@ var r4 = new i2(1, ''); >new i2(1, '') : C2 >i2 : I2 >1 : number ->'' : string +>'' : "" var a: { >a : { new (x: number, y?: string): C; new (x: number, y: string): C; } @@ -140,7 +140,7 @@ var r5 = new a(1, ''); >new a(1, '') : C >a : { new (x: number, y?: string): C; new (x: number, y: string): C; } >1 : number ->'' : string +>'' : "" var b: { >b : { new (x: T, y?: string): C2; new (x: T, y: string): C2; } @@ -167,5 +167,5 @@ var r6 = new b(1, ''); >new b(1, '') : C2 >b : { new (x: T, y?: string): C2; new (x: T, y: string): C2; } >1 : number ->'' : string +>'' : "" diff --git a/tests/baselines/reference/constructorOverloads2.types b/tests/baselines/reference/constructorOverloads2.types index dde032c0fd29e..e753335e386dc 100644 --- a/tests/baselines/reference/constructorOverloads2.types +++ b/tests/baselines/reference/constructorOverloads2.types @@ -45,7 +45,7 @@ var f1 = new Foo("hey"); >f1 : Foo >new Foo("hey") : Foo >Foo : typeof Foo ->"hey" : string +>"hey" : "hey" var f2 = new Foo(0); >f2 : Foo diff --git a/tests/baselines/reference/contextualSignatureInstantiation.types b/tests/baselines/reference/contextualSignatureInstantiation.types index dd88a00ae3a3e..529fd1e9a7b87 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation.types +++ b/tests/baselines/reference/contextualSignatureInstantiation.types @@ -100,14 +100,14 @@ var b = bar(1, "one", g); // Should be number | string >bar(1, "one", g) : number | string >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V >1 : number ->"one" : string +>"one" : "one" >g : (x: T, y: T) => T var b = bar("one", 1, g); // Should be number | string >b : number | string >bar("one", 1, g) : string | number >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V ->"one" : string +>"one" : "one" >1 : number >g : (x: T, y: T) => T @@ -133,14 +133,14 @@ var d = bar(1, "one", h); // Should be number[] | string[] >bar(1, "one", h) : number[] | string[] >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V >1 : number ->"one" : string +>"one" : "one" >h : (x: T, y: U) => T[] | U[] var d = bar("one", 1, h); // Should be number[] | string[] >d : number[] | string[] >bar("one", 1, h) : string[] | number[] >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V ->"one" : string +>"one" : "one" >1 : number >h : (x: T, y: U) => T[] | U[] diff --git a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types index d0a6d49487b93..ac2ece4c0393b 100644 --- a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types @@ -31,7 +31,7 @@ var x = h("", f()); // Call should succeed and x should be string. All t >x : string >h("", f()) : string >h : (v: V, func: (v: V) => W) => W ->"" : string +>"" : "" >f() : (u: U) => U >f : () => (u: U) => U diff --git a/tests/baselines/reference/contextualTypeAny.types b/tests/baselines/reference/contextualTypeAny.types index cace92d6567b8..804e2b9701982 100644 --- a/tests/baselines/reference/contextualTypeAny.types +++ b/tests/baselines/reference/contextualTypeAny.types @@ -5,15 +5,15 @@ var x: any; var obj: { [s: string]: number } = { p: "", q: x }; >obj : { [s: string]: number; } >s : string ->{ p: "", q: x } : { [x: string]: any; p: string; q: any; } ->p : string ->"" : string +>{ p: "", q: x } : { [x: string]: any; p: ""; q: any; } +>p : "" +>"" : "" >q : any >x : any var arr: number[] = ["", x]; >arr : number[] >["", x] : any[] ->"" : string +>"" : "" >x : any diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types index 2f24ad082274d..d27faa2645872 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types @@ -89,9 +89,9 @@ var x: IWithNoStringIndexSignature | IWithStringIndexSignature1 = { foo: "hello" >x : IWithNoStringIndexSignature | IWithStringIndexSignature1 >IWithNoStringIndexSignature : IWithNoStringIndexSignature >IWithStringIndexSignature1 : IWithStringIndexSignature1 ->{ foo: "hello" } : { [x: string]: string; foo: string; } ->foo : string ->"hello" : string +>{ foo: "hello" } : { [x: string]: "hello"; foo: "hello"; } +>foo : "hello" +>"hello" : "hello" var x2: IWithStringIndexSignature1 | IWithStringIndexSignature2 = { z: a => a.toString() }; // a should be number >x2 : IWithStringIndexSignature1 | IWithStringIndexSignature2 @@ -142,8 +142,8 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 0: "hello" >x3 : IWithNoNumberIndexSignature | IWithNumberIndexSignature1 >IWithNoNumberIndexSignature : IWithNoNumberIndexSignature >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 ->{ 0: "hello" } : { [x: number]: string; 0: string; } ->"hello" : string +>{ 0: "hello" } : { [x: number]: "hello"; 0: "hello"; } +>"hello" : "hello" var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a.toString() }; // a should be number >x4 : IWithNumberIndexSignature1 | IWithNumberIndexSignature2 diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.types b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.types index 8f2abf37e0e79..689fea8ea9a97 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.types +++ b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.types @@ -76,11 +76,11 @@ var i1Ori2: I1 | I2 = { // Like i1 >i1Ori2 : I1 | I2 >I1 : I1 >I2 : I2 ->{ // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello",} : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: string; } +>{ // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello",} : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -101,19 +101,19 @@ var i1Ori2: I1 | I2 = { // Like i1 >a : string propertyOnlyInI1: "Hello", ->propertyOnlyInI1 : string ->"Hello" : string +>propertyOnlyInI1 : "Hello" +>"Hello" : "Hello" }; var i1Ori2: I1 | I2 = { // Like i2 >i1Ori2 : I1 | I2 >I1 : I1 >I2 : I2 ->{ // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello",} : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: string; } +>{ // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello",} : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -134,19 +134,19 @@ var i1Ori2: I1 | I2 = { // Like i2 >a : string propertyOnlyInI2: "Hello", ->propertyOnlyInI2 : string ->"Hello" : string +>propertyOnlyInI2 : "Hello" +>"Hello" : "Hello" }; var i1Ori2: I1 | I2 = { // Like i1 and i2 both >i1Ori2 : I1 | I2 >I1 : I1 >I2 : I2 ->{ // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello",} : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: string; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: string; } +>{ // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello",} : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: "Hello"; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -167,8 +167,8 @@ var i1Ori2: I1 | I2 = { // Like i1 and i2 both >a : string propertyOnlyInI1: "Hello", ->propertyOnlyInI1 : string ->"Hello" : string +>propertyOnlyInI1 : "Hello" +>"Hello" : "Hello" methodOnlyInI2: a => a, >methodOnlyInI2 : (a: string) => string @@ -177,8 +177,8 @@ var i1Ori2: I1 | I2 = { // Like i1 and i2 both >a : string propertyOnlyInI2: "Hello", ->propertyOnlyInI2 : string ->"Hello" : string +>propertyOnlyInI2 : "Hello" +>"Hello" : "Hello" }; @@ -187,14 +187,14 @@ var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >Array : T[] >I1 : I1 >I2 : I2 ->[i1, i2, { // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", }, { // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", }, { // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", }] : (I1 | I2 | { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: string; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: string; })[] +>[i1, i2, { // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", }, { // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", }, { // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", }] : (I1 | I2 | { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: "Hello"; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: "Hello"; })[] >i1 : I1 >i2 : I2 ->{ // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", } : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: string; } +>{ // Like i1 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", } : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -215,16 +215,16 @@ var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >a : string propertyOnlyInI1: "Hello", ->propertyOnlyInI1 : string ->"Hello" : string +>propertyOnlyInI1 : "Hello" +>"Hello" : "Hello" }, { // Like i2 ->{ // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", } : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: string; } +>{ // Like i2 commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", } : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -245,15 +245,15 @@ var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >a : string propertyOnlyInI2: "Hello", ->propertyOnlyInI2 : string ->"Hello" : string +>propertyOnlyInI2 : "Hello" +>"Hello" : "Hello" }, { // Like i1 and i2 both ->{ // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", } : { commonPropertyType: string; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: string; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: string; } +>{ // Like i1 and i2 both commonPropertyType: "hello", commonMethodType: a=> a, commonMethodWithTypeParameter: a => a, methodOnlyInI1: a => a, propertyOnlyInI1: "Hello", methodOnlyInI2: a => a, propertyOnlyInI2: "Hello", } : { commonPropertyType: "hello"; commonMethodType: (a: string) => string; commonMethodWithTypeParameter: (a: number) => number; methodOnlyInI1: (a: string) => string; propertyOnlyInI1: "Hello"; methodOnlyInI2: (a: string) => string; propertyOnlyInI2: "Hello"; } commonPropertyType: "hello", ->commonPropertyType : string ->"hello" : string +>commonPropertyType : "hello" +>"hello" : "hello" commonMethodType: a=> a, >commonMethodType : (a: string) => string @@ -274,8 +274,8 @@ var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >a : string propertyOnlyInI1: "Hello", ->propertyOnlyInI1 : string ->"Hello" : string +>propertyOnlyInI1 : "Hello" +>"Hello" : "Hello" methodOnlyInI2: a => a, >methodOnlyInI2 : (a: string) => string @@ -284,8 +284,8 @@ var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >a : string propertyOnlyInI2: "Hello", ->propertyOnlyInI2 : string ->"Hello" : string +>propertyOnlyInI2 : "Hello" +>"Hello" : "Hello" }]; @@ -335,7 +335,7 @@ var i11Ori21: I11 | I21 = { >i11Ori21 : I11 | I21 >I11 : I11 >I21 : I21 ->{ // Like i1 commonMethodDifferentReturnType: (a, b) => { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello", } : { commonMethodDifferentReturnType: (a: string, b: number) => string; commonPropertyDifferentType: string; } +>{ // Like i1 commonMethodDifferentReturnType: (a, b) => { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello", } : { commonMethodDifferentReturnType: (a: string, b: number) => string; commonPropertyDifferentType: "hello"; } // Like i1 commonMethodDifferentReturnType: (a, b) => { @@ -357,8 +357,8 @@ var i11Ori21: I11 | I21 = { }, commonPropertyDifferentType: "hello", ->commonPropertyDifferentType : string ->"hello" : string +>commonPropertyDifferentType : "hello" +>"hello" : "hello" }; var i11Ori21: I11 | I21 = { @@ -402,7 +402,7 @@ var arrayOrI11OrI21: Array = [i11, i21, i11 || i21, { >i11 || i21 : I11 | I21 >i11 : I11 >i21 : I21 ->{ // Like i1 commonMethodDifferentReturnType: (a, b) => { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello", } : { commonMethodDifferentReturnType: (a: string, b: number) => string; commonPropertyDifferentType: string; } +>{ // Like i1 commonMethodDifferentReturnType: (a, b) => { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello", } : { commonMethodDifferentReturnType: (a: string, b: number) => string; commonPropertyDifferentType: "hello"; } // Like i1 commonMethodDifferentReturnType: (a, b) => { @@ -424,8 +424,8 @@ var arrayOrI11OrI21: Array = [i11, i21, i11 || i21, { }, commonPropertyDifferentType: "hello", ->commonPropertyDifferentType : string ->"hello" : string +>commonPropertyDifferentType : "hello" +>"hello" : "hello" }, { >{ // Like i2 commonMethodDifferentReturnType: (a, b) => { var z = a.charCodeAt(b); return z; }, commonPropertyDifferentType: 10, } : { commonMethodDifferentReturnType: (a: string, b: number) => number; commonPropertyDifferentType: number; } diff --git a/tests/baselines/reference/contextualTyping35.types b/tests/baselines/reference/contextualTyping35.types index 08bb6b27b8e98..07c21b1ea0b60 100644 --- a/tests/baselines/reference/contextualTyping35.types +++ b/tests/baselines/reference/contextualTyping35.types @@ -3,9 +3,9 @@ var foo = <{ id: number;}> {id:4, name: "as"}; >foo : { id: number; } ><{ id: number;}> {id:4, name: "as"} : { id: number; } >id : number ->{id:4, name: "as"} : { id: number; name: string; } +>{id:4, name: "as"} : { id: number; name: "as"; } >id : number >4 : number ->name : string ->"as" : string +>name : "as" +>"as" : "as" diff --git a/tests/baselines/reference/contextualTyping37.types b/tests/baselines/reference/contextualTyping37.types index 8acd4aedf0440..7bd1f83a3714c 100644 --- a/tests/baselines/reference/contextualTyping37.types +++ b/tests/baselines/reference/contextualTyping37.types @@ -3,9 +3,9 @@ var foo = <{ id: number; }[]>[{ foo: "s" }, { }]; >foo : { id: number; }[] ><{ id: number; }[]>[{ foo: "s" }, { }] : { id: number; }[] >id : number ->[{ foo: "s" }, { }] : ({ foo: string; } | {})[] ->{ foo: "s" } : { foo: string; } ->foo : string ->"s" : string +>[{ foo: "s" }, { }] : ({ foo: "s"; } | {})[] +>{ foo: "s" } : { foo: "s"; } +>foo : "s" +>"s" : "s" >{ } : {} diff --git a/tests/baselines/reference/contextuallyTypedObjectLiteralMethodDeclaration01.types b/tests/baselines/reference/contextuallyTypedObjectLiteralMethodDeclaration01.types index dcb25792fe00c..944301247c0b8 100644 --- a/tests/baselines/reference/contextuallyTypedObjectLiteralMethodDeclaration01.types +++ b/tests/baselines/reference/contextuallyTypedObjectLiteralMethodDeclaration01.types @@ -52,11 +52,11 @@ function getFoo1(): Foo { >arg : B arg.strProp = "hello"; ->arg.strProp = "hello" : string +>arg.strProp = "hello" : "hello" >arg.strProp : string >arg : B >strProp : string ->"hello" : string +>"hello" : "hello" } } } @@ -87,11 +87,11 @@ function getFoo2(): Foo { >arg : B arg.strProp = "hello"; ->arg.strProp = "hello" : string +>arg.strProp = "hello" : "hello" >arg.strProp : string >arg : B >strProp : string ->"hello" : string +>"hello" : "hello" } } } @@ -122,11 +122,11 @@ function getFoo3(): Foo { >arg : B arg.strProp = "hello"; ->arg.strProp = "hello" : string +>arg.strProp = "hello" : "hello" >arg.strProp : string >arg : B >strProp : string ->"hello" : string +>"hello" : "hello" } } } diff --git a/tests/baselines/reference/declFileAccessors.types b/tests/baselines/reference/declFileAccessors.types index 00b10f7bf4037..a87fe851f259a 100644 --- a/tests/baselines/reference/declFileAccessors.types +++ b/tests/baselines/reference/declFileAccessors.types @@ -64,7 +64,7 @@ export class c1 { >nc_s3 : string return ""; ->"" : string +>"" : "" } static set nc_s3(value: string) { >nc_s3 : string @@ -151,7 +151,7 @@ class c2 { >nc_s3 : string return ""; ->"" : string +>"" : "" } static set nc_s3(value: string) { >nc_s3 : string diff --git a/tests/baselines/reference/declFileConstructors.types b/tests/baselines/reference/declFileConstructors.types index 68782eb3617cf..733a624e776be 100644 --- a/tests/baselines/reference/declFileConstructors.types +++ b/tests/baselines/reference/declFileConstructors.types @@ -38,7 +38,7 @@ export class ConstructorWithRestParamters { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } } @@ -85,7 +85,7 @@ export class ConstructorWithParameterInitializer { constructor(public x = "hello") { >x : string ->"hello" : string +>"hello" : "hello" } } @@ -128,7 +128,7 @@ class GlobalConstructorWithRestParamters { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } } @@ -175,6 +175,6 @@ class GlobalConstructorWithParameterInitializer { constructor(public x = "hello") { >x : string ->"hello" : string +>"hello" : "hello" } } diff --git a/tests/baselines/reference/declFileFunctions.types b/tests/baselines/reference/declFileFunctions.types index 9ad974463b7ac..db4b797740938 100644 --- a/tests/baselines/reference/declFileFunctions.types +++ b/tests/baselines/reference/declFileFunctions.types @@ -29,7 +29,7 @@ export function fooWithRestParameters(a: string, ...rests: string[]) { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } export function fooWithOverloads(a: string): string; @@ -127,7 +127,7 @@ function nonExportedFooWithRestParameters(a: string, ...rests: string[]) { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } function nonExportedFooWithOverloads(a: string): string; @@ -176,7 +176,7 @@ function globalfooWithRestParameters(a: string, ...rests: string[]) { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } function globalfooWithOverloads(a: string): string; >globalfooWithOverloads : { (a: string): string; (a: number): number; } diff --git a/tests/baselines/reference/declFileMethods.types b/tests/baselines/reference/declFileMethods.types index ecd7b8e0cff90..44c08117e9391 100644 --- a/tests/baselines/reference/declFileMethods.types +++ b/tests/baselines/reference/declFileMethods.types @@ -32,7 +32,7 @@ export class c1 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } public fooWithOverloads(a: string): string; @@ -81,7 +81,7 @@ export class c1 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } private privateFooWithOverloads(a: string): string; >privateFooWithOverloads : { (a: string): string; (a: number): number; } @@ -129,7 +129,7 @@ export class c1 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } static staticFooWithOverloads(a: string): string; >staticFooWithOverloads : { (a: string): string; (a: number): number; } @@ -177,7 +177,7 @@ export class c1 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } private static privateStaticFooWithOverloads(a: string): string; >privateStaticFooWithOverloads : { (a: string): string; (a: number): number; } @@ -259,7 +259,7 @@ class c2 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } public fooWithOverloads(a: string): string; @@ -308,7 +308,7 @@ class c2 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } private privateFooWithOverloads(a: string): string; >privateFooWithOverloads : { (a: string): string; (a: number): number; } @@ -356,7 +356,7 @@ class c2 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } static staticFooWithOverloads(a: string): string; >staticFooWithOverloads : { (a: string): string; (a: number): number; } @@ -404,7 +404,7 @@ class c2 { >rests.join : (separator?: string) => string >rests : string[] >join : (separator?: string) => string ->"" : string +>"" : "" } private static privateStaticFooWithOverloads(a: string): string; >privateStaticFooWithOverloads : { (a: string): string; (a: number): number; } diff --git a/tests/baselines/reference/declFileRegressionTests.types b/tests/baselines/reference/declFileRegressionTests.types index 7b8933e1def24..6572e50c2162a 100644 --- a/tests/baselines/reference/declFileRegressionTests.types +++ b/tests/baselines/reference/declFileRegressionTests.types @@ -3,11 +3,11 @@ // function types not piped through correctly var n = { w: null, x: '', y: () => { }, z: 32 }; >n : { w: any; x: string; y: () => void; z: number; } ->{ w: null, x: '', y: () => { }, z: 32 } : { w: null; x: string; y: () => void; z: number; } +>{ w: null, x: '', y: () => { }, z: 32 } : { w: null; x: ""; y: () => void; z: number; } >w : null >null : null ->x : string ->'' : string +>x : "" +>'' : "" >y : () => void >() => { } : () => void >z : number diff --git a/tests/baselines/reference/declFileTypeAnnotationBuiltInType.types b/tests/baselines/reference/declFileTypeAnnotationBuiltInType.types index a1b2d9edd4362..5e8ff00a1e620 100644 --- a/tests/baselines/reference/declFileTypeAnnotationBuiltInType.types +++ b/tests/baselines/reference/declFileTypeAnnotationBuiltInType.types @@ -5,13 +5,13 @@ function foo(): string { >foo : () => string return ""; ->"" : string +>"" : "" } function foo2() { >foo2 : () => string return ""; ->"" : string +>"" : "" } // number diff --git a/tests/baselines/reference/declFileTypeAnnotationParenType.types b/tests/baselines/reference/declFileTypeAnnotationParenType.types index 6776a0f492f41..332fb20730ea4 100644 --- a/tests/baselines/reference/declFileTypeAnnotationParenType.types +++ b/tests/baselines/reference/declFileTypeAnnotationParenType.types @@ -25,19 +25,19 @@ var y = [() => new c()]; var k: (() => c) | string = (() => new c()) || ""; >k : (() => c) | string >c : c ->(() => new c()) || "" : (() => c) | string +>(() => new c()) || "" : (() => c) | "" >(() => new c()) : () => c >() => new c() : () => c >new c() : c >c : typeof c ->"" : string +>"" : "" var l = (() => new c()) || ""; >l : (() => c) | string ->(() => new c()) || "" : (() => c) | string +>(() => new c()) || "" : (() => c) | "" >(() => new c()) : () => c >() => new c() : () => c >new c() : c >c : typeof c ->"" : string +>"" : "" diff --git a/tests/baselines/reference/declFileTypeAnnotationStringLiteral.types b/tests/baselines/reference/declFileTypeAnnotationStringLiteral.types index 3041b92cf6dc7..6d9c17b4ab907 100644 --- a/tests/baselines/reference/declFileTypeAnnotationStringLiteral.types +++ b/tests/baselines/reference/declFileTypeAnnotationStringLiteral.types @@ -19,7 +19,7 @@ function foo(a: string): string | number { if (a === "hello") { >a === "hello" : boolean >a : string ->"hello" : string +>"hello" : "hello" return a.length; >a.length : number diff --git a/tests/baselines/reference/declInput.types b/tests/baselines/reference/declInput.types index e59e3811fdf81..3ed1c2ee943c4 100644 --- a/tests/baselines/reference/declInput.types +++ b/tests/baselines/reference/declInput.types @@ -9,7 +9,7 @@ class bar { public f() { return ''; } >f : () => string ->'' : string +>'' : "" public g() { return {a: null, b: undefined, c: void 4 }; } >g : () => { a: bar; b: any; c: any; } @@ -31,7 +31,7 @@ class bar { >y : any >null : null >z : string ->'' : string +>'' : "" >x++ : number >x : number } diff --git a/tests/baselines/reference/declInput3.types b/tests/baselines/reference/declInput3.types index 0dcbc6bd3cdad..92f9fe4268fbf 100644 --- a/tests/baselines/reference/declInput3.types +++ b/tests/baselines/reference/declInput3.types @@ -9,7 +9,7 @@ class bar { public f() { return ''; } >f : () => string ->'' : string +>'' : "" public g() { return {a: null, b: undefined, c: void 4 }; } >g : () => { a: bar; b: any; c: any; } @@ -31,7 +31,7 @@ class bar { >y : any >null : null >z : string ->'' : string +>'' : "" >x++ : number >x : number } diff --git a/tests/baselines/reference/declarationEmitDefaultExport3.types b/tests/baselines/reference/declarationEmitDefaultExport3.types index 91ee71f61ac39..2717e248784b0 100644 --- a/tests/baselines/reference/declarationEmitDefaultExport3.types +++ b/tests/baselines/reference/declarationEmitDefaultExport3.types @@ -3,5 +3,5 @@ export default function foo() { >foo : () => string return "" ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/declarationEmitDestructuring3.types b/tests/baselines/reference/declarationEmitDestructuring3.types index 737bb39e078f8..3e2828a426350 100644 --- a/tests/baselines/reference/declarationEmitDestructuring3.types +++ b/tests/baselines/reference/declarationEmitDestructuring3.types @@ -9,9 +9,9 @@ function foo([x, ...y] = [1, "string", true]) { } >foo : ([x, ...y]?: (number | string | boolean)[]) => void >x : number | string | boolean >y : (number | string | boolean)[] ->[1, "string", true] : (number | string | boolean)[] +>[1, "string", true] : (number | "string" | boolean)[] >1 : number ->"string" : string +>"string" : "string" >true : boolean diff --git a/tests/baselines/reference/declarationEmitDestructuringArrayPattern1.types b/tests/baselines/reference/declarationEmitDestructuringArrayPattern1.types index 9629324b9f92b..925c7d4392a6e 100644 --- a/tests/baselines/reference/declarationEmitDestructuringArrayPattern1.types +++ b/tests/baselines/reference/declarationEmitDestructuringArrayPattern1.types @@ -1,22 +1,22 @@ === tests/cases/compiler/declarationEmitDestructuringArrayPattern1.ts === var [] = [1, "hello"]; // Dont emit anything ->[1, "hello"] : (number | string)[] +>[1, "hello"] : (number | "hello")[] >1 : number ->"hello" : string +>"hello" : "hello" var [x] = [1, "hello"]; // emit x: number >x : number ->[1, "hello"] : [number, string] +>[1, "hello"] : [number, "hello"] >1 : number ->"hello" : string +>"hello" : "hello" var [x1, y1] = [1, "hello"]; // emit x1: number, y1: string >x1 : number >y1 : string ->[1, "hello"] : [number, string] +>[1, "hello"] : [number, "hello"] >1 : number ->"hello" : string +>"hello" : "hello" var [, , z1] = [0, 1, 2]; // emit z1: number > : undefined @@ -29,9 +29,9 @@ var [, , z1] = [0, 1, 2]; // emit z1: number var a = [1, "hello"]; >a : (number | string)[] ->[1, "hello"] : (number | string)[] +>[1, "hello"] : (number | "hello")[] >1 : number ->"hello" : string +>"hello" : "hello" var [x2] = a; // emit x2: number | string >x2 : number | string diff --git a/tests/baselines/reference/declarationEmitDestructuringArrayPattern4.types b/tests/baselines/reference/declarationEmitDestructuringArrayPattern4.types index 1e8701eedb520..5f847bcd9779f 100644 --- a/tests/baselines/reference/declarationEmitDestructuringArrayPattern4.types +++ b/tests/baselines/reference/declarationEmitDestructuringArrayPattern4.types @@ -35,26 +35,26 @@ var [x16, y16, z16, ...a8] = [1, 2, 3]; var [...a9] = [1, "hello", true]; >a9 : (number | string | boolean)[] ->[1, "hello", true] : (number | string | boolean)[] +>[1, "hello", true] : (number | "hello" | boolean)[] >1 : number ->"hello" : string +>"hello" : "hello" >true : boolean var [x17, ...a10] = [1, "hello", true]; >x17 : number | string | boolean >a10 : (number | string | boolean)[] ->[1, "hello", true] : (number | string | boolean)[] +>[1, "hello", true] : (number | "hello" | boolean)[] >1 : number ->"hello" : string +>"hello" : "hello" >true : boolean var [x18, y18, ...a12] = [1, "hello", true]; >x18 : number | string | boolean >y18 : number | string | boolean >a12 : (number | string | boolean)[] ->[1, "hello", true] : (number | string | boolean)[] +>[1, "hello", true] : (number | "hello" | boolean)[] >1 : number ->"hello" : string +>"hello" : "hello" >true : boolean var [x19, y19, z19, ...a13] = [1, "hello", true]; @@ -62,8 +62,8 @@ var [x19, y19, z19, ...a13] = [1, "hello", true]; >y19 : number | string | boolean >z19 : number | string | boolean >a13 : (number | string | boolean)[] ->[1, "hello", true] : (number | string | boolean)[] +>[1, "hello", true] : (number | "hello" | boolean)[] >1 : number ->"hello" : string +>"hello" : "hello" >true : boolean diff --git a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern2.types b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern2.types index 49d4e2e837cbd..40312c449dda9 100644 --- a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern2.types +++ b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern2.types @@ -9,13 +9,13 @@ var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: tr >b : any >a : any >z11 : boolean ->{ a: 1, b: { a: "hello", b: { a: true } } } : { a: number; b: { a: string; b: { a: boolean; }; }; } +>{ a: 1, b: { a: "hello", b: { a: true } } } : { a: number; b: { a: "hello"; b: { a: boolean; }; }; } >a : number >1 : number ->b : { a: string; b: { a: boolean; }; } ->{ a: "hello", b: { a: true } } : { a: string; b: { a: boolean; }; } ->a : string ->"hello" : string +>b : { a: "hello"; b: { a: boolean; }; } +>{ a: "hello", b: { a: true } } : { a: "hello"; b: { a: boolean; }; } +>a : "hello" +>"hello" : "hello" >b : { a: boolean; } >{ a: true } : { a: boolean; } >a : boolean @@ -26,7 +26,7 @@ function f15() { var a4 = "hello"; >a4 : string ->"hello" : string +>"hello" : "hello" var b4 = 1; >b4 : number diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types index d0f930b7ad43d..d768f3c6c7ab7 100644 --- a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types +++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types @@ -3,7 +3,7 @@ // from #3108 export var test = 'abc'; >test : string ->'abc' : string +>'abc' : "abc" === tests/cases/conformance/decorators/class/b.ts === import { test } from './a'; @@ -31,7 +31,7 @@ class Wat { >() => test == 'abc' : () => boolean >test == 'abc' : boolean >test : string ->'abc' : string +>'abc' : "abc" static whatever() { >whatever : () => void diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.types b/tests/baselines/reference/decoratorMetadataOnInferredType.types index 41c9334244f67..41ac7f060d2f2 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.types +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.types @@ -17,7 +17,7 @@ class A { >console.log : (msg: string) => void >console : { log(msg: string): void; } >log : (msg: string) => void ->'new A' : string +>'new A' : "new A" } function decorator(target: Object, propertyKey: string) { diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.types b/tests/baselines/reference/decoratorMetadataWithConstructorType.types index ad83706f4f997..4ca404c81166a 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.types +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.types @@ -17,7 +17,7 @@ class A { >console.log : (msg: string) => void >console : { log(msg: string): void; } >log : (msg: string) => void ->'new A' : string +>'new A' : "new A" } function decorator(target: Object, propertyKey: string) { diff --git a/tests/baselines/reference/decoratorOnClassMethod13.types b/tests/baselines/reference/decoratorOnClassMethod13.types index 5fdbe07182829..eba738d5ef529 100644 --- a/tests/baselines/reference/decoratorOnClassMethod13.types +++ b/tests/baselines/reference/decoratorOnClassMethod13.types @@ -15,9 +15,9 @@ class C { @dec ["1"]() { } >dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor ->"1" : string +>"1" : "1" @dec ["b"]() { } >dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor ->"b" : string +>"b" : "b" } diff --git a/tests/baselines/reference/decoratorOnClassMethod4.types b/tests/baselines/reference/decoratorOnClassMethod4.types index 026508257a5f5..5c47dc8a4ca4f 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.types +++ b/tests/baselines/reference/decoratorOnClassMethod4.types @@ -15,5 +15,5 @@ class C { @dec ["method"]() {} >dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor ->"method" : string +>"method" : "method" } diff --git a/tests/baselines/reference/decoratorOnClassMethod5.types b/tests/baselines/reference/decoratorOnClassMethod5.types index d55ddd832b9fa..749eb6b3b9c20 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.types +++ b/tests/baselines/reference/decoratorOnClassMethod5.types @@ -16,5 +16,5 @@ class C { @dec() ["method"]() {} >dec() : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor >dec : () => (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor ->"method" : string +>"method" : "method" } diff --git a/tests/baselines/reference/decoratorOnClassMethod7.types b/tests/baselines/reference/decoratorOnClassMethod7.types index 8a72e24bd5b49..c8d21157fe942 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.types +++ b/tests/baselines/reference/decoratorOnClassMethod7.types @@ -15,5 +15,5 @@ class C { @dec public ["method"]() {} >dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor ->"method" : string +>"method" : "method" } diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherType.types b/tests/baselines/reference/decrementOperatorWithAnyOtherType.types index 65eea6d1a7137..f82bf284a85e8 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherType.types @@ -9,9 +9,9 @@ var ANY1; var ANY2: any[] = ["", ""]; >ANY2 : any[] ->["", ""] : string[] ->"" : string ->"" : string +>["", ""] : ""[] +>"" : "" +>"" : "" var obj = {x:1,y:null}; >obj : { x: number; y: any; } diff --git a/tests/baselines/reference/defaultIndexProps1.types b/tests/baselines/reference/defaultIndexProps1.types index 0b188a40c205c..93ef8cb813a5b 100644 --- a/tests/baselines/reference/defaultIndexProps1.types +++ b/tests/baselines/reference/defaultIndexProps1.types @@ -4,7 +4,7 @@ class Foo { public v = "Yo"; >v : string ->"Yo" : string +>"Yo" : "Yo" } var f = new Foo(); @@ -16,17 +16,17 @@ var q = f["v"]; >q : string >f["v"] : string >f : Foo ->"v" : string +>"v" : "v" var o = {v:"Yo2"}; >o : { v: string; } ->{v:"Yo2"} : { v: string; } ->v : string ->"Yo2" : string +>{v:"Yo2"} : { v: "Yo2"; } +>v : "Yo2" +>"Yo2" : "Yo2" var q2 = o["v"]; >q2 : string >o["v"] : string >o : { v: string; } ->"v" : string +>"v" : "v" diff --git a/tests/baselines/reference/defaultIndexProps2.types b/tests/baselines/reference/defaultIndexProps2.types index 3b0d8278966e1..655e77d48ced7 100644 --- a/tests/baselines/reference/defaultIndexProps2.types +++ b/tests/baselines/reference/defaultIndexProps2.types @@ -4,7 +4,7 @@ class Foo { public v = "Yo"; >v : string ->"Yo" : string +>"Yo" : "Yo" } var f = new Foo(); @@ -16,9 +16,9 @@ var f = new Foo(); var o = {v:"Yo2"}; >o : { v: string; } ->{v:"Yo2"} : { v: string; } ->v : string ->"Yo2" : string +>{v:"Yo2"} : { v: "Yo2"; } +>v : "Yo2" +>"Yo2" : "Yo2" // WScript.Echo(o[0]); @@ -30,6 +30,6 @@ var o = {v:"Yo2"}; var q = "s"[0]; >q : string >"s"[0] : string ->"s" : string +>"s" : "s" >0 : number diff --git a/tests/baselines/reference/deleteOperatorWithEnumType.types b/tests/baselines/reference/deleteOperatorWithEnumType.types index d3266a6aa6c1f..782c31f7ea387 100644 --- a/tests/baselines/reference/deleteOperatorWithEnumType.types +++ b/tests/baselines/reference/deleteOperatorWithEnumType.types @@ -26,7 +26,7 @@ var ResultIsBoolean3 = delete ENUM1["A"]; >delete ENUM1["A"] : boolean >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" var ResultIsBoolean4 = delete (ENUM[0] + ENUM1["B"]); >ResultIsBoolean4 : boolean @@ -38,7 +38,7 @@ var ResultIsBoolean4 = delete (ENUM[0] + ENUM1["B"]); >0 : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" // multiple delete operators var ResultIsBoolean5 = delete delete ENUM; @@ -59,7 +59,7 @@ var ResultIsBoolean6 = delete delete delete (ENUM[0] + ENUM1["B"]); >0 : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" // miss assignment operators delete ENUM; diff --git a/tests/baselines/reference/deleteOperatorWithStringType.types b/tests/baselines/reference/deleteOperatorWithStringType.types index 0492aeff1760b..e5e5b231390ee 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.types +++ b/tests/baselines/reference/deleteOperatorWithStringType.types @@ -5,13 +5,13 @@ var STRING: string; var STRING1: string[] = ["", "abc"]; >STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string +>["", "abc"] : ("" | "abc")[] +>"" : "" +>"abc" : "abc" function foo(): string { return "abc"; } >foo : () => string ->"abc" : string +>"abc" : "abc" class A { >A : A @@ -21,7 +21,7 @@ class A { static foo() { return ""; } >foo : () => string ->"" : string +>"" : "" } module M { >M : typeof M @@ -50,23 +50,23 @@ var ResultIsBoolean2 = delete STRING1; var ResultIsBoolean3 = delete ""; >ResultIsBoolean3 : boolean >delete "" : boolean ->"" : string +>"" : "" var ResultIsBoolean4 = delete { x: "", y: "" }; >ResultIsBoolean4 : boolean >delete { x: "", y: "" } : boolean ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string +>{ x: "", y: "" } : { x: ""; y: ""; } +>x : "" +>"" : "" +>y : "" +>"" : "" var ResultIsBoolean5 = delete { x: "", y: (s: string) => { return s; } }; >ResultIsBoolean5 : boolean >delete { x: "", y: (s: string) => { return s; } } : boolean ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string +>{ x: "", y: (s: string) => { return s; } } : { x: ""; y: (s: string) => string; } +>x : "" +>"" : "" >y : (s: string) => string >(s: string) => { return s; } : (s: string) => string >s : string @@ -145,7 +145,7 @@ var ResultIsBoolean14 = delete delete delete (STRING + STRING); // miss assignment operators delete ""; >delete "" : boolean ->"" : string +>"" : "" delete STRING; >delete STRING : boolean diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.types b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.types index 2799555a3a2b6..3241fbedf39f9 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.types +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.types @@ -227,7 +227,7 @@ var r7 = d2['']; >r7 : { foo: string; } >d2[''] : { foo: string; } >d2 : Derived2 ->'' : string +>'' : "" var r8 = d2[1]; >r8 : { foo: string; bar: string; } diff --git a/tests/baselines/reference/derivedClasses.types b/tests/baselines/reference/derivedClasses.types index 7fc585e29ce40..559e5861f2f1a 100644 --- a/tests/baselines/reference/derivedClasses.types +++ b/tests/baselines/reference/derivedClasses.types @@ -18,7 +18,7 @@ class Red extends Color { >getHue() + " red" : string >getHue() : string >getHue : () => string ->" red" : string +>" red" : " red" } } @@ -27,11 +27,11 @@ class Color { public shade() { return "some shade"; } >shade : () => string ->"some shade" : string +>"some shade" : "some shade" public hue() { return "some hue"; } >hue : () => string ->"some hue" : string +>"some hue" : "some hue" } class Blue extends Color { @@ -53,7 +53,7 @@ class Blue extends Color { >getHue() + " blue" : string >getHue() : string >getHue : () => string ->" blue" : string +>" blue" : " blue" } } diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types index 476b5bee0cc5b..b0faac928c2e8 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types @@ -24,19 +24,19 @@ var { b1, } = { b1:1, }; var { b2: { b21 } = { b21: "string" } } = { b2: { b21: "world" } }; >b2 : any >b21 : string ->{ b21: "string" } : { b21: string; } ->b21 : string ->"string" : string ->{ b2: { b21: "world" } } : { b2?: { b21: string; }; } ->b2 : { b21: string; } ->{ b21: "world" } : { b21: string; } ->b21 : string ->"world" : string +>{ b21: "string" } : { b21: "string"; } +>b21 : "string" +>"string" : "string" +>{ b2: { b21: "world" } } : { b2?: { b21: "world"; }; } +>b2 : { b21: "world"; } +>{ b21: "world" } : { b21: "world"; } +>b21 : "world" +>"world" : "world" var {1: b3} = { 1: "string" }; >b3 : string ->{ 1: "string" } : { 1: string; } ->"string" : string +>{ 1: "string" } : { 1: "string"; } +>"string" : "string" var {b4 = 1}: any = { b4: 100000 }; >b4 : number diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types index 7a7f631eddfcf..f3afd72ec3928 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types @@ -24,19 +24,19 @@ var { b1, } = { b1:1, }; var { b2: { b21 } = { b21: "string" } } = { b2: { b21: "world" } }; >b2 : any >b21 : string ->{ b21: "string" } : { b21: string; } ->b21 : string ->"string" : string ->{ b2: { b21: "world" } } : { b2?: { b21: string; }; } ->b2 : { b21: string; } ->{ b21: "world" } : { b21: string; } ->b21 : string ->"world" : string +>{ b21: "string" } : { b21: "string"; } +>b21 : "string" +>"string" : "string" +>{ b2: { b21: "world" } } : { b2?: { b21: "world"; }; } +>b2 : { b21: "world"; } +>{ b21: "world" } : { b21: "world"; } +>b21 : "world" +>"world" : "world" var {1: b3} = { 1: "string" }; >b3 : string ->{ 1: "string" } : { 1: string; } ->"string" : string +>{ 1: "string" } : { 1: "string"; } +>"string" : "string" var {b4 = 1}: any = { b4: 100000 }; >b4 : number diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.types b/tests/baselines/reference/destructuringParameterDeclaration3ES5.types index b8d48dcb9d41d..c5a2b945c218b 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.types @@ -76,10 +76,10 @@ var array = [1, 2, 3]; var array2 = [true, false, "hello"]; >array2 : (boolean | string)[] ->[true, false, "hello"] : (boolean | string)[] +>[true, false, "hello"] : (boolean | "hello")[] >true : boolean >false : boolean ->"hello" : string +>"hello" : "hello" a2([...array]); >a2([...array]) : void @@ -97,24 +97,24 @@ a1(...array); a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]] >a9([1, 2, [["string"]], false, true]) : void >a9 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] +>[1, 2, [["string"]], false, true] : [number, number, [["string"]], boolean, boolean] >1 : number >2 : number ->[["string"]] : [[string]] ->["string"] : [string] ->"string" : string +>[["string"]] : [["string"]] +>["string"] : ["string"] +>"string" : "string" >false : boolean >true : boolean a10([1, 2, [["string"]], false, true]); // Parameter type is any[] >a10([1, 2, [["string"]], false, true]) : void >a10 : ([a, b, [[c]], ...x]: Iterable) => void ->[1, 2, [["string"]], false, true] : (number | string[][] | boolean)[] +>[1, 2, [["string"]], false, true] : (number | "string"[][] | boolean)[] >1 : number >2 : number ->[["string"]] : string[][] ->["string"] : string[] ->"string" : string +>[["string"]] : "string"[][] +>["string"] : "string"[] +>"string" : "string" >false : boolean >true : boolean @@ -152,15 +152,15 @@ function foo(...a: T[]) { } foo("hello", 1, 2); >foo("hello", 1, 2) : void >foo : (...a: T[]) => void ->"hello" : string +>"hello" : "hello" >1 : number >2 : number foo("hello", "world"); >foo("hello", "world") : void >foo : (...a: T[]) => void ->"hello" : string ->"world" : string +>"hello" : "hello" +>"world" : "world" enum E { a, b } >E : E diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.types b/tests/baselines/reference/destructuringParameterDeclaration3ES6.types index b439c4134ba00..4f3f5e08fb6ae 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.types +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.types @@ -76,10 +76,10 @@ var array = [1, 2, 3]; var array2 = [true, false, "hello"]; >array2 : (boolean | string)[] ->[true, false, "hello"] : (boolean | string)[] +>[true, false, "hello"] : (boolean | "hello")[] >true : boolean >false : boolean ->"hello" : string +>"hello" : "hello" a2([...array]); >a2([...array]) : void @@ -97,24 +97,24 @@ a1(...array); a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]] >a9([1, 2, [["string"]], false, true]) : void >a9 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] +>[1, 2, [["string"]], false, true] : [number, number, [["string"]], boolean, boolean] >1 : number >2 : number ->[["string"]] : [[string]] ->["string"] : [string] ->"string" : string +>[["string"]] : [["string"]] +>["string"] : ["string"] +>"string" : "string" >false : boolean >true : boolean a10([1, 2, [["string"]], false, true]); // Parameter type is any[] >a10([1, 2, [["string"]], false, true]) : void >a10 : ([a, b, [[c]], ...x]: Iterable) => void ->[1, 2, [["string"]], false, true] : (number | string[][] | boolean)[] +>[1, 2, [["string"]], false, true] : (number | "string"[][] | boolean)[] >1 : number >2 : number ->[["string"]] : string[][] ->["string"] : string[] ->"string" : string +>[["string"]] : "string"[][] +>["string"] : "string"[] +>"string" : "string" >false : boolean >true : boolean @@ -152,15 +152,15 @@ function foo(...a: T[]) { } foo("hello", 1, 2); >foo("hello", 1, 2) : void >foo : (...a: T[]) => void ->"hello" : string +>"hello" : "hello" >1 : number >2 : number foo("hello", "world"); >foo("hello", "world") : void >foo : (...a: T[]) => void ->"hello" : string ->"world" : string +>"hello" : "hello" +>"world" : "world" enum E { a, b } >E : E diff --git a/tests/baselines/reference/destructuringVariableDeclaration1ES5.types b/tests/baselines/reference/destructuringVariableDeclaration1ES5.types index f8188147a7908..b195c70aca7f7 100644 --- a/tests/baselines/reference/destructuringVariableDeclaration1ES5.types +++ b/tests/baselines/reference/destructuringVariableDeclaration1ES5.types @@ -6,21 +6,21 @@ var {a1, a2}: { a1: number, a2: string } = { a1: 10, a2: "world" } >a2 : string >a1 : number >a2 : string ->{ a1: 10, a2: "world" } : { a1: number; a2: string; } +>{ a1: 10, a2: "world" } : { a1: number; a2: "world"; } >a1 : number >10 : number ->a2 : string ->"world" : string +>a2 : "world" +>"world" : "world" var [a3, [[a4]], a5]: [number, [[string]], boolean] = [1, [["hello"]], true]; >a3 : number >a4 : string >a5 : boolean ->[1, [["hello"]], true] : [number, [[string]], boolean] +>[1, [["hello"]], true] : [number, [["hello"]], boolean] >1 : number ->[["hello"]] : [[string]] ->["hello"] : [string] ->"hello" : string +>[["hello"]] : [["hello"]] +>["hello"] : ["hello"] +>"hello" : "hello" >true : boolean // The type T associated with a destructuring variable declaration is determined as follows: @@ -28,22 +28,22 @@ var [a3, [[a4]], a5]: [number, [[string]], boolean] = [1, [["hello"]], true]; var { b1: { b11 } = { b11: "string" } } = { b1: { b11: "world" } }; >b1 : any >b11 : string ->{ b11: "string" } : { b11: string; } ->b11 : string ->"string" : string ->{ b1: { b11: "world" } } : { b1?: { b11: string; }; } ->b1 : { b11: string; } ->{ b11: "world" } : { b11: string; } ->b11 : string ->"world" : string +>{ b11: "string" } : { b11: "string"; } +>b11 : "string" +>"string" : "string" +>{ b1: { b11: "world" } } : { b1?: { b11: "world"; }; } +>b1 : { b11: "world"; } +>{ b11: "world" } : { b11: "world"; } +>b11 : "world" +>"world" : "world" var temp = { t1: true, t2: "false" }; >temp : { t1: boolean; t2: string; } ->{ t1: true, t2: "false" } : { t1: boolean; t2: string; } +>{ t1: true, t2: "false" } : { t1: boolean; t2: "false"; } >t1 : boolean >true : boolean ->t2 : string ->"false" : string +>t2 : "false" +>"false" : "false" var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >b2 : number @@ -52,14 +52,14 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >true : boolean >b4 : { t1: boolean; t2: string; } >temp : { t1: boolean; t2: string; } ->[3, false, { t1: false, t2: "hello" }] : [number, boolean, { t1: boolean; t2: string; }] +>[3, false, { t1: false, t2: "hello" }] : [number, boolean, { t1: boolean; t2: "hello"; }] >3 : number >false : boolean ->{ t1: false, t2: "hello" } : { t1: boolean; t2: string; } +>{ t1: false, t2: "hello" } : { t1: boolean; t2: "hello"; } >t1 : boolean >false : boolean ->t2 : string ->"hello" : string +>t2 : "hello" +>"hello" : "hello" var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined]; >b5 : any @@ -85,11 +85,11 @@ var [...c1] = [1,2,3]; var [...c2] = [1,2,3, "string"]; >c2 : (number | string)[] ->[1,2,3, "string"] : (number | string)[] +>[1,2,3, "string"] : (number | "string")[] >1 : number >2 : number >3 : number ->"string" : string +>"string" : "string" // The type T associated with a binding element is determined as follows: // Otherwise, if S is a tuple- like type (section 3.3.3): @@ -98,9 +98,9 @@ var [...c2] = [1,2,3, "string"]; var [d1,d2] = [1,"string"] >d1 : number >d2 : string ->[1,"string"] : [number, string] +>[1,"string"] : [number, "string"] >1 : number ->"string" : string +>"string" : "string" // The type T associated with a binding element is determined as follows: // Otherwise, if S is a tuple- like type (section 3.3.3): @@ -115,9 +115,9 @@ var temp1 = [true, false, true] var [d3, d4] = [1, "string", ...temp1]; >d3 : number | string | boolean >d4 : number | string | boolean ->[1, "string", ...temp1] : (number | string | boolean)[] +>[1, "string", ...temp1] : (number | "string" | boolean)[] >1 : number ->"string" : string +>"string" : "string" >...temp1 : boolean >temp1 : boolean[] diff --git a/tests/baselines/reference/destructuringVariableDeclaration1ES6.types b/tests/baselines/reference/destructuringVariableDeclaration1ES6.types index 7b4fe5409dbaa..1b08c8312d716 100644 --- a/tests/baselines/reference/destructuringVariableDeclaration1ES6.types +++ b/tests/baselines/reference/destructuringVariableDeclaration1ES6.types @@ -6,21 +6,21 @@ var {a1, a2}: { a1: number, a2: string } = { a1: 10, a2: "world" } >a2 : string >a1 : number >a2 : string ->{ a1: 10, a2: "world" } : { a1: number; a2: string; } +>{ a1: 10, a2: "world" } : { a1: number; a2: "world"; } >a1 : number >10 : number ->a2 : string ->"world" : string +>a2 : "world" +>"world" : "world" var [a3, [[a4]], a5]: [number, [[string]], boolean] = [1, [["hello"]], true]; >a3 : number >a4 : string >a5 : boolean ->[1, [["hello"]], true] : [number, [[string]], boolean] +>[1, [["hello"]], true] : [number, [["hello"]], boolean] >1 : number ->[["hello"]] : [[string]] ->["hello"] : [string] ->"hello" : string +>[["hello"]] : [["hello"]] +>["hello"] : ["hello"] +>"hello" : "hello" >true : boolean // The type T associated with a destructuring variable declaration is determined as follows: @@ -28,22 +28,22 @@ var [a3, [[a4]], a5]: [number, [[string]], boolean] = [1, [["hello"]], true]; var { b1: { b11 } = { b11: "string" } } = { b1: { b11: "world" } }; >b1 : any >b11 : string ->{ b11: "string" } : { b11: string; } ->b11 : string ->"string" : string ->{ b1: { b11: "world" } } : { b1?: { b11: string; }; } ->b1 : { b11: string; } ->{ b11: "world" } : { b11: string; } ->b11 : string ->"world" : string +>{ b11: "string" } : { b11: "string"; } +>b11 : "string" +>"string" : "string" +>{ b1: { b11: "world" } } : { b1?: { b11: "world"; }; } +>b1 : { b11: "world"; } +>{ b11: "world" } : { b11: "world"; } +>b11 : "world" +>"world" : "world" var temp = { t1: true, t2: "false" }; >temp : { t1: boolean; t2: string; } ->{ t1: true, t2: "false" } : { t1: boolean; t2: string; } +>{ t1: true, t2: "false" } : { t1: boolean; t2: "false"; } >t1 : boolean >true : boolean ->t2 : string ->"false" : string +>t2 : "false" +>"false" : "false" var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >b2 : number @@ -52,14 +52,14 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >true : boolean >b4 : { t1: boolean; t2: string; } >temp : { t1: boolean; t2: string; } ->[3, false, { t1: false, t2: "hello" }] : [number, boolean, { t1: boolean; t2: string; }] +>[3, false, { t1: false, t2: "hello" }] : [number, boolean, { t1: boolean; t2: "hello"; }] >3 : number >false : boolean ->{ t1: false, t2: "hello" } : { t1: boolean; t2: string; } +>{ t1: false, t2: "hello" } : { t1: boolean; t2: "hello"; } >t1 : boolean >false : boolean ->t2 : string ->"hello" : string +>t2 : "hello" +>"hello" : "hello" var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined]; >b5 : any @@ -85,11 +85,11 @@ var [...c1] = [1,2,3]; var [...c2] = [1,2,3, "string"]; >c2 : (number | string)[] ->[1,2,3, "string"] : (number | string)[] +>[1,2,3, "string"] : (number | "string")[] >1 : number >2 : number >3 : number ->"string" : string +>"string" : "string" // The type T associated with a binding element is determined as follows: // Otherwise, if S is a tuple- like type (section 3.3.3): @@ -98,9 +98,9 @@ var [...c2] = [1,2,3, "string"]; var [d1,d2] = [1,"string"] >d1 : number >d2 : string ->[1,"string"] : [number, string] +>[1,"string"] : [number, "string"] >1 : number ->"string" : string +>"string" : "string" // The type T associated with a binding element is determined as follows: // Otherwise, if S is a tuple- like type (section 3.3.3): @@ -115,9 +115,9 @@ var temp1 = [true, false, true] var [d3, d4] = [1, "string", ...temp1]; >d3 : number | string | boolean >d4 : number | string | boolean ->[1, "string", ...temp1] : (number | string | boolean)[] +>[1, "string", ...temp1] : (number | "string" | boolean)[] >1 : number ->"string" : string +>"string" : "string" >...temp1 : boolean >temp1 : boolean[] diff --git a/tests/baselines/reference/doNotemitTripleSlashComments.types b/tests/baselines/reference/doNotemitTripleSlashComments.types index edebe5687f64c..8e9444cbb4fbd 100644 --- a/tests/baselines/reference/doNotemitTripleSlashComments.types +++ b/tests/baselines/reference/doNotemitTripleSlashComments.types @@ -22,7 +22,7 @@ var x = 10; /// var y = "hello"; >y : string ->"hello" : string +>"hello" : "hello" /// @@ -39,5 +39,5 @@ function foo() { } var z = "world"; >z : string ->"world" : string +>"world" : "world" diff --git a/tests/baselines/reference/dottedSymbolResolution1.types b/tests/baselines/reference/dottedSymbolResolution1.types index cf5a5e3ba9d7a..3cc8e0db51317 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.types +++ b/tests/baselines/reference/dottedSymbolResolution1.types @@ -68,7 +68,7 @@ function _setBarAndText(): void { >x.find : (selector: string) => JQuery >x : JQuery >find : (selector: string) => JQuery ->" " : string +>" " : " " >function () { var $this: JQuery = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here } : () => void var $this: JQuery = $(''), @@ -76,7 +76,7 @@ function _setBarAndText(): void { >JQuery : JQuery >$('') : JQuery >$ : JQueryStatic ->'' : string +>'' : "" thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here >thisBar : JQuery @@ -84,7 +84,7 @@ function _setBarAndText(): void { >$this.find : (selector: string) => JQuery >$this : JQuery >find : (selector: string) => JQuery ->".fx-usagebars-calloutbar-this" : string +>".fx-usagebars-calloutbar-this" : ".fx-usagebars-calloutbar-this" } ); } diff --git a/tests/baselines/reference/downlevelLetConst13.types b/tests/baselines/reference/downlevelLetConst13.types index 0453d3a6ad376..e0485ec289606 100644 --- a/tests/baselines/reference/downlevelLetConst13.types +++ b/tests/baselines/reference/downlevelLetConst13.types @@ -1,7 +1,7 @@ === tests/cases/compiler/downlevelLetConst13.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" // exported let\const bindings should not be renamed @@ -10,8 +10,8 @@ export let foo = 10; >10 : number export const bar = "123" ->bar : string ->"123" : string +>bar : "123" +>"123" : "123" export let [bar1] = [1]; >bar1 : number diff --git a/tests/baselines/reference/downlevelLetConst14.types b/tests/baselines/reference/downlevelLetConst14.types index ea6aadfe2a807..59a79de66513a 100644 --- a/tests/baselines/reference/downlevelLetConst14.types +++ b/tests/baselines/reference/downlevelLetConst14.types @@ -1,6 +1,6 @@ === tests/cases/compiler/downlevelLetConst14.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" declare function use(a: any); >use : (a: any) => any @@ -103,7 +103,7 @@ var y = true; { let y = ""; >y : string ->"" : string +>"" : "" let [z6] = [true] >z6 : boolean @@ -161,7 +161,7 @@ var z5 = 1; { let z = ""; >z : string ->"" : string +>"" : "" let [z5] = [5]; >z5 : number diff --git a/tests/baselines/reference/downlevelLetConst15.types b/tests/baselines/reference/downlevelLetConst15.types index 72b29e3fe6680..ccf1cf97aa794 100644 --- a/tests/baselines/reference/downlevelLetConst15.types +++ b/tests/baselines/reference/downlevelLetConst15.types @@ -1,6 +1,6 @@ === tests/cases/compiler/downlevelLetConst15.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" declare function use(a: any); >use : (a: any) => any @@ -108,8 +108,8 @@ var y = true; >true : boolean { const y = ""; ->y : string ->"" : string +>y : "" +>"" : "" const [z6] = [true] >z6 : boolean @@ -140,7 +140,7 @@ var y = true; use(y); >use(y) : any >use : (a: any) => any ->y : string +>y : "" use(z6); >use(z6) : any @@ -166,8 +166,8 @@ var z5 = 1; >1 : number { const z = ""; ->z : string ->"" : string +>z : "" +>"" : "" const [z5] = [5]; >z5 : number @@ -194,7 +194,7 @@ var z5 = 1; use(z); >use(z) : any >use : (a: any) => any ->z : string +>z : "" } use(y); >use(y) : any diff --git a/tests/baselines/reference/downlevelLetConst17.types b/tests/baselines/reference/downlevelLetConst17.types index 4f539835ada42..276e41a9ae5fc 100644 --- a/tests/baselines/reference/downlevelLetConst17.types +++ b/tests/baselines/reference/downlevelLetConst17.types @@ -1,6 +1,6 @@ === tests/cases/compiler/downlevelLetConst17.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" declare function use(a: any); >use : (a: any) => any diff --git a/tests/baselines/reference/downlevelLetConst18.types b/tests/baselines/reference/downlevelLetConst18.types index 42421aa80c065..eeb1d79f122e9 100644 --- a/tests/baselines/reference/downlevelLetConst18.types +++ b/tests/baselines/reference/downlevelLetConst18.types @@ -1,7 +1,7 @@ === tests/cases/compiler/downlevelLetConst18.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" for (let x; ;) { >x : any diff --git a/tests/baselines/reference/downlevelLetConst19.types b/tests/baselines/reference/downlevelLetConst19.types index 687033c195ae1..769f5b73796ec 100644 --- a/tests/baselines/reference/downlevelLetConst19.types +++ b/tests/baselines/reference/downlevelLetConst19.types @@ -1,6 +1,6 @@ === tests/cases/compiler/downlevelLetConst19.ts === 'use strict' ->'use strict' : string +>'use strict' : "use strict" declare function use(a: any); >use : (a: any) => any diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types index 0bb34b22eef2b..d4ff33d80624a 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types @@ -5,7 +5,7 @@ function f() { var arguments = "hello"; >arguments : string ->"hello" : string +>"hello" : "hello" if (Math.random()) { >Math.random() : number diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types index 41c6b87fb4262..3aa01a08125e9 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types @@ -5,7 +5,7 @@ function f() { var arguments = "hello"; >arguments : string ->"hello" : string +>"hello" : "hello" if (Math.random()) { >Math.random() : number @@ -21,5 +21,5 @@ function f() { } var arguments = "world"; >arguments : string ->"world" : string +>"world" : "world" } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types index f62a2dce84cea..392e63fb9b5f1 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types @@ -5,9 +5,9 @@ function f() { var { arguments } = { arguments: "hello" }; >arguments : string ->{ arguments: "hello" } : { arguments: string; } ->arguments : string ->"hello" : string +>{ arguments: "hello" } : { arguments: "hello"; } +>arguments : "hello" +>"hello" : "hello" if (Math.random()) { >Math.random() : number @@ -23,5 +23,5 @@ function f() { } var arguments = "world"; >arguments : string ->"world" : string +>"world" : "world" } diff --git a/tests/baselines/reference/emitClassDeclarationOverloadInES6.types b/tests/baselines/reference/emitClassDeclarationOverloadInES6.types index 94cc2c88ddc31..1b5397eaf6349 100644 --- a/tests/baselines/reference/emitClassDeclarationOverloadInES6.types +++ b/tests/baselines/reference/emitClassDeclarationOverloadInES6.types @@ -19,5 +19,5 @@ class D { constructor(x: number, z="hello") {} >x : number >z : string ->"hello" : string +>"hello" : "hello" } diff --git a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types index 3bdf5af2ba553..c90eb72349b81 100644 --- a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types @@ -24,7 +24,7 @@ class B { x: string = "hello"; >x : string ->"hello" : string +>"hello" : "hello" _bar: string; >_bar : string @@ -32,7 +32,7 @@ class B { constructor(x: number, z = "hello", ...args) { >x : number >z : string ->"hello" : string +>"hello" : "hello" >args : any[] this.y = 10; diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types index 7267af2fde057..ceefeb25308ae 100644 --- a/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types @@ -57,7 +57,7 @@ class D extends C { >super.baz : (a: string, y: number) => void >super : C >baz : (a: string, y: number) => void ->"hello" : string +>"hello" : "hello" >10 : number } } diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types index e4f7d6c00b47b..f251429937d9e 100644 --- a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types @@ -17,33 +17,33 @@ class C { >name2 : string return "BYE"; ->"BYE" : string +>"BYE" : "BYE" } static get ["computedname"]() { ->"computedname" : string +>"computedname" : "computedname" return ""; ->"" : string +>"" : "" } get ["computedname1"]() { ->"computedname1" : string +>"computedname1" : "computedname1" return ""; ->"" : string +>"" : "" } get ["computedname2"]() { ->"computedname2" : string +>"computedname2" : "computedname2" return ""; ->"" : string +>"" : "" } set ["computedname3"](x: any) { ->"computedname3" : string +>"computedname3" : "computedname3" >x : any } set ["computedname4"](y: string) { ->"computedname4" : string +>"computedname4" : "computedname4" >y : string } @@ -56,6 +56,6 @@ class C { >b : number static set ["computedname"](b: string) { } ->"computedname" : string +>"computedname" : "computedname" >b : string } diff --git a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types index d4bc18539ddcf..6e948592e6053 100644 --- a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types @@ -6,13 +6,13 @@ class B { >10 : number 0b110 = "world"; ->"world" : string +>"world" : "world" 0o23534 = "WORLD"; ->"WORLD" : string +>"WORLD" : "WORLD" 20 = "twenty"; ->"twenty" : string +>"twenty" : "twenty" "foo"() { } 0b1110() {} @@ -24,11 +24,11 @@ class B { >10000 : number static 22 = "twenty-two"; ->"twenty-two" : string +>"twenty-two" : "twenty-two" static 0b101 = "binary"; ->"binary" : string +>"binary" : "binary" static 0o3235 = "octal"; ->"octal" : string +>"octal" : "octal" } diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types index 02a90729486a7..92dfdc2a79f70 100644 --- a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types @@ -9,14 +9,14 @@ class D { >foo : () => void ["computedName1"]() { } ->"computedName1" : string +>"computedName1" : "computedName1" ["computedName2"](a: string) { } ->"computedName2" : string +>"computedName2" : "computedName2" >a : string ["computedName3"](a: string): number { return 1; } ->"computedName3" : string +>"computedName3" : "computedName3" >a : string >1 : number @@ -34,17 +34,17 @@ class D { >x : string return "HELLO"; ->"HELLO" : string +>"HELLO" : "HELLO" } static ["computedname4"]() { } ->"computedname4" : string +>"computedname4" : "computedname4" static ["computedname5"](a: string) { } ->"computedname5" : string +>"computedname5" : "computedname5" >a : string static ["computedname6"](a: string): boolean { return true; } ->"computedname6" : string +>"computedname6" : "computedname6" >a : string >true : boolean diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types index ccf4ca3ca9de1..c4871f5736620 100644 --- a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types @@ -4,7 +4,7 @@ class C { x: string = "Hello world"; >x : string ->"Hello world" : string +>"Hello world" : "Hello world" } class D { @@ -12,7 +12,7 @@ class D { x: string = "Hello world"; >x : string ->"Hello world" : string +>"Hello world" : "Hello world" y: number; >y : number @@ -53,10 +53,10 @@ class F extends D{ >super : typeof D this.j = "HI"; ->this.j = "HI" : string +>this.j = "HI" : "HI" >this.j : string >this : this >j : string ->"HI" : string +>"HI" : "HI" } } diff --git a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types index 58d328e3e5d76..06bd7c542a4f8 100644 --- a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types @@ -4,7 +4,7 @@ class C { static z: string = "Foo"; >z : string ->"Foo" : string +>"Foo" : "Foo" } class D { diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpression.types b/tests/baselines/reference/emitDefaultParametersFunctionExpression.types index 61ba3200e36a0..a559e758ee1b7 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpression.types +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpression.types @@ -3,35 +3,35 @@ var lambda1 = (y = "hello") => { } >lambda1 : (y?: string) => void >(y = "hello") => { } : (y?: string) => void >y : string ->"hello" : string +>"hello" : "hello" var lambda2 = (x: number, y = "hello") => { } >lambda2 : (x: number, y?: string) => void >(x: number, y = "hello") => { } : (x: number, y?: string) => void >x : number >y : string ->"hello" : string +>"hello" : "hello" var lambda3 = (x: number, y = "hello", ...rest) => { } >lambda3 : (x: number, y?: string, ...rest: any[]) => void >(x: number, y = "hello", ...rest) => { } : (x: number, y?: string, ...rest: any[]) => void >x : number >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] var lambda4 = (y = "hello", ...rest) => { } >lambda4 : (y?: string, ...rest: any[]) => void >(y = "hello", ...rest) => { } : (y?: string, ...rest: any[]) => void >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] var x = function (str = "hello", ...rest) { } >x : (str?: string, ...rest: any[]) => void >function (str = "hello", ...rest) { } : (str?: string, ...rest: any[]) => void >str : string ->"hello" : string +>"hello" : "hello" >rest : any[] var y = (function (num = 10, boo = false, ...rest) { })() diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.types b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.types index 76f2c863a26e8..09d34ce4bed94 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.types +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.types @@ -3,35 +3,35 @@ var lambda1 = (y = "hello") => { } >lambda1 : (y?: string) => void >(y = "hello") => { } : (y?: string) => void >y : string ->"hello" : string +>"hello" : "hello" var lambda2 = (x: number, y = "hello") => { } >lambda2 : (x: number, y?: string) => void >(x: number, y = "hello") => { } : (x: number, y?: string) => void >x : number >y : string ->"hello" : string +>"hello" : "hello" var lambda3 = (x: number, y = "hello", ...rest) => { } >lambda3 : (x: number, y?: string, ...rest: any[]) => void >(x: number, y = "hello", ...rest) => { } : (x: number, y?: string, ...rest: any[]) => void >x : number >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] var lambda4 = (y = "hello", ...rest) => { } >lambda4 : (y?: string, ...rest: any[]) => void >(y = "hello", ...rest) => { } : (y?: string, ...rest: any[]) => void >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] var x = function (str = "hello", ...rest) { } >x : (str?: string, ...rest: any[]) => void >function (str = "hello", ...rest) { } : (str?: string, ...rest: any[]) => void >str : string ->"hello" : string +>"hello" : "hello" >rest : any[] var y = (function (num = 10, boo = false, ...rest) { })() diff --git a/tests/baselines/reference/emitDefaultParametersFunctionProperty.types b/tests/baselines/reference/emitDefaultParametersFunctionProperty.types index 8a703fd114feb..e78c7d42f6cb9 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionProperty.types +++ b/tests/baselines/reference/emitDefaultParametersFunctionProperty.types @@ -12,21 +12,21 @@ var obj2 = { func2(x = "hello") { }, >func2 : (x?: string) => void >x : string ->"hello" : string +>"hello" : "hello" func3(x: string, z: number, y = "hello") { }, >func3 : (x: string, z: number, y?: string) => void >x : string >z : number >y : string ->"hello" : string +>"hello" : "hello" func4(x: string, z: number, y = "hello", ...rest) { }, >func4 : (x: string, z: number, y?: string, ...rest: any[]) => void >x : string >z : number >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.types b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.types index 1edd505c0b51b..f5482f1a9d348 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.types +++ b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.types @@ -12,20 +12,20 @@ var obj2 = { func2(x = "hello") { }, >func2 : (x?: string) => void >x : string ->"hello" : string +>"hello" : "hello" func3(x: string, z: number, y = "hello") { }, >func3 : (x: string, z: number, y?: string) => void >x : string >z : number >y : string ->"hello" : string +>"hello" : "hello" func4(x: string, z: number, y = "hello", ...rest) { }, >func4 : (x: string, z: number, y?: string, ...rest: any[]) => void >x : string >z : number >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] } diff --git a/tests/baselines/reference/emitDefaultParametersMethod.types b/tests/baselines/reference/emitDefaultParametersMethod.types index ce7dd2542fa7e..c3a7e5bbd107c 100644 --- a/tests/baselines/reference/emitDefaultParametersMethod.types +++ b/tests/baselines/reference/emitDefaultParametersMethod.types @@ -7,7 +7,7 @@ class C { >z : string >x : number >y : string ->"hello" : string +>"hello" : "hello" public foo(x: string, t = false) { } >foo : (x: string, t?: boolean) => void @@ -39,7 +39,7 @@ class D { constructor(y = "hello") { } >y : string ->"hello" : string +>"hello" : "hello" } class E { @@ -47,7 +47,7 @@ class E { constructor(y = "hello", ...rest) { } >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] } diff --git a/tests/baselines/reference/emitDefaultParametersMethodES6.types b/tests/baselines/reference/emitDefaultParametersMethodES6.types index 09096d153bf19..8b84a41fbdf68 100644 --- a/tests/baselines/reference/emitDefaultParametersMethodES6.types +++ b/tests/baselines/reference/emitDefaultParametersMethodES6.types @@ -7,7 +7,7 @@ class C { >z : string >x : number >y : string ->"hello" : string +>"hello" : "hello" public foo(x: string, t = false) { } >foo : (x: string, t?: boolean) => void @@ -39,7 +39,7 @@ class D { constructor(y = "hello") { } >y : string ->"hello" : string +>"hello" : "hello" } class E { @@ -47,6 +47,6 @@ class E { constructor(y = "hello", ...rest) { } >y : string ->"hello" : string +>"hello" : "hello" >rest : any[] } diff --git a/tests/baselines/reference/emitMemberAccessExpression.types b/tests/baselines/reference/emitMemberAccessExpression.types index 7a32e452aec1c..c3f93e98df98e 100644 --- a/tests/baselines/reference/emitMemberAccessExpression.types +++ b/tests/baselines/reference/emitMemberAccessExpression.types @@ -16,12 +16,12 @@ module Microsoft.PeopleAtWork.Model { === tests/cases/compiler/emitMemberAccessExpression_file1.ts === /// "use strict"; ->"use strict" : string +>"use strict" : "use strict" === tests/cases/compiler/emitMemberAccessExpression_file2.ts === /// "use strict"; ->"use strict" : string +>"use strict" : "use strict" module Microsoft.PeopleAtWork.Model { >Microsoft : typeof Microsoft diff --git a/tests/baselines/reference/emptyIndexer.types b/tests/baselines/reference/emptyIndexer.types index 5361ed4d7f4e3..7c7fb160b9804 100644 --- a/tests/baselines/reference/emptyIndexer.types +++ b/tests/baselines/reference/emptyIndexer.types @@ -25,6 +25,6 @@ var n = x[''].m(); // should not crash compiler >x[''].m : () => number >x[''] : I1 >x : I2 ->'' : string +>'' : "" >m : () => number diff --git a/tests/baselines/reference/emptyThenWithoutWarning.types b/tests/baselines/reference/emptyThenWithoutWarning.types index 2dca405966931..82843fd14c9e5 100644 --- a/tests/baselines/reference/emptyThenWithoutWarning.types +++ b/tests/baselines/reference/emptyThenWithoutWarning.types @@ -19,5 +19,5 @@ if(a === 1 || a === 2 || a === 3) { else { let message = "Ooops"; >message : string ->"Ooops" : string +>"Ooops" : "Ooops" } diff --git a/tests/baselines/reference/enumBasics.types b/tests/baselines/reference/enumBasics.types index 87f6f12b6b2ef..6c4266581a6f1 100644 --- a/tests/baselines/reference/enumBasics.types +++ b/tests/baselines/reference/enumBasics.types @@ -81,7 +81,7 @@ enum E3 { X = 'foo'.length, Y = 4 + 3, Z = +'foo' >X : E3 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number >Y : E3 >4 + 3 : number @@ -89,7 +89,7 @@ enum E3 { >3 : number >Z : E3 >+'foo' : number ->'foo' : string +>'foo' : "foo" } // Enum with constant members followed by computed members @@ -102,7 +102,7 @@ enum E4 { >Y : E4 >Z : E4 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number } @@ -142,8 +142,8 @@ enum E7 { A = 'foo'['foo'] >A : E7 >'foo'['foo'] : any ->'foo' : string ->'foo' : string +>'foo' : "foo" +>'foo' : "foo" } // Enum with computed member initializer of type number @@ -153,8 +153,8 @@ enum E8 { B = 'foo'['foo'] >B : E8 >'foo'['foo'] : any ->'foo' : string ->'foo' : string +>'foo' : "foo" +>'foo' : "foo" } //Enum with computed member intializer of same enum type diff --git a/tests/baselines/reference/enumIndexer.types b/tests/baselines/reference/enumIndexer.types index cbc43176b01be..69f4a16747615 100644 --- a/tests/baselines/reference/enumIndexer.types +++ b/tests/baselines/reference/enumIndexer.types @@ -7,14 +7,14 @@ enum MyEnumType { >bar : MyEnumType } var _arr = [{ key: 'foo' }, { key: 'bar' }] ->_arr : { key: string; }[] ->[{ key: 'foo' }, { key: 'bar' }] : { key: string; }[] ->{ key: 'foo' } : { key: string; } ->key : string ->'foo' : string ->{ key: 'bar' } : { key: string; } ->key : string ->'bar' : string +>_arr : ({ key: string; } | { key: string; })[] +>[{ key: 'foo' }, { key: 'bar' }] : ({ key: "foo"; } | { key: "bar"; })[] +>{ key: 'foo' } : { key: "foo"; } +>key : "foo" +>'foo' : "foo" +>{ key: 'bar' } : { key: "bar"; } +>key : "bar" +>'bar' : "bar" var enumValue = MyEnumType.foo; >enumValue : MyEnumType @@ -25,16 +25,16 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : boolean[] >_arr.map(o => MyEnumType[o.key] === enumValue) : boolean[] ->_arr.map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] ->_arr : { key: string; }[] ->map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] ->o => MyEnumType[o.key] === enumValue : (o: { key: string; }) => boolean ->o : { key: string; } +>_arr.map : (callbackfn: (value: { key: string; } | { key: string; }, index: number, array: ({ key: string; } | { key: string; })[]) => U, thisArg?: any) => U[] +>_arr : ({ key: string; } | { key: string; })[] +>map : (callbackfn: (value: { key: string; } | { key: string; }, index: number, array: ({ key: string; } | { key: string; })[]) => U, thisArg?: any) => U[] +>o => MyEnumType[o.key] === enumValue : (o: { key: string; } | { key: string; }) => boolean +>o : { key: string; } | { key: string; } >MyEnumType[o.key] === enumValue : boolean >MyEnumType[o.key] : any >MyEnumType : typeof MyEnumType >o.key : string ->o : { key: string; } +>o : { key: string; } | { key: string; } >key : string >enumValue : MyEnumType diff --git a/tests/baselines/reference/enumMapBackIntoItself.types b/tests/baselines/reference/enumMapBackIntoItself.types index ab26094512b06..e9246ab17ee3d 100644 --- a/tests/baselines/reference/enumMapBackIntoItself.types +++ b/tests/baselines/reference/enumMapBackIntoItself.types @@ -27,5 +27,5 @@ var test = TShirtSize[mySize]; test + '' >test + '' : string >test : string ->'' : string +>'' : "" diff --git a/tests/baselines/reference/enumMerging.types b/tests/baselines/reference/enumMerging.types index 85eb360249fb6..4e8441cde9f44 100644 --- a/tests/baselines/reference/enumMerging.types +++ b/tests/baselines/reference/enumMerging.types @@ -80,15 +80,15 @@ module M2 { A = 'foo'.length, B = 'foo'.length, C = 'foo'.length >A : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number >B : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number >C : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number } @@ -98,15 +98,15 @@ module M2 { D = 'foo'.length, E = 'foo'.length, F = 'foo'.length >D : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number >E : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number >F : EComp2 >'foo'.length : number ->'foo' : string +>'foo' : "foo" >length : number } diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.types b/tests/baselines/reference/es3defaultAliasIsQuoted.types index d3b1ebf105b84..b041235966098 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.types +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.types @@ -5,7 +5,7 @@ export class Foo { static CONSTANT = "Foo"; >CONSTANT : string ->"Foo" : string +>"Foo" : "Foo" } export default function assert(value: boolean) { @@ -17,7 +17,7 @@ export default function assert(value: boolean) { >value : boolean >new Error("Assertion failed!") : Error >Error : ErrorConstructor ->"Assertion failed!" : string +>"Assertion failed!" : "Assertion failed!" } === tests/cases/compiler/es3defaultAliasQuoted_file1.ts === @@ -33,5 +33,5 @@ assert(Foo.CONSTANT === "Foo"); >Foo.CONSTANT : string >Foo : typeof Foo >CONSTANT : string ->"Foo" : string +>"Foo" : "Foo" diff --git a/tests/baselines/reference/es5-commonjs5.types b/tests/baselines/reference/es5-commonjs5.types index d8094e1e0ea1b..fb72fda8c11db 100644 --- a/tests/baselines/reference/es5-commonjs5.types +++ b/tests/baselines/reference/es5-commonjs5.types @@ -2,6 +2,6 @@ export default function () { return "test"; ->"test" : string +>"test" : "test" } diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.types b/tests/baselines/reference/es6ClassSuperCodegenBug.types index 65269c99997ae..d60e99cab3e89 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.types +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.types @@ -18,15 +18,15 @@ class B extends A { super('a1', 'b1'); >super('a1', 'b1') : void >super : typeof A ->'a1' : string ->'b1' : string +>'a1' : "a1" +>'b1' : "b1" } else { super('a2', 'b2'); >super('a2', 'b2') : void >super : typeof A ->'a2' : string ->'b2' : string +>'a2' : "a2" +>'b2' : "b2" } } } diff --git a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.types b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.types index a65a2978e1b04..11c6caf3dbe8f 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.types +++ b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.types @@ -18,7 +18,7 @@ export class C implements I { prop = "hello"; >prop : string ->"hello" : string +>"hello" : "hello" } export class C2 implements I2 { >C2 : C2 @@ -26,7 +26,7 @@ export class C2 implements I2 { prop2 = "world"; >prop2 : string ->"world" : string +>"world" : "world" } === tests/cases/compiler/client.ts === diff --git a/tests/baselines/reference/es6ModuleConst.types b/tests/baselines/reference/es6ModuleConst.types index 99b9f7c298046..b83e39e61ad1f 100644 --- a/tests/baselines/reference/es6ModuleConst.types +++ b/tests/baselines/reference/es6ModuleConst.types @@ -1,11 +1,11 @@ === tests/cases/compiler/es6ModuleConst.ts === export const a = "hello"; ->a : string ->"hello" : string +>a : "hello" +>"hello" : "hello" export const x: string = a, y = x; >x : string ->a : string +>a : "hello" >y : string >x : string @@ -23,49 +23,49 @@ export module m1 { >m1 : typeof m1 export const k = a; ->k : string ->a : string +>k : "hello" +>a : "hello" export const l: string = b, m = k; >l : string >b : string ->m : string ->k : string +>m : "hello" +>k : "hello" const n = m1.k; ->n : string ->m1.k : string +>n : "hello" +>m1.k : "hello" >m1 : typeof m1 ->k : string +>k : "hello" const o: string = n, p = k; >o : string ->n : string ->p : string ->k : string +>n : "hello" +>p : "hello" +>k : "hello" } module m2 { >m2 : typeof m2 export const k = a; ->k : string ->a : string +>k : "hello" +>a : "hello" export const l: string = b, m = k; >l : string >b : string ->m : string ->k : string +>m : "hello" +>k : "hello" const n = m1.k; ->n : string ->m1.k : string +>n : "hello" +>m1.k : "hello" >m1 : typeof m1 ->k : string +>k : "hello" const o: string = n, p = k; >o : string ->n : string ->p : string ->k : string +>n : "hello" +>p : "hello" +>k : "hello" } diff --git a/tests/baselines/reference/es6ModuleLet.types b/tests/baselines/reference/es6ModuleLet.types index 9e670c0a1e17b..a8bfb89dd6ee7 100644 --- a/tests/baselines/reference/es6ModuleLet.types +++ b/tests/baselines/reference/es6ModuleLet.types @@ -1,7 +1,7 @@ === tests/cases/compiler/es6ModuleLet.ts === export let a = "hello"; >a : string ->"hello" : string +>"hello" : "hello" export let x: string = a, y = x; >x : string diff --git a/tests/baselines/reference/es6ModuleVariableStatement.types b/tests/baselines/reference/es6ModuleVariableStatement.types index 520430199e4d7..00278b6511c7f 100644 --- a/tests/baselines/reference/es6ModuleVariableStatement.types +++ b/tests/baselines/reference/es6ModuleVariableStatement.types @@ -1,7 +1,7 @@ === tests/cases/compiler/es6ModuleVariableStatement.ts === export var a = "hello"; >a : string ->"hello" : string +>"hello" : "hello" export var x: string = a, y = x; >x : string diff --git a/tests/baselines/reference/escapedIdentifiers.types b/tests/baselines/reference/escapedIdentifiers.types index 67713976bd6ee..8a413029a5459 100644 --- a/tests/baselines/reference/escapedIdentifiers.types +++ b/tests/baselines/reference/escapedIdentifiers.types @@ -233,9 +233,9 @@ class testClass { >1 : number arg2 = 'string'; ->arg2 = 'string' : string +>arg2 = 'string' : "string" >arg2 : string ->'string' : string +>'string' : "string" arg\u0033 = true; >arg\u0033 = true : boolean @@ -265,7 +265,7 @@ var constructorTestObject = new constructorTestClass(1, 'string', true, 2); >new constructorTestClass(1, 'string', true, 2) : constructorTestClass >constructorTestClass : typeof constructorTestClass >1 : number ->'string' : string +>'string' : "string" >true : boolean >2 : number @@ -277,11 +277,11 @@ constructorTestObject.arg\u0031 = 1; >1 : number constructorTestObject.arg2 = 'string'; ->constructorTestObject.arg2 = 'string' : string +>constructorTestObject.arg2 = 'string' : "string" >constructorTestObject.arg2 : string >constructorTestObject : constructorTestClass >arg2 : string ->'string' : string +>'string' : "string" constructorTestObject.arg\u0033 = true; >constructorTestObject.arg\u0033 = true : boolean diff --git a/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.types b/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.types index 1ebbf8aedb2b5..0f8619cd38166 100644 --- a/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.types +++ b/tests/baselines/reference/escapedReservedCompilerNamedIdentifier.types @@ -16,7 +16,7 @@ var b = o["__proto__"]; >b : number >o["__proto__"] : number >o : { "__proto__": number; } ->"__proto__" : string +>"__proto__" : "___proto__" var o1 = { >o1 : { __proto__: number; } @@ -31,7 +31,7 @@ var b1 = o1["__proto__"]; >b1 : number >o1["__proto__"] : number >o1 : { __proto__: number; } ->"__proto__" : string +>"__proto__" : "___proto__" // Triple underscores var ___proto__ = 10; @@ -50,7 +50,7 @@ var b2 = o2["___proto__"]; >b2 : number >o2["___proto__"] : number >o2 : { "___proto__": number; } ->"___proto__" : string +>"___proto__" : "____proto__" var o3 = { >o3 : { ___proto__: number; } @@ -65,7 +65,7 @@ var b3 = o3["___proto__"]; >b3 : number >o3["___proto__"] : number >o3 : { ___proto__: number; } ->"___proto__" : string +>"___proto__" : "____proto__" // One underscore var _proto__ = 10; @@ -84,7 +84,7 @@ var b4 = o4["_proto__"]; >b4 : number >o4["_proto__"] : number >o4 : { "_proto__": number; } ->"_proto__" : string +>"_proto__" : "_proto__" var o5 = { >o5 : { _proto__: number; } @@ -99,5 +99,5 @@ var b5 = o5["_proto__"]; >b5 : number >o5["_proto__"] : number >o5 : { _proto__: number; } ->"_proto__" : string +>"_proto__" : "_proto__" diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types index 0e7059f4eed3c..b62b9ced9f958 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types @@ -64,7 +64,7 @@ var aNumber: number = 9.9; var aString: string = 'this is a string'; >aString : string ->'this is a string' : string +>'this is a string' : "this is a string" var aDate: Date = new Date(12); >aDate : Date @@ -160,6 +160,6 @@ var aFunctionInModule: typeof M.F2 = (x) => 'this is a string'; >F2 : (x: number) => string >(x) => 'this is a string' : (x: number) => string >x : number ->'this is a string' : string +>'this is a string' : "this is a string" diff --git a/tests/baselines/reference/everyTypeWithInitializer.types b/tests/baselines/reference/everyTypeWithInitializer.types index abc0e770e3505..56d6c80c81315 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.types +++ b/tests/baselines/reference/everyTypeWithInitializer.types @@ -64,7 +64,7 @@ var aNumber = 9.9; var aString = 'this is a string'; >aString : string ->'this is a string' : string +>'this is a string' : "this is a string" var aDate = new Date(12); >aDate : Date diff --git a/tests/baselines/reference/excessPropertyErrorsSuppressed.types b/tests/baselines/reference/excessPropertyErrorsSuppressed.types index 47a4dbf92a970..1a0bab6b80481 100644 --- a/tests/baselines/reference/excessPropertyErrorsSuppressed.types +++ b/tests/baselines/reference/excessPropertyErrorsSuppressed.types @@ -3,9 +3,9 @@ var x: { a: string } = { a: "hello", b: 42 }; // No error >x : { a: string; } >a : string ->{ a: "hello", b: 42 } : { a: string; b: number; } ->a : string ->"hello" : string +>{ a: "hello", b: 42 } : { a: "hello"; b: number; } +>a : "hello" +>"hello" : "hello" >b : number >42 : number diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.types b/tests/baselines/reference/exportAssignmentMergedInterface.types index 52978783f6d7c..538538ae62eb1 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.types +++ b/tests/baselines/reference/exportAssignmentMergedInterface.types @@ -9,7 +9,7 @@ var x: foo; x("test"); >x("test") : void >x : foo ->"test" : string +>"test" : "test" x(42); >x(42) : number diff --git a/tests/baselines/reference/exportAssignmentTopLevelClodule.types b/tests/baselines/reference/exportAssignmentTopLevelClodule.types index 93ce39c3b6079..e6a5a862cfe90 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelClodule.types +++ b/tests/baselines/reference/exportAssignmentTopLevelClodule.types @@ -21,7 +21,7 @@ class Foo { test = "test"; >test : string ->"test" : string +>"test" : "test" } module Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/exportAssignmentTopLevelFundule.types b/tests/baselines/reference/exportAssignmentTopLevelFundule.types index 3464f4294a035..21f0bdd72757a 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelFundule.types +++ b/tests/baselines/reference/exportAssignmentTopLevelFundule.types @@ -20,7 +20,7 @@ function foo() { >foo : typeof foo return "test"; ->"test" : string +>"test" : "test" } module foo { >foo : typeof foo diff --git a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.types b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.types index 1ad841fe94761..ec22904750181 100644 --- a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.types +++ b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.types @@ -2,7 +2,7 @@ export var x = "x"; >x : string ->"x" : string +>"x" : "x" === tests/cases/compiler/t2.ts === export { x } from diff --git a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types index 657e0301f83e1..47e83523da170 100644 --- a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types +++ b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types @@ -2,5 +2,5 @@ export default class { static z: string = "Foo"; >z : string ->"Foo" : string +>"Foo" : "Foo" } diff --git a/tests/baselines/reference/exportImport.types b/tests/baselines/reference/exportImport.types index a6361d3cbac6c..decfe97a594da 100644 --- a/tests/baselines/reference/exportImport.types +++ b/tests/baselines/reference/exportImport.types @@ -21,7 +21,7 @@ export = Widget1 class Widget1 { name = 'one'; } >Widget1 : Widget1 >name : string ->'one' : string +>'one' : "one" === tests/cases/compiler/exporter.ts === export import w = require('./w1'); diff --git a/tests/baselines/reference/exportImportAlias.types b/tests/baselines/reference/exportImportAlias.types index f0c21d461bc4c..16049253546e0 100644 --- a/tests/baselines/reference/exportImportAlias.types +++ b/tests/baselines/reference/exportImportAlias.types @@ -6,7 +6,7 @@ module A { export var x = 'hello world' >x : string ->'hello world' : string +>'hello world' : "hello world" export class Point { >Point : Point @@ -168,7 +168,7 @@ var o = new M.D('Hello'); >M.D : typeof K.L >M : typeof M >D : typeof K.L ->'Hello' : string +>'Hello' : "Hello" var p: { x: number; y: number; } >p : { x: number; y: number; } diff --git a/tests/baselines/reference/exportImportAndClodule.types b/tests/baselines/reference/exportImportAndClodule.types index 36ca259666ca3..ee035c52c31b5 100644 --- a/tests/baselines/reference/exportImportAndClodule.types +++ b/tests/baselines/reference/exportImportAndClodule.types @@ -44,7 +44,7 @@ var o = new M.D('Hello'); >M.D : typeof K.L >M : typeof M >D : typeof K.L ->'Hello' : string +>'Hello' : "Hello" var p: { x: number; y: number; } >p : { x: number; y: number; } diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.types b/tests/baselines/reference/exportImportNonInstantiatedModule2.types index 34f0810c12d2f..d5be1e2e8fe7f 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.types +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.types @@ -8,9 +8,9 @@ export function w(): e.w { // Should be OK >w : e.w return {name: 'value' }; ->{name: 'value' } : { name: string; } ->name : string ->'value' : string +>{name: 'value' } : { name: "value"; } +>name : "value" +>'value' : "value" } === tests/cases/compiler/w1.ts === diff --git a/tests/baselines/reference/exportedVariable1.types b/tests/baselines/reference/exportedVariable1.types index fa7017fefa8c9..8b98f6b3245d4 100644 --- a/tests/baselines/reference/exportedVariable1.types +++ b/tests/baselines/reference/exportedVariable1.types @@ -1,9 +1,9 @@ === tests/cases/compiler/exportedVariable1.ts === export var foo = {name: "Bill"}; >foo : { name: string; } ->{name: "Bill"} : { name: string; } ->name : string ->"Bill" : string +>{name: "Bill"} : { name: "Bill"; } +>name : "Bill" +>"Bill" : "Bill" var upper = foo.name.toUpperCase(); >upper : string diff --git a/tests/baselines/reference/exportsAndImports2-amd.types b/tests/baselines/reference/exportsAndImports2-amd.types index 32de763c5673e..46e42174a7710 100644 --- a/tests/baselines/reference/exportsAndImports2-amd.types +++ b/tests/baselines/reference/exportsAndImports2-amd.types @@ -2,11 +2,11 @@ export var x = "x"; >x : string ->"x" : string +>"x" : "x" export var y = "y"; >y : string ->"y" : string +>"y" : "y" === tests/cases/conformance/es6/modules/t2.ts === export { x as y, y as x } from "./t1"; diff --git a/tests/baselines/reference/exportsAndImports2-es6.types b/tests/baselines/reference/exportsAndImports2-es6.types index 32de763c5673e..46e42174a7710 100644 --- a/tests/baselines/reference/exportsAndImports2-es6.types +++ b/tests/baselines/reference/exportsAndImports2-es6.types @@ -2,11 +2,11 @@ export var x = "x"; >x : string ->"x" : string +>"x" : "x" export var y = "y"; >y : string ->"y" : string +>"y" : "y" === tests/cases/conformance/es6/modules/t2.ts === export { x as y, y as x } from "./t1"; diff --git a/tests/baselines/reference/exportsAndImports2.types b/tests/baselines/reference/exportsAndImports2.types index 32de763c5673e..46e42174a7710 100644 --- a/tests/baselines/reference/exportsAndImports2.types +++ b/tests/baselines/reference/exportsAndImports2.types @@ -2,11 +2,11 @@ export var x = "x"; >x : string ->"x" : string +>"x" : "x" export var y = "y"; >y : string ->"y" : string +>"y" : "y" === tests/cases/conformance/es6/modules/t2.ts === export { x as y, y as x } from "./t1"; diff --git a/tests/baselines/reference/exportsAndImports4-amd.types b/tests/baselines/reference/exportsAndImports4-amd.types index 4bd6f8c0e1eee..dfddd897e5918 100644 --- a/tests/baselines/reference/exportsAndImports4-amd.types +++ b/tests/baselines/reference/exportsAndImports4-amd.types @@ -3,63 +3,63 @@ import a = require("./t1"); >a : typeof a a.default; ->a.default : string +>a.default : "hello" >a : typeof a ->default : string +>default : "hello" import b from "./t1"; ->b : string +>b : "hello" b; ->b : string +>b : "hello" import * as c from "./t1"; >c : typeof a c.default; ->c.default : string +>c.default : "hello" >c : typeof a ->default : string +>default : "hello" import { default as d } from "./t1"; ->default : string ->d : string +>default : "hello" +>d : "hello" d; ->d : string +>d : "hello" import e1, * as e2 from "./t1"; ->e1 : string +>e1 : "hello" >e2 : typeof a e1; ->e1 : string +>e1 : "hello" e2.default; ->e2.default : string +>e2.default : "hello" >e2 : typeof a ->default : string +>default : "hello" import f1, { default as f2 } from "./t1"; ->f1 : string ->default : string ->f2 : string +>f1 : "hello" +>default : "hello" +>f2 : "hello" f1; ->f1 : string +>f1 : "hello" f2; ->f2 : string +>f2 : "hello" export { a, b, c, d, e1, e2, f1, f2 }; >a : typeof a ->b : string +>b : "hello" >c : typeof a ->d : string ->e1 : string +>d : "hello" +>e1 : "hello" >e2 : typeof a ->f1 : string ->f2 : string +>f1 : "hello" +>f2 : "hello" === tests/cases/conformance/es6/modules/t1.ts === diff --git a/tests/baselines/reference/exportsAndImports4-es6.types b/tests/baselines/reference/exportsAndImports4-es6.types index 4bd6f8c0e1eee..dfddd897e5918 100644 --- a/tests/baselines/reference/exportsAndImports4-es6.types +++ b/tests/baselines/reference/exportsAndImports4-es6.types @@ -3,63 +3,63 @@ import a = require("./t1"); >a : typeof a a.default; ->a.default : string +>a.default : "hello" >a : typeof a ->default : string +>default : "hello" import b from "./t1"; ->b : string +>b : "hello" b; ->b : string +>b : "hello" import * as c from "./t1"; >c : typeof a c.default; ->c.default : string +>c.default : "hello" >c : typeof a ->default : string +>default : "hello" import { default as d } from "./t1"; ->default : string ->d : string +>default : "hello" +>d : "hello" d; ->d : string +>d : "hello" import e1, * as e2 from "./t1"; ->e1 : string +>e1 : "hello" >e2 : typeof a e1; ->e1 : string +>e1 : "hello" e2.default; ->e2.default : string +>e2.default : "hello" >e2 : typeof a ->default : string +>default : "hello" import f1, { default as f2 } from "./t1"; ->f1 : string ->default : string ->f2 : string +>f1 : "hello" +>default : "hello" +>f2 : "hello" f1; ->f1 : string +>f1 : "hello" f2; ->f2 : string +>f2 : "hello" export { a, b, c, d, e1, e2, f1, f2 }; >a : typeof a ->b : string +>b : "hello" >c : typeof a ->d : string ->e1 : string +>d : "hello" +>e1 : "hello" >e2 : typeof a ->f1 : string ->f2 : string +>f1 : "hello" +>f2 : "hello" === tests/cases/conformance/es6/modules/t1.ts === diff --git a/tests/baselines/reference/exportsAndImports4.types b/tests/baselines/reference/exportsAndImports4.types index 4bd6f8c0e1eee..dfddd897e5918 100644 --- a/tests/baselines/reference/exportsAndImports4.types +++ b/tests/baselines/reference/exportsAndImports4.types @@ -3,63 +3,63 @@ import a = require("./t1"); >a : typeof a a.default; ->a.default : string +>a.default : "hello" >a : typeof a ->default : string +>default : "hello" import b from "./t1"; ->b : string +>b : "hello" b; ->b : string +>b : "hello" import * as c from "./t1"; >c : typeof a c.default; ->c.default : string +>c.default : "hello" >c : typeof a ->default : string +>default : "hello" import { default as d } from "./t1"; ->default : string ->d : string +>default : "hello" +>d : "hello" d; ->d : string +>d : "hello" import e1, * as e2 from "./t1"; ->e1 : string +>e1 : "hello" >e2 : typeof a e1; ->e1 : string +>e1 : "hello" e2.default; ->e2.default : string +>e2.default : "hello" >e2 : typeof a ->default : string +>default : "hello" import f1, { default as f2 } from "./t1"; ->f1 : string ->default : string ->f2 : string +>f1 : "hello" +>default : "hello" +>f2 : "hello" f1; ->f1 : string +>f1 : "hello" f2; ->f2 : string +>f2 : "hello" export { a, b, c, d, e1, e2, f1, f2 }; >a : typeof a ->b : string +>b : "hello" >c : typeof a ->d : string ->e1 : string +>d : "hello" +>e1 : "hello" >e2 : typeof a ->f1 : string ->f2 : string +>f1 : "hello" +>f2 : "hello" === tests/cases/conformance/es6/modules/t1.ts === diff --git a/tests/baselines/reference/extendBooleanInterface.types b/tests/baselines/reference/extendBooleanInterface.types index 8f91deba713c7..545d082f5bbe4 100644 --- a/tests/baselines/reference/extendBooleanInterface.types +++ b/tests/baselines/reference/extendBooleanInterface.types @@ -30,20 +30,20 @@ var b: string = x.doOtherStuff('hm'); >x.doOtherStuff : (x: T) => T >x : boolean >doOtherStuff : (x: T) => T ->'hm' : string +>'hm' : "hm" var c: string = x['doStuff'](); >c : string >x['doStuff']() : string >x['doStuff'] : () => string >x : boolean ->'doStuff' : string +>'doStuff' : "doStuff" var d: string = x['doOtherStuff']('hm'); >d : string >x['doOtherStuff']('hm') : string >x['doOtherStuff'] : (x: T) => T >x : boolean ->'doOtherStuff' : string ->'hm' : string +>'doOtherStuff' : "doOtherStuff" +>'hm' : "hm" diff --git a/tests/baselines/reference/extendNumberInterface.types b/tests/baselines/reference/extendNumberInterface.types index 97ef307bab8c7..35a39e79a784d 100644 --- a/tests/baselines/reference/extendNumberInterface.types +++ b/tests/baselines/reference/extendNumberInterface.types @@ -30,20 +30,20 @@ var b: string = x.doOtherStuff('hm'); >x.doOtherStuff : (x: T) => T >x : number >doOtherStuff : (x: T) => T ->'hm' : string +>'hm' : "hm" var c: string = x['doStuff'](); >c : string >x['doStuff']() : string >x['doStuff'] : () => string >x : number ->'doStuff' : string +>'doStuff' : "doStuff" var d: string = x['doOtherStuff']('hm'); >d : string >x['doOtherStuff']('hm') : string >x['doOtherStuff'] : (x: T) => T >x : number ->'doOtherStuff' : string ->'hm' : string +>'doOtherStuff' : "doOtherStuff" +>'hm' : "hm" diff --git a/tests/baselines/reference/extendStringInterface.types b/tests/baselines/reference/extendStringInterface.types index edfd82390154c..5b3b5c6b9ea1a 100644 --- a/tests/baselines/reference/extendStringInterface.types +++ b/tests/baselines/reference/extendStringInterface.types @@ -15,7 +15,7 @@ interface String { var x = ''; >x : string ->'' : string +>'' : "" var a: string = x.doStuff(); >a : string @@ -30,20 +30,20 @@ var b: string = x.doOtherStuff('hm'); >x.doOtherStuff : (x: T) => T >x : string >doOtherStuff : (x: T) => T ->'hm' : string +>'hm' : "hm" var c: string = x['doStuff'](); >c : string >x['doStuff']() : string >x['doStuff'] : () => string >x : string ->'doStuff' : string +>'doStuff' : "doStuff" var d: string = x['doOtherStuff']('hm'); >d : string >x['doOtherStuff']('hm') : string >x['doOtherStuff'] : (x: T) => T >x : string ->'doOtherStuff' : string ->'hm' : string +>'doOtherStuff' : "doOtherStuff" +>'hm' : "hm" diff --git a/tests/baselines/reference/externFunc.types b/tests/baselines/reference/externFunc.types index ab417859ea5ec..5cda004d4cf55 100644 --- a/tests/baselines/reference/externFunc.types +++ b/tests/baselines/reference/externFunc.types @@ -6,5 +6,5 @@ declare function parseInt(s:string):number; parseInt("2"); >parseInt("2") : number >parseInt : { (s: string, radix?: number): number; (s: string): number; } ->"2" : string +>"2" : "2" diff --git a/tests/baselines/reference/externalModuleQualification.types b/tests/baselines/reference/externalModuleQualification.types index a7b70697209d4..42f0d3579b4ae 100644 --- a/tests/baselines/reference/externalModuleQualification.types +++ b/tests/baselines/reference/externalModuleQualification.types @@ -1,7 +1,7 @@ === tests/cases/compiler/externalModuleQualification.ts === export var ID = "test"; >ID : string ->"test" : string +>"test" : "test" export class DiffEditor { >DiffEditor : DiffEditor diff --git a/tests/baselines/reference/fatArrowSelf.types b/tests/baselines/reference/fatArrowSelf.types index 574262265bc0d..1f9627b595e4e 100644 --- a/tests/baselines/reference/fatArrowSelf.types +++ b/tests/baselines/reference/fatArrowSelf.types @@ -41,7 +41,7 @@ module Consumer { >this : this >emitter : Events.EventEmitter >addListener : (type: string, listener: Events.ListenerCallback) => void ->'change' : string +>'change' : "change" >(e) => { this.changed(); } : (e: any) => void >e : any diff --git a/tests/baselines/reference/fatarrowfunctions.types b/tests/baselines/reference/fatarrowfunctions.types index e48b63e50ee2d..4e6821af81dc4 100644 --- a/tests/baselines/reference/fatarrowfunctions.types +++ b/tests/baselines/reference/fatarrowfunctions.types @@ -220,11 +220,11 @@ declare function setTimeout(expression: any, msec?: number, language?: any): num var messenger = { >messenger : { message: string; start: () => void; } ->{ message: "Hello World", start: function() { setTimeout(() => { this.message.toString(); }, 3000); }} : { message: string; start: () => void; } +>{ message: "Hello World", start: function() { setTimeout(() => { this.message.toString(); }, 3000); }} : { message: "Hello World"; start: () => void; } message: "Hello World", ->message : string ->"Hello World" : string +>message : "Hello World" +>"Hello World" : "Hello World" start: function() { >start : () => void diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctions.types b/tests/baselines/reference/fatarrowfunctionsInFunctions.types index 00abaec9f2505..1b7da5b50ea97 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctions.types +++ b/tests/baselines/reference/fatarrowfunctionsInFunctions.types @@ -7,11 +7,11 @@ declare function setTimeout(expression: any, msec?: number, language?: any): num var messenger = { >messenger : { message: string; start: () => void; } ->{ message: "Hello World", start: function() { var _self = this; setTimeout(function() { _self.message.toString(); }, 3000); }} : { message: string; start: () => void; } +>{ message: "Hello World", start: function() { var _self = this; setTimeout(function() { _self.message.toString(); }, 3000); }} : { message: "Hello World"; start: () => void; } message: "Hello World", ->message : string ->"Hello World" : string +>message : "Hello World" +>"Hello World" : "Hello World" start: function() { >start : () => void diff --git a/tests/baselines/reference/fileWithNextLine1.types b/tests/baselines/reference/fileWithNextLine1.types index 2afb1f2ae3724..d314fd996dd2a 100644 --- a/tests/baselines/reference/fileWithNextLine1.types +++ b/tests/baselines/reference/fileWithNextLine1.types @@ -3,5 +3,5 @@ // 0. It should be counted as a space and should not cause an error. var v = '…'; >v : string ->'…' : string +>'…' : "\u0085" diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly1.types b/tests/baselines/reference/fixingTypeParametersRepeatedly1.types index 273c66b342d6c..41e705ba94353 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly1.types +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly1.types @@ -17,7 +17,7 @@ declare function f(x: T, y: (p: T) => T, z: (p: T) => T): T; f("", x => null, x => x.toLowerCase()); >f("", x => null, x => x.toLowerCase()) : string >f : (x: T, y: (p: T) => T, z: (p: T) => T) => T ->"" : string +>"" : "" >x => null : (x: string) => any >x : string >null : null @@ -50,7 +50,7 @@ declare function g(); g("", x => null, x => x.toLowerCase()); >g("", x => null, x => x.toLowerCase()) : string >g : { (x: T, y: (p: T) => T, z: (p: T) => T): T; (): any; } ->"" : string +>"" : "" >x => null : (x: string) => any >x : string >null : null diff --git a/tests/baselines/reference/for-of13.types b/tests/baselines/reference/for-of13.types index e176b1bbf0c27..29ed47bbb1784 100644 --- a/tests/baselines/reference/for-of13.types +++ b/tests/baselines/reference/for-of13.types @@ -6,7 +6,7 @@ for (v of [""].values()) { } >v : string >[""].values() : IterableIterator >[""].values : () => IterableIterator ->[""] : string[] ->"" : string +>[""] : ""[] +>"" : "" >values : () => IterableIterator diff --git a/tests/baselines/reference/for-of18.types b/tests/baselines/reference/for-of18.types index 415f2b1156831..e5097e3e0b360 100644 --- a/tests/baselines/reference/for-of18.types +++ b/tests/baselines/reference/for-of18.types @@ -14,11 +14,11 @@ class StringIterator { >next : () => { value: string; done: boolean; } return { ->{ value: "", done: false } : { value: string; done: boolean; } +>{ value: "", done: false } : { value: ""; done: boolean; } value: "", ->value : string ->"" : string +>value : "" +>"" : "" done: false >done : boolean diff --git a/tests/baselines/reference/for-of36.types b/tests/baselines/reference/for-of36.types index e23ea79d0a90e..49d5698d7dfb1 100644 --- a/tests/baselines/reference/for-of36.types +++ b/tests/baselines/reference/for-of36.types @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/for-ofStatements/for-of36.ts === var tuple: [string, boolean] = ["", true]; >tuple : [string, boolean] ->["", true] : [string, boolean] ->"" : string +>["", true] : ["", boolean] +>"" : "" >true : boolean for (var v of tuple) { diff --git a/tests/baselines/reference/for-of37.types b/tests/baselines/reference/for-of37.types index 89272742f6264..88bc4688dcafe 100644 --- a/tests/baselines/reference/for-of37.types +++ b/tests/baselines/reference/for-of37.types @@ -3,9 +3,9 @@ var map = new Map([["", true]]); >map : Map >new Map([["", true]]) : Map >Map : MapConstructor ->[["", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true]] : ["", boolean][] +>["", true] : ["", boolean] +>"" : "" >true : boolean for (var v of map) { diff --git a/tests/baselines/reference/for-of38.types b/tests/baselines/reference/for-of38.types index f8b7555781f65..acd2af39e7fc0 100644 --- a/tests/baselines/reference/for-of38.types +++ b/tests/baselines/reference/for-of38.types @@ -3,9 +3,9 @@ var map = new Map([["", true]]); >map : Map >new Map([["", true]]) : Map >Map : MapConstructor ->[["", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true]] : ["", boolean][] +>["", true] : ["", boolean] +>"" : "" >true : boolean for (var [k, v] of map) { diff --git a/tests/baselines/reference/for-of40.types b/tests/baselines/reference/for-of40.types index 6693514ec53b6..4bd880886b1f3 100644 --- a/tests/baselines/reference/for-of40.types +++ b/tests/baselines/reference/for-of40.types @@ -3,14 +3,14 @@ var map = new Map([["", true]]); >map : Map >new Map([["", true]]) : Map >Map : MapConstructor ->[["", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true]] : ["", boolean][] +>["", true] : ["", boolean] +>"" : "" >true : boolean for (var [k = "", v = false] of map) { >k : string ->"" : string +>"" : "" >v : boolean >false : boolean >map : Map diff --git a/tests/baselines/reference/for-of41.types b/tests/baselines/reference/for-of41.types index 31e3e253002e7..4faee697369a7 100644 --- a/tests/baselines/reference/for-of41.types +++ b/tests/baselines/reference/for-of41.types @@ -1,15 +1,15 @@ === tests/cases/conformance/es6/for-ofStatements/for-of41.ts === var array = [{x: [0], y: {p: ""}}] >array : { x: number[]; y: { p: string; }; }[] ->[{x: [0], y: {p: ""}}] : { x: number[]; y: { p: string; }; }[] ->{x: [0], y: {p: ""}} : { x: number[]; y: { p: string; }; } +>[{x: [0], y: {p: ""}}] : { x: number[]; y: { p: ""; }; }[] +>{x: [0], y: {p: ""}} : { x: number[]; y: { p: ""; }; } >x : number[] >[0] : number[] >0 : number ->y : { p: string; } ->{p: ""} : { p: string; } ->p : string ->"" : string +>y : { p: ""; } +>{p: ""} : { p: ""; } +>p : "" +>"" : "" for (var {x: [a], y: {p}} of array) { >x : any diff --git a/tests/baselines/reference/for-of42.types b/tests/baselines/reference/for-of42.types index 64327bcc27fb6..6cee240b98c64 100644 --- a/tests/baselines/reference/for-of42.types +++ b/tests/baselines/reference/for-of42.types @@ -1,10 +1,10 @@ === tests/cases/conformance/es6/for-ofStatements/for-of42.ts === var array = [{ x: "", y: 0 }] >array : { x: string; y: number; }[] ->[{ x: "", y: 0 }] : { x: string; y: number; }[] ->{ x: "", y: 0 } : { x: string; y: number; } ->x : string ->"" : string +>[{ x: "", y: 0 }] : { x: ""; y: number; }[] +>{ x: "", y: 0 } : { x: ""; y: number; } +>x : "" +>"" : "" >y : number >0 : number diff --git a/tests/baselines/reference/for-of44.types b/tests/baselines/reference/for-of44.types index e6f4e0450b3c7..943418cde2ea8 100644 --- a/tests/baselines/reference/for-of44.types +++ b/tests/baselines/reference/for-of44.types @@ -1,10 +1,10 @@ === tests/cases/conformance/es6/for-ofStatements/for-of44.ts === var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]] >array : [number, string | boolean | symbol][] ->[[0, ""], [0, true], [1, Symbol()]] : ([number, string] | [number, boolean] | [number, symbol])[] ->[0, ""] : [number, string] +>[[0, ""], [0, true], [1, Symbol()]] : ([number, ""] | [number, boolean] | [number, symbol])[] +>[0, ""] : [number, ""] >0 : number ->"" : string +>"" : "" >[0, true] : [number, boolean] >0 : number >true : boolean diff --git a/tests/baselines/reference/for-of45.types b/tests/baselines/reference/for-of45.types index b71e062eccfc2..cd9f322b59c7b 100644 --- a/tests/baselines/reference/for-of45.types +++ b/tests/baselines/reference/for-of45.types @@ -7,16 +7,16 @@ var map = new Map([["", true]]); >map : Map >new Map([["", true]]) : Map >Map : MapConstructor ->[["", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true]] : ["", boolean][] +>["", true] : ["", boolean] +>"" : "" >true : boolean for ([k = "", v = false] of map) { ->[k = "", v = false] : (string | boolean)[] ->k = "" : string +>[k = "", v = false] : ("" | boolean)[] +>k = "" : "" >k : string ->"" : string +>"" : "" >v = false : boolean >v : boolean >false : boolean diff --git a/tests/baselines/reference/for-of50.types b/tests/baselines/reference/for-of50.types index 5d5dac7abed7a..9378a39690df8 100644 --- a/tests/baselines/reference/for-of50.types +++ b/tests/baselines/reference/for-of50.types @@ -3,9 +3,9 @@ var map = new Map([["", true]]); >map : Map >new Map([["", true]]) : Map >Map : MapConstructor ->[["", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true]] : ["", boolean][] +>["", true] : ["", boolean] +>"" : "" >true : boolean for (const [k, v] of map) { diff --git a/tests/baselines/reference/for-of9.types b/tests/baselines/reference/for-of9.types index bf06bf460344c..74f4180187d72 100644 --- a/tests/baselines/reference/for-of9.types +++ b/tests/baselines/reference/for-of9.types @@ -4,10 +4,10 @@ var v: string; for (v of ["hello"]) { } >v : string ->["hello"] : string[] ->"hello" : string +>["hello"] : "hello"[] +>"hello" : "hello" for (v of "hello") { } >v : string ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/forStatements.types b/tests/baselines/reference/forStatements.types index 95b198a7fec7a..46149e666bd7f 100644 --- a/tests/baselines/reference/forStatements.types +++ b/tests/baselines/reference/forStatements.types @@ -65,7 +65,7 @@ for(var aNumber: number = 9.9;;){} for(var aString: string = 'this is a string';;){} >aString : string ->'this is a string' : string +>'this is a string' : "this is a string" for(var aDate: Date = new Date(12);;){} >aDate : Date @@ -161,5 +161,5 @@ for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){} >F2 : (x: number) => string >(x) => 'this is a string' : (x: number) => string >x : number ->'this is a string' : string +>'this is a string' : "this is a string" diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.types b/tests/baselines/reference/forStatementsMultipleValidDecl.types index acb26f173120b..ca8e796d2b048 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.types +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.types @@ -20,7 +20,7 @@ function declSpace() { for (var x = 'this is a string'; ;) { } >x : string ->'this is a string' : string +>'this is a string' : "this is a string" } interface Point { x: number; y: number; } >Point : Point @@ -117,9 +117,9 @@ for (var a: string[]; ;) { } for (var a = ['a', 'b']; ;) { } >a : string[] ->['a', 'b'] : string[] ->'a' : string ->'b' : string +>['a', 'b'] : ("a" | "b")[] +>'a' : "a" +>'b' : "b" for (var a = []; ;) { } >a : string[] diff --git a/tests/baselines/reference/fromAsIdentifier2.types b/tests/baselines/reference/fromAsIdentifier2.types index ae605f79268cc..cea6974c946f2 100644 --- a/tests/baselines/reference/fromAsIdentifier2.types +++ b/tests/baselines/reference/fromAsIdentifier2.types @@ -1,6 +1,6 @@ === tests/cases/compiler/fromAsIdentifier2.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" var from; >from : any diff --git a/tests/baselines/reference/funcdecl.types b/tests/baselines/reference/funcdecl.types index 94c310d7b2511..47cc46c802620 100644 --- a/tests/baselines/reference/funcdecl.types +++ b/tests/baselines/reference/funcdecl.types @@ -3,7 +3,7 @@ function simpleFunc() { >simpleFunc : () => string return "this is my simple func"; ->"this is my simple func" : string +>"this is my simple func" : "this is my simple func" } var simpleFuncVar = simpleFunc; >simpleFuncVar : () => string @@ -20,7 +20,7 @@ function withReturn() : string{ >withReturn : () => string return "Hello"; ->"Hello" : string +>"Hello" : "Hello" } var withReturnVar = withReturn; >withReturnVar : () => string @@ -66,7 +66,7 @@ function withInitializedParams(a: string, b0, b = 30, c = "string value") { >b : number >30 : number >c : string ->"string value" : string +>"string value" : "string value" } var withInitializedParamsVar = withInitializedParams; >withInitializedParamsVar : (a: string, b0: any, b?: number, c?: string) => void @@ -76,7 +76,7 @@ function withOptionalInitializedParams(a: string, c: string = "hello string") { >withOptionalInitializedParams : (a: string, c?: string) => void >a : string >c : string ->"hello string" : string +>"hello string" : "hello string" } var withOptionalInitializedParamsVar = withOptionalInitializedParams; >withOptionalInitializedParamsVar : (a: string, c?: string) => void @@ -164,5 +164,5 @@ var f2 = () => { >() => { return "string";} : () => string return "string"; ->"string" : string +>"string" : "string" } diff --git a/tests/baselines/reference/functionAssignmentError.types b/tests/baselines/reference/functionAssignmentError.types index 6430aa10fc468..3223a7b40f84e 100644 --- a/tests/baselines/reference/functionAssignmentError.types +++ b/tests/baselines/reference/functionAssignmentError.types @@ -2,11 +2,11 @@ var func = function (){return "ONE";}; >func : () => string >function (){return "ONE";} : () => string ->"ONE" : string +>"ONE" : "ONE" func = function (){return "ONE";}; >func = function (){return "ONE";} : () => string >func : () => string >function (){return "ONE";} : () => string ->"ONE" : string +>"ONE" : "ONE" diff --git a/tests/baselines/reference/functionCall1.types b/tests/baselines/reference/functionCall1.types index 777fcd79f9135..9295a06982e32 100644 --- a/tests/baselines/reference/functionCall1.types +++ b/tests/baselines/reference/functionCall1.types @@ -1,7 +1,7 @@ === tests/cases/compiler/functionCall1.ts === function foo():any{return ""}; >foo : () => any ->"" : string +>"" : "" var x = foo(); >x : any diff --git a/tests/baselines/reference/functionCall4.types b/tests/baselines/reference/functionCall4.types index ea60c759a7dc4..41c406ef48332 100644 --- a/tests/baselines/reference/functionCall4.types +++ b/tests/baselines/reference/functionCall4.types @@ -1,7 +1,7 @@ === tests/cases/compiler/functionCall4.ts === function foo():any{return ""}; >foo : () => any ->"" : string +>"" : "" function bar():()=>any{return foo}; >bar : () => () => any diff --git a/tests/baselines/reference/functionExpressionContextualTyping1.types b/tests/baselines/reference/functionExpressionContextualTyping1.types index 61d16bf6a4fdd..7b9f8584a8d2c 100644 --- a/tests/baselines/reference/functionExpressionContextualTyping1.types +++ b/tests/baselines/reference/functionExpressionContextualTyping1.types @@ -95,7 +95,7 @@ b2 = (foo, bar) => { return "hello"; } >(foo, bar) => { return "hello"; } : (foo: number, bar: string) => string >foo : number >bar : string ->"hello" : string +>"hello" : "hello" var b3: (name: string, num: number, boo: boolean) => void; >b3 : (name: string, num: number, boo: boolean) => void @@ -117,15 +117,15 @@ var b4: (n: E) => string = (number = 1) => { return "hello"; }; >(number = 1) => { return "hello"; } : (number?: E) => string >number : E >1 : number ->"hello" : string +>"hello" : "hello" var b5: (n: {}) => string = (number = "string") => { return "hello"; }; >b5 : (n: {}) => string >n : {} >(number = "string") => { return "hello"; } : (number?: {}) => string >number : {} ->"string" : string ->"hello" : string +>"string" : "string" +>"hello" : "hello" // A contextual signature S is extracted from a function type T as follows: // Otherwise, no contextual signature can be extracted from T and S is undefined. diff --git a/tests/baselines/reference/functionOnlyHasThrow.types b/tests/baselines/reference/functionOnlyHasThrow.types index c4e8cce38a2e9..18011f10ada90 100644 --- a/tests/baselines/reference/functionOnlyHasThrow.types +++ b/tests/baselines/reference/functionOnlyHasThrow.types @@ -5,5 +5,5 @@ function clone():number { throw new Error("To be implemented"); >new Error("To be implemented") : Error >Error : ErrorConstructor ->"To be implemented" : string +>"To be implemented" : "To be implemented" } diff --git a/tests/baselines/reference/functionOverloads12.types b/tests/baselines/reference/functionOverloads12.types index 5db8ff68cd4d7..7e0fdc5b4b6ad 100644 --- a/tests/baselines/reference/functionOverloads12.types +++ b/tests/baselines/reference/functionOverloads12.types @@ -9,6 +9,6 @@ function foo():number; function foo():any { if (true) return ""; else return 0;} >foo : { (): string; (): number; } >true : boolean ->"" : string +>"" : "" >0 : number diff --git a/tests/baselines/reference/functionOverloads13.types b/tests/baselines/reference/functionOverloads13.types index f26067c7eb84e..2e77cf7364590 100644 --- a/tests/baselines/reference/functionOverloads13.types +++ b/tests/baselines/reference/functionOverloads13.types @@ -10,5 +10,5 @@ function foo(bar:number):number; function foo(bar?:number):any { return "" } >foo : { (bar: number): string; (bar: number): number; } >bar : number ->"" : string +>"" : "" diff --git a/tests/baselines/reference/functionOverloads15.types b/tests/baselines/reference/functionOverloads15.types index 8fe428e9a4084..86c9fc6a6653e 100644 --- a/tests/baselines/reference/functionOverloads15.types +++ b/tests/baselines/reference/functionOverloads15.types @@ -16,5 +16,5 @@ function foo(foo:{a:string; b?:number;}):any { return "" } >foo : { a: string; b?: number; } >a : string >b : number ->"" : string +>"" : "" diff --git a/tests/baselines/reference/functionOverloads16.types b/tests/baselines/reference/functionOverloads16.types index e6c6ceb57a678..1d7a4184de1af 100644 --- a/tests/baselines/reference/functionOverloads16.types +++ b/tests/baselines/reference/functionOverloads16.types @@ -14,5 +14,5 @@ function foo(foo:{a:string; b?:number;}):any { return "" } >foo : { a: string; b?: number; } >a : string >b : number ->"" : string +>"" : "" diff --git a/tests/baselines/reference/functionOverloads22.types b/tests/baselines/reference/functionOverloads22.types index 7557b1c049f4f..eb8e987458caf 100644 --- a/tests/baselines/reference/functionOverloads22.types +++ b/tests/baselines/reference/functionOverloads22.types @@ -15,8 +15,8 @@ function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } >bar : any >a : any >b : any ->[{a:""}] : { a: string; }[] ->{a:""} : { a: string; } ->a : string ->"" : string +>[{a:""}] : { a: ""; }[] +>{a:""} : { a: ""; } +>a : "" +>"" : "" diff --git a/tests/baselines/reference/functionOverloads25.types b/tests/baselines/reference/functionOverloads25.types index 5b5c3781e74c4..53539cbc12278 100644 --- a/tests/baselines/reference/functionOverloads25.types +++ b/tests/baselines/reference/functionOverloads25.types @@ -9,7 +9,7 @@ function foo(bar:string):number; function foo(bar?:any):any{ return '' }; >foo : { (): string; (bar: string): number; } >bar : any ->'' : string +>'' : "" var x = foo(); >x : string diff --git a/tests/baselines/reference/functionOverloads26.types b/tests/baselines/reference/functionOverloads26.types index 9345507b72ea7..19f11bcf3fc15 100644 --- a/tests/baselines/reference/functionOverloads26.types +++ b/tests/baselines/reference/functionOverloads26.types @@ -9,11 +9,11 @@ function foo(bar:string):number; function foo(bar?:any):any{ return '' } >foo : { (): string; (bar: string): number; } >bar : any ->'' : string +>'' : "" var x = foo('baz'); >x : number >foo('baz') : number >foo : { (): string; (bar: string): number; } ->'baz' : string +>'baz' : "baz" diff --git a/tests/baselines/reference/functionOverloads28.types b/tests/baselines/reference/functionOverloads28.types index ae4ab6c0664f3..96d126adf3e27 100644 --- a/tests/baselines/reference/functionOverloads28.types +++ b/tests/baselines/reference/functionOverloads28.types @@ -9,7 +9,7 @@ function foo(bar:string):number; function foo(bar?:any):any{ return '' } >foo : { (): string; (bar: string): number; } >bar : any ->'' : string +>'' : "" var t:any; var x = foo(t); >t : any diff --git a/tests/baselines/reference/functionOverloads30.types b/tests/baselines/reference/functionOverloads30.types index a97bc0bb74d41..fdbefa027ef1c 100644 --- a/tests/baselines/reference/functionOverloads30.types +++ b/tests/baselines/reference/functionOverloads30.types @@ -16,5 +16,5 @@ var x = foo('bar'); >x : string >foo('bar') : string >foo : { (bar: string): string; (bar: number): number; } ->'bar' : string +>'bar' : "bar" diff --git a/tests/baselines/reference/functionOverloads36.types b/tests/baselines/reference/functionOverloads36.types index c8c1f7cede8af..7e14d5b973078 100644 --- a/tests/baselines/reference/functionOverloads36.types +++ b/tests/baselines/reference/functionOverloads36.types @@ -19,7 +19,7 @@ var x = foo({a:'foo'}); >x : string >foo({a:'foo'}) : string >foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } ->{a:'foo'} : { a: string; } ->a : string ->'foo' : string +>{a:'foo'} : { a: "foo"; } +>a : "foo" +>'foo' : "foo" diff --git a/tests/baselines/reference/functionOverloads42.types b/tests/baselines/reference/functionOverloads42.types index 32e99d46aa12b..0c1567956bab5 100644 --- a/tests/baselines/reference/functionOverloads42.types +++ b/tests/baselines/reference/functionOverloads42.types @@ -19,8 +19,8 @@ var x = foo([{a:'s'}]); >x : number >foo([{a:'s'}]) : number >foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } ->[{a:'s'}] : { a: string; }[] ->{a:'s'} : { a: string; } ->a : string ->'s' : string +>[{a:'s'}] : { a: "s"; }[] +>{a:'s'} : { a: "s"; } +>a : "s" +>'s' : "s" diff --git a/tests/baselines/reference/functionOverloads43.types b/tests/baselines/reference/functionOverloads43.types index 7c0fa8eb8185b..a764868ae17a0 100644 --- a/tests/baselines/reference/functionOverloads43.types +++ b/tests/baselines/reference/functionOverloads43.types @@ -31,10 +31,10 @@ var x = foo([{a: "str"}]); >x : string >foo([{a: "str"}]) : string >foo : { (bar: { a: number; }[]): number; (bar: { a: string; }[]): string; } ->[{a: "str"}] : { a: string; }[] ->{a: "str"} : { a: string; } ->a : string ->"str" : string +>[{a: "str"}] : { a: "str"; }[] +>{a: "str"} : { a: "str"; } +>a : "str" +>"str" : "str" var y = foo([{a: 100}]); >y : number diff --git a/tests/baselines/reference/functionOverloads44.types b/tests/baselines/reference/functionOverloads44.types index 56cad09b47287..cf27904f87d35 100644 --- a/tests/baselines/reference/functionOverloads44.types +++ b/tests/baselines/reference/functionOverloads44.types @@ -63,10 +63,10 @@ var x1 = foo1([{a: "str"}]); >x1 : Animal >foo1([{a: "str"}]) : Animal >foo1 : { (bar: { a: number; }[]): Dog; (bar: { a: string; }[]): Animal; } ->[{a: "str"}] : { a: string; }[] ->{a: "str"} : { a: string; } ->a : string ->"str" : string +>[{a: "str"}] : { a: "str"; }[] +>{a: "str"} : { a: "str"; } +>a : "str" +>"str" : "str" var y1 = foo1([{a: 100}]); >y1 : Dog @@ -81,10 +81,10 @@ var x2 = foo2([{a: "str"}]); >x2 : Cat | Dog >foo2([{a: "str"}]) : Cat | Dog >foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Cat | Dog; } ->[{a: "str"}] : { a: string; }[] ->{a: "str"} : { a: string; } ->a : string ->"str" : string +>[{a: "str"}] : { a: "str"; }[] +>{a: "str"} : { a: "str"; } +>a : "str" +>"str" : "str" var y2 = foo2([{a: 100}]); >y2 : Cat diff --git a/tests/baselines/reference/functionOverloads45.types b/tests/baselines/reference/functionOverloads45.types index 257a615e3349d..6dbcefa0bb1af 100644 --- a/tests/baselines/reference/functionOverloads45.types +++ b/tests/baselines/reference/functionOverloads45.types @@ -63,10 +63,10 @@ var x1 = foo1([{a: "str"}]); >x1 : Dog >foo1([{a: "str"}]) : Dog >foo1 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } ->[{a: "str"}] : { a: string; }[] ->{a: "str"} : { a: string; } ->a : string ->"str" : string +>[{a: "str"}] : { a: "str"; }[] +>{a: "str"} : { a: "str"; } +>a : "str" +>"str" : "str" var y1 = foo1([{a: 100}]); >y1 : Cat @@ -81,10 +81,10 @@ var x2 = foo2([{a: "str"}]); >x2 : Dog >foo2([{a: "str"}]) : Dog >foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } ->[{a: "str"}] : { a: string; }[] ->{a: "str"} : { a: string; } ->a : string ->"str" : string +>[{a: "str"}] : { a: "str"; }[] +>{a: "str"} : { a: "str"; } +>a : "str" +>"str" : "str" var y2 = foo2([{a: 100}]); >y2 : Cat diff --git a/tests/baselines/reference/functionOverloads7.types b/tests/baselines/reference/functionOverloads7.types index 7160068126f92..5bbc25dd5e2f0 100644 --- a/tests/baselines/reference/functionOverloads7.types +++ b/tests/baselines/reference/functionOverloads7.types @@ -12,7 +12,7 @@ class foo { private bar(foo?: any){ return "foo" } >bar : { (): any; (foo: string): any; } >foo : any ->"foo" : string +>"foo" : "foo" public n() { >n : () => void @@ -31,7 +31,7 @@ class foo { >this.bar : { (): any; (foo: string): any; } >this : this >bar : { (): any; (foo: string): any; } ->"test" : string +>"test" : "test" } } diff --git a/tests/baselines/reference/functionOverloads8.types b/tests/baselines/reference/functionOverloads8.types index 4751533e2af8f..c6876cdbe8f2e 100644 --- a/tests/baselines/reference/functionOverloads8.types +++ b/tests/baselines/reference/functionOverloads8.types @@ -9,5 +9,5 @@ function foo(foo:string); function foo(foo?:any){ return '' } >foo : { (): any; (foo: string): any; } >foo : any ->'' : string +>'' : "" diff --git a/tests/baselines/reference/functionOverloads9.types b/tests/baselines/reference/functionOverloads9.types index 88586c32eb288..6b7e1992f9939 100644 --- a/tests/baselines/reference/functionOverloads9.types +++ b/tests/baselines/reference/functionOverloads9.types @@ -6,11 +6,11 @@ function foo(foo:string); function foo(foo?:string){ return '' }; >foo : (foo: string) => any >foo : string ->'' : string +>'' : "" var x = foo('foo'); >x : any >foo('foo') : any >foo : (foo: string) => any ->'foo' : string +>'foo' : "foo" diff --git a/tests/baselines/reference/functionReturn.types b/tests/baselines/reference/functionReturn.types index f9c0b36fbc23a..7b8f58de2a891 100644 --- a/tests/baselines/reference/functionReturn.types +++ b/tests/baselines/reference/functionReturn.types @@ -21,7 +21,7 @@ function f4(): string { >f4 : () => string return ''; ->'' : string +>'' : "" return; } @@ -29,7 +29,7 @@ function f5(): string { >f5 : () => string return ''; ->'' : string +>'' : "" return undefined; >undefined : undefined diff --git a/tests/baselines/reference/functionType.types b/tests/baselines/reference/functionType.types index e7ea7a47edfb2..f4c4a772ca5a5 100644 --- a/tests/baselines/reference/functionType.types +++ b/tests/baselines/reference/functionType.types @@ -7,7 +7,7 @@ salt.apply("hello", []); >salt.apply : (thisArg: any, argArray?: any) => any >salt : () => void >apply : (thisArg: any, argArray?: any) => any ->"hello" : string +>"hello" : "hello" >[] : undefined[] (new Function("return 5"))(); @@ -15,7 +15,7 @@ salt.apply("hello", []); >(new Function("return 5")) : Function >new Function("return 5") : Function >Function : FunctionConstructor ->"return 5" : string +>"return 5" : "return 5" diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements3.types b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements3.types index 4254c0d28a93d..6d10e3fe3964c 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements3.types +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements3.types @@ -2,10 +2,10 @@ function foo(a = "") { } >foo : (a?: string) => void >a : string ->"" : string +>"" : "" function bar(a = "") { >bar : (a?: string) => void >a : string ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/functionWithThrowButNoReturn1.types b/tests/baselines/reference/functionWithThrowButNoReturn1.types index c136d8a407602..462d5b9c88abd 100644 --- a/tests/baselines/reference/functionWithThrowButNoReturn1.types +++ b/tests/baselines/reference/functionWithThrowButNoReturn1.types @@ -5,7 +5,7 @@ function fn(): number { throw new Error('NYI'); >new Error('NYI') : Error >Error : ErrorConstructor ->'NYI' : string +>'NYI' : "NYI" var t; >t : any diff --git a/tests/baselines/reference/generatorTypeCheck12.types b/tests/baselines/reference/generatorTypeCheck12.types index 3dd3c20f18d66..ef5b3564e1811 100644 --- a/tests/baselines/reference/generatorTypeCheck12.types +++ b/tests/baselines/reference/generatorTypeCheck12.types @@ -4,5 +4,5 @@ function* g(): IterableIterator { >IterableIterator : IterableIterator return ""; ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/generatorTypeCheck13.types b/tests/baselines/reference/generatorTypeCheck13.types index d77b630ae720f..0425d9ea829a0 100644 --- a/tests/baselines/reference/generatorTypeCheck13.types +++ b/tests/baselines/reference/generatorTypeCheck13.types @@ -8,5 +8,5 @@ function* g(): IterableIterator { >0 : number return ""; ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/generatorTypeCheck14.types b/tests/baselines/reference/generatorTypeCheck14.types index db1b5bde19a1a..56a6db0600725 100644 --- a/tests/baselines/reference/generatorTypeCheck14.types +++ b/tests/baselines/reference/generatorTypeCheck14.types @@ -7,5 +7,5 @@ function* g() { >0 : number return ""; ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/generatorTypeCheck15.types b/tests/baselines/reference/generatorTypeCheck15.types index 4437d78572d9f..eb14208009a5a 100644 --- a/tests/baselines/reference/generatorTypeCheck15.types +++ b/tests/baselines/reference/generatorTypeCheck15.types @@ -3,5 +3,5 @@ function* g() { >g : () => IterableIterator return ""; ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/generatorTypeCheck33.types b/tests/baselines/reference/generatorTypeCheck33.types index f3b8af225d1c1..8f88c6f64b1fd 100644 --- a/tests/baselines/reference/generatorTypeCheck33.types +++ b/tests/baselines/reference/generatorTypeCheck33.types @@ -7,10 +7,10 @@ function* g() { >0 : number function* g2() { ->g2 : () => IterableIterator +>g2 : () => IterableIterator<""> yield ""; >yield "" : any ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/generatorTypeCheck34.types b/tests/baselines/reference/generatorTypeCheck34.types index 35063e988ebdb..1c474758e4e82 100644 --- a/tests/baselines/reference/generatorTypeCheck34.types +++ b/tests/baselines/reference/generatorTypeCheck34.types @@ -10,6 +10,6 @@ function* g() { >g2 : () => IterableIterator return ""; ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/generatorTypeCheck35.types b/tests/baselines/reference/generatorTypeCheck35.types index 0bfc22ab3f090..6213173371955 100644 --- a/tests/baselines/reference/generatorTypeCheck35.types +++ b/tests/baselines/reference/generatorTypeCheck35.types @@ -10,6 +10,6 @@ function* g() { >g2 : () => string return ""; ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/generatorTypeCheck45.types b/tests/baselines/reference/generatorTypeCheck45.types index 7ea442420d697..96895acde0fad 100644 --- a/tests/baselines/reference/generatorTypeCheck45.types +++ b/tests/baselines/reference/generatorTypeCheck45.types @@ -19,7 +19,7 @@ declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string >foo("", function* () { yield x => x.length }, p => undefined) : string >foo : (x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T) => T ->"" : string +>"" : "" >function* () { yield x => x.length } : () => IterableIterator<(x: string) => number> >yield x => x.length : any >x => x.length : (x: string) => number diff --git a/tests/baselines/reference/generatorTypeCheck46.types b/tests/baselines/reference/generatorTypeCheck46.types index daf0d67b6ecb6..c69ae0881dae6 100644 --- a/tests/baselines/reference/generatorTypeCheck46.types +++ b/tests/baselines/reference/generatorTypeCheck46.types @@ -19,7 +19,7 @@ declare function foo(x: T, fun: () => Iterable<(x: T) => U>, fun2: (y: U) foo("", function* () { >foo("", function* () { yield* { *[Symbol.iterator]() { yield x => x.length } }}, p => undefined) : string >foo : (x: T, fun: () => Iterable<(x: T) => U>, fun2: (y: U) => T) => T ->"" : string +>"" : "" >function* () { yield* { *[Symbol.iterator]() { yield x => x.length } }} : () => IterableIterator<(x: string) => number> yield* { diff --git a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types index 5c7500fb5ed94..5b8701b875550 100644 --- a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types +++ b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types @@ -49,11 +49,11 @@ _.all([true, 1, null, 'yes'], _.identity); >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean ->[true, 1, null, 'yes'] : (boolean | number | string)[] +>[true, 1, null, 'yes'] : (boolean | number | "yes")[] >true : boolean >1 : number >null : null ->'yes' : string +>'yes' : "yes" >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T diff --git a/tests/baselines/reference/genericArray1.types b/tests/baselines/reference/genericArray1.types index bf44c88f518c6..3a51a008457ac 100644 --- a/tests/baselines/reference/genericArray1.types +++ b/tests/baselines/reference/genericArray1.types @@ -15,10 +15,10 @@ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : number[] >["a", "b", "c"].map(x => x.length) : number[] >["a", "b", "c"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] ->["a", "b", "c"] : string[] ->"a" : string ->"b" : string ->"c" : string +>["a", "b", "c"] : ("a" | "b" | "c")[] +>"a" : "a" +>"b" : "b" +>"c" : "c" >map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >x => x.length : (x: string) => number >x : string diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.types b/tests/baselines/reference/genericBaseClassLiteralProperty2.types index d7d512165f018..8fdf3f1684280 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.types +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.types @@ -38,7 +38,7 @@ class DataView2 extends BaseCollection2 { >this._itemsByKey : { [key: string]: CollectionItem2; } >this : this >_itemsByKey : { [key: string]: CollectionItem2; } ->'dummy' : string +>'dummy' : "dummy" >item : CollectionItem2 } } diff --git a/tests/baselines/reference/genericCallTypeArgumentInference.types b/tests/baselines/reference/genericCallTypeArgumentInference.types index 0208ec74f1e77..a28223690f118 100644 --- a/tests/baselines/reference/genericCallTypeArgumentInference.types +++ b/tests/baselines/reference/genericCallTypeArgumentInference.types @@ -15,7 +15,7 @@ var r = foo(''); // string >r : string >foo('') : string >foo : (t: T) => T ->'' : string +>'' : "" function foo2(t: T, u: U) { >foo2 : (t: T, u: U) => U @@ -49,7 +49,7 @@ var r2 = foo2('', 1); // number >r2 : number >foo2('', 1) : number >foo2 : (t: T, u: U) => U ->'' : string +>'' : "" >1 : number var r3 = foo2b(1); // {} @@ -175,7 +175,7 @@ var c = new C('', 1); >c : C >new C('', 1) : C >C : typeof C ->'' : string +>'' : "" >1 : number var r4 = c.foo('', 1); // string @@ -184,7 +184,7 @@ var r4 = c.foo('', 1); // string >c.foo : (t: string, u: number) => string >c : C >foo : (t: string, u: number) => string ->'' : string +>'' : "" >1 : number var r5 = c.foo2('', 1); // number @@ -193,7 +193,7 @@ var r5 = c.foo2('', 1); // number >c.foo2 : (t: string, u: number) => number >c : C >foo2 : (t: string, u: number) => number ->'' : string +>'' : "" >1 : number var r6 = c.foo3(true, 1); // boolean @@ -211,7 +211,7 @@ var r7 = c.foo4('', true); // string >c.foo4 : (t: string, u: U) => string >c : C >foo4 : (t: string, u: U) => string ->'' : string +>'' : "" >true : boolean var r8 = c.foo5(true, 1); // boolean @@ -236,7 +236,7 @@ var r10 = c.foo7(''); // {} >c.foo7 : (u: U) => T >c : C >foo7 : (u: U) => T ->'' : string +>'' : "" var r11 = c.foo8(); // {} >r11 : {} @@ -331,7 +331,7 @@ var r4 = i.foo('', 1); // string >i.foo : (t: string, u: number) => string >i : I >foo : (t: string, u: number) => string ->'' : string +>'' : "" >1 : number var r5 = i.foo2('', 1); // number @@ -340,7 +340,7 @@ var r5 = i.foo2('', 1); // number >i.foo2 : (t: string, u: number) => number >i : I >foo2 : (t: string, u: number) => number ->'' : string +>'' : "" >1 : number var r6 = i.foo3(true, 1); // boolean @@ -358,7 +358,7 @@ var r7 = i.foo4('', true); // string >i.foo4 : (t: string, u: U) => string >i : I >foo4 : (t: string, u: U) => string ->'' : string +>'' : "" >true : boolean var r8 = i.foo5(true, 1); // boolean @@ -383,7 +383,7 @@ var r10 = i.foo7(''); // {} >i.foo7 : (u: U) => T >i : I >foo7 : (u: U) => T ->'' : string +>'' : "" var r11 = i.foo8(); // {} >r11 : {} diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.types b/tests/baselines/reference/genericCallWithArrayLiteralArgs.types index c8e8b41b5fdda..4ad1c5af03d08 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.types +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.types @@ -49,24 +49,24 @@ var r4 = foo([1, '']); // {}[] >r4 : (number | string)[] >foo([1, '']) : (number | string)[] >foo : (t: T) => T ->[1, ''] : (number | string)[] +>[1, ''] : (number | "")[] >1 : number ->'' : string +>'' : "" var r5 = foo([1, '']); // any[] >r5 : any[] >foo([1, '']) : any[] >foo : (t: T) => T ->[1, ''] : (number | string)[] +>[1, ''] : (number | "")[] >1 : number ->'' : string +>'' : "" var r6 = foo([1, '']); // Object[] >r6 : Object[] >foo([1, '']) : Object[] >foo : (t: T) => T >Object : Object ->[1, ''] : (number | string)[] +>[1, ''] : (number | "")[] >1 : number ->'' : string +>'' : "" diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types index e165932303395..775c509e66796 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types @@ -64,5 +64,5 @@ function other(arg: T) { >e : Object >r2['1'] : Object >r2 : { [x: string]: Object; [x: number]: T; } ->'1' : string +>'1' : "1" } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.types index bde72409edcd6..7a25ce7adc408 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.types @@ -73,7 +73,7 @@ function other3(arg: T) { >e : Object >r2['1'] : Object >r2 : { [x: string]: Object; [x: number]: T; } ->'1' : string +>'1' : "1" var u: U = r2[1]; // ok >u : U diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types index 196103f422b86..a0b6e89c70a6c 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types @@ -63,7 +63,7 @@ function other2(arg: T) { >Date : Date >r2['hm'] : T >r2 : { [x: string]: T; } ->'hm' : string +>'hm' : "hm" } function other3(arg: T) { @@ -91,7 +91,7 @@ function other3(arg: T) { >Date : Date >r2['hm'] : T >r2 : { [x: string]: T; } ->'hm' : string +>'hm' : "hm" // BUG 821629 //var u: U = r2['hm']; // ok diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types index dbdecbec3e4cd..fdcd32e33d1da 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types @@ -119,7 +119,7 @@ module GenericParameter { >T : T >x : T >T : T ->'' : string +>'' : "" var r11 = foo6((x: T, y?: T) => ''); // any => string (+1 overload) >r11 : { (x: any): string; (x: any, y?: any): string; } @@ -131,7 +131,7 @@ module GenericParameter { >T : T >y : T >T : T ->'' : string +>'' : "" function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { >foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } @@ -168,7 +168,7 @@ module GenericParameter { >T : T >x : T >T : T ->'' : string +>'' : "" var a: { (x: T): string; (x: number): T; } >a : { (x: T): string; (x: number): T; } diff --git a/tests/baselines/reference/genericInference1.types b/tests/baselines/reference/genericInference1.types index eeed8aa9f3ef1..1ac999077dff0 100644 --- a/tests/baselines/reference/genericInference1.types +++ b/tests/baselines/reference/genericInference1.types @@ -2,10 +2,10 @@ ['a', 'b', 'c'].map(x => x.length); >['a', 'b', 'c'].map(x => x.length) : number[] >['a', 'b', 'c'].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] ->['a', 'b', 'c'] : string[] ->'a' : string ->'b' : string ->'c' : string +>['a', 'b', 'c'] : ("a" | "b" | "c")[] +>'a' : "a" +>'b' : "b" +>'c' : "c" >map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >x => x.length : (x: string) => number >x : string diff --git a/tests/baselines/reference/genericInference2.types b/tests/baselines/reference/genericInference2.types index e5c7052b0db4c..4c61cc2ab2b89 100644 --- a/tests/baselines/reference/genericInference2.types +++ b/tests/baselines/reference/genericInference2.types @@ -41,7 +41,7 @@ >ko.observable : (value: T) => ko.Observable >ko : typeof ko >observable : (value: T) => ko.Observable ->"Bob" : string +>"Bob" : "Bob" age: ko.observable(37) >age : ko.Observable @@ -74,7 +74,7 @@ >o.name : ko.Observable >o : { name: ko.Observable; age: ko.Observable; } >name : ko.Observable ->"Robert" : string +>"Robert" : "Robert" var zz_v = o.name.N; // should be 'number' >zz_v : number diff --git a/tests/baselines/reference/genericMethodOverspecialization.types b/tests/baselines/reference/genericMethodOverspecialization.types index 0ad302da94e9e..afd0d09441897 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.types +++ b/tests/baselines/reference/genericMethodOverspecialization.types @@ -1,12 +1,12 @@ === tests/cases/compiler/genericMethodOverspecialization.ts === var names = ["list", "table1", "table2", "table3", "summary"]; >names : string[] ->["list", "table1", "table2", "table3", "summary"] : string[] ->"list" : string ->"table1" : string ->"table2" : string ->"table3" : string ->"summary" : string +>["list", "table1", "table2", "table3", "summary"] : ("list" | "table1" | "table2" | "table3" | "summary")[] +>"list" : "list" +>"table1" : "table1" +>"table2" : "table2" +>"table3" : "table3" +>"summary" : "summary" interface HTMLElement { >HTMLElement : HTMLElement diff --git a/tests/baselines/reference/genericReversingTypeParameters.types b/tests/baselines/reference/genericReversingTypeParameters.types index 524a2ebba0350..d934a685efe7b 100644 --- a/tests/baselines/reference/genericReversingTypeParameters.types +++ b/tests/baselines/reference/genericReversingTypeParameters.types @@ -36,7 +36,7 @@ var r1 = b.get(''); >b.get : (key: string) => number >b : BiMap >get : (key: string) => number ->'' : string +>'' : "" var i = b.inverse(); // used to get the type wrong here. >i : BiMap diff --git a/tests/baselines/reference/genericTypeAliases.types b/tests/baselines/reference/genericTypeAliases.types index b43e2610725a5..592bf6e1013e0 100644 --- a/tests/baselines/reference/genericTypeAliases.types +++ b/tests/baselines/reference/genericTypeAliases.types @@ -54,15 +54,15 @@ var ls: Lazy; >Lazy : T | (() => T) ls = "eager"; ->ls = "eager" : string +>ls = "eager" : "eager" >ls : string | (() => string) ->"eager" : string +>"eager" : "eager" ls = () => "lazy"; >ls = () => "lazy" : () => string >ls : string | (() => string) >() => "lazy" : () => string ->"lazy" : string +>"lazy" : "lazy" type Foo = T | { x: Foo }; >Foo : T | { x: T | any; } @@ -100,25 +100,25 @@ y = x; >x : string | { x: string | any; } x = "string"; ->x = "string" : string +>x = "string" : "string" >x : string | { x: string | any; } ->"string" : string +>"string" : "string" x = { x: "hello" }; ->x = { x: "hello" } : { x: string; } +>x = { x: "hello" } : { x: "hello"; } >x : string | { x: string | any; } ->{ x: "hello" } : { x: string; } ->x : string ->"hello" : string +>{ x: "hello" } : { x: "hello"; } +>x : "hello" +>"hello" : "hello" x = { x: { x: "world" } }; ->x = { x: { x: "world" } } : { x: { x: string; }; } +>x = { x: { x: "world" } } : { x: { x: "world"; }; } >x : string | { x: string | any; } ->{ x: { x: "world" } } : { x: { x: string; }; } ->x : { x: string; } ->{ x: "world" } : { x: string; } ->x : string ->"world" : string +>{ x: { x: "world" } } : { x: { x: "world"; }; } +>x : { x: "world"; } +>{ x: "world" } : { x: "world"; } +>x : "world" +>"world" : "world" var z: Foo; >z : number | { x: number | any; } @@ -154,9 +154,9 @@ var s: Strange; >Strange : string s = "hello"; ->s = "hello" : string +>s = "hello" : "hello" >s : string ->"hello" : string +>"hello" : "hello" interface Tuple { >Tuple : Tuple @@ -208,11 +208,11 @@ p.b = 2; >2 : number p.tag = "test"; ->p.tag = "test" : string +>p.tag = "test" : "test" >p.tag : string >p : TaggedPair >tag : string ->"test" : string +>"test" : "test" function f() { >f : () => A[] | { x: A[] | any; } diff --git a/tests/baselines/reference/genericTypeArgumentInference1.types b/tests/baselines/reference/genericTypeArgumentInference1.types index 405c328bc4573..8fe1b3d253ead 100644 --- a/tests/baselines/reference/genericTypeArgumentInference1.types +++ b/tests/baselines/reference/genericTypeArgumentInference1.types @@ -47,11 +47,11 @@ var r = _.all([true, 1, null, 'yes'], _.identity); >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T ->[true, 1, null, 'yes'] : (boolean | number | string)[] +>[true, 1, null, 'yes'] : (boolean | number | "yes")[] >true : boolean >1 : number >null : null ->'yes' : string +>'yes' : "yes" >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types index 337993dc2a69d..ea433014dacc9 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types @@ -31,5 +31,5 @@ var value: string = lazyArray.array()["test"]; // used to be an error >lazyArray.array : () => { [objectId: string]: string; } >lazyArray : LazyArray >array : () => { [objectId: string]: string; } ->"test" : string +>"test" : "test" diff --git a/tests/baselines/reference/getterSetterNonAccessor.types b/tests/baselines/reference/getterSetterNonAccessor.types index 48d9f9c85e0cb..61e3c39a1231f 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.types +++ b/tests/baselines/reference/getterSetterNonAccessor.types @@ -13,7 +13,7 @@ Object.defineProperty({}, "0", ({ >Object : ObjectConstructor >defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any >{} : {} ->"0" : string +>"0" : "0" >({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor >PropertyDescriptor : PropertyDescriptor >({ get: getFunc, set: setFunc, configurable: true }) : { get: () => any; set: (v: any) => void; configurable: boolean; } diff --git a/tests/baselines/reference/globalIsContextualKeyword.types b/tests/baselines/reference/globalIsContextualKeyword.types index d0bf624af6d4c..d1c7b0c873959 100644 --- a/tests/baselines/reference/globalIsContextualKeyword.types +++ b/tests/baselines/reference/globalIsContextualKeyword.types @@ -24,9 +24,9 @@ function foo(global: number) { let obj = { >obj : { global: string; } ->{ global: "123"} : { global: string; } +>{ global: "123"} : { global: "123"; } global: "123" ->global : string ->"123" : string +>global : "123" +>"123" : "123" } diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.types b/tests/baselines/reference/heterogeneousArrayLiterals.types index c760e5a566f3e..5bb03c54c9ccb 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.types +++ b/tests/baselines/reference/heterogeneousArrayLiterals.types @@ -3,9 +3,9 @@ var a = [1, '']; // {}[] >a : (number | string)[] ->[1, ''] : (number | string)[] +>[1, ''] : (number | "")[] >1 : number ->'' : string +>'' : "" var b = [1, null]; // number[] >b : number[] @@ -15,9 +15,9 @@ var b = [1, null]; // number[] var c = [1, '', null]; // {}[] >c : (number | string)[] ->[1, '', null] : (number | string)[] +>[1, '', null] : (number | "")[] >1 : number ->'' : string +>'' : "" >null : null var d = [{}, 1]; // {}[] @@ -41,35 +41,35 @@ var f = [[], [1]]; // number[][] var g = [[1], ['']]; // {}[] >g : (number[] | string[])[] ->[[1], ['']] : (number[] | string[])[] +>[[1], ['']] : (number[] | ""[])[] >[1] : number[] >1 : number ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[] >h : ({ foo: number; bar: string; } | { foo: number; })[] ->[{ foo: 1, bar: '' }, { foo: 2 }] : ({ foo: number; bar: string; } | { foo: number; })[] ->{ foo: 1, bar: '' } : { foo: number; bar: string; } +>[{ foo: 1, bar: '' }, { foo: 2 }] : ({ foo: number; bar: ""; } | { foo: number; })[] +>{ foo: 1, bar: '' } : { foo: number; bar: ""; } >foo : number >1 : number ->bar : string ->'' : string +>bar : "" +>'' : "" >{ foo: 2 } : { foo: number; } >foo : number >2 : number var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[] >i : ({ foo: number; bar: string; } | { foo: string; })[] ->[{ foo: 1, bar: '' }, { foo: '' }] : ({ foo: number; bar: string; } | { foo: string; })[] ->{ foo: 1, bar: '' } : { foo: number; bar: string; } +>[{ foo: 1, bar: '' }, { foo: '' }] : ({ foo: number; bar: ""; } | { foo: ""; })[] +>{ foo: 1, bar: '' } : { foo: number; bar: ""; } >foo : number >1 : number ->bar : string ->'' : string ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>bar : "" +>'' : "" +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" var j = [() => 1, () => '']; // {}[] >j : ((() => number) | (() => string))[] @@ -77,7 +77,7 @@ var j = [() => 1, () => '']; // {}[] >() => 1 : () => number >1 : number >() => '' : () => string ->'' : string +>'' : "" var k = [() => 1, () => 1]; // { (): number }[] >k : (() => number)[] @@ -101,7 +101,7 @@ var m = [() => 1, () => '', () => null]; // { (): any }[] >() => 1 : () => number >1 : number >() => '' : () => string ->'' : string +>'' : "" >() => null : () => any >null : null @@ -113,7 +113,7 @@ var n = [[() => 1], [() => '']]; // {}[] >1 : number >[() => ''] : (() => string)[] >() => '' : () => string ->'' : string +>'' : "" class Base { foo: string; } >Base : Base diff --git a/tests/baselines/reference/hidingCallSignatures.types b/tests/baselines/reference/hidingCallSignatures.types index c45cab69d8a66..87285361f9996 100644 --- a/tests/baselines/reference/hidingCallSignatures.types +++ b/tests/baselines/reference/hidingCallSignatures.types @@ -36,12 +36,12 @@ var d: D; d(""); // number >d("") : number >d : D ->"" : string +>"" : "" new d(""); // should be string >new d("") : string >d : D ->"" : string +>"" : "" var f: F; >f : F @@ -50,7 +50,7 @@ var f: F; f(""); // string >f("") : string >f : F ->"" : string +>"" : "" var e: E; >e : E @@ -59,5 +59,5 @@ var e: E; e(""); // {} >e("") : {} >e : E ->"" : string +>"" : "" diff --git a/tests/baselines/reference/hidingConstructSignatures.types b/tests/baselines/reference/hidingConstructSignatures.types index 0fd9860de25dc..7432732277fe6 100644 --- a/tests/baselines/reference/hidingConstructSignatures.types +++ b/tests/baselines/reference/hidingConstructSignatures.types @@ -36,12 +36,12 @@ var d: D; d(""); // string >d("") : string >d : D ->"" : string +>"" : "" new d(""); // should be number >new d("") : number >d : D ->"" : string +>"" : "" var f: F; >f : F @@ -50,7 +50,7 @@ var f: F; new f(""); // string >new f("") : string >f : F ->"" : string +>"" : "" var e: E; >e : E @@ -59,5 +59,5 @@ var e: E; new e(""); // {} >new e("") : {} >e : E ->"" : string +>"" : "" diff --git a/tests/baselines/reference/hidingIndexSignatures.types b/tests/baselines/reference/hidingIndexSignatures.types index 9a6346ace7bbe..a6609aa75c89a 100644 --- a/tests/baselines/reference/hidingIndexSignatures.types +++ b/tests/baselines/reference/hidingIndexSignatures.types @@ -21,7 +21,7 @@ var b: B; b[""]; // Should be number >b[""] : number >b : B ->"" : string +>"" : "" var a: A; >a : A @@ -30,5 +30,5 @@ var a: A; a[""]; // Should be {} >a[""] : {} >a : A ->"" : string +>"" : "" diff --git a/tests/baselines/reference/ifDoWhileStatements.types b/tests/baselines/reference/ifDoWhileStatements.types index 660eaa4fb634b..e2efa45cbf53d 100644 --- a/tests/baselines/reference/ifDoWhileStatements.types +++ b/tests/baselines/reference/ifDoWhileStatements.types @@ -134,22 +134,22 @@ do { }while(0.0) >0.0 : number if ('a string') { } ->'a string' : string +>'a string' : "a string" while ('a string') { } ->'a string' : string +>'a string' : "a string" do { }while('a string') ->'a string' : string +>'a string' : "a string" if ('') { } ->'' : string +>'' : "" while ('') { } ->'' : string +>'' : "" do { }while('') ->'' : string +>'' : "" if (/[a-z]/) { } >/[a-z]/ : RegExp @@ -194,25 +194,25 @@ do { }while({}) >{} : {} if ({ x: 1, y: 'a' }) { } ->{ x: 1, y: 'a' } : { x: number; y: string; } +>{ x: 1, y: 'a' } : { x: number; y: "a"; } >x : number >1 : number ->y : string ->'a' : string +>y : "a" +>'a' : "a" while ({ x: 1, y: 'a' }) { } ->{ x: 1, y: 'a' } : { x: number; y: string; } +>{ x: 1, y: 'a' } : { x: number; y: "a"; } >x : number >1 : number ->y : string ->'a' : string +>y : "a" +>'a' : "a" do { }while({ x: 1, y: 'a' }) ->{ x: 1, y: 'a' } : { x: number; y: string; } +>{ x: 1, y: 'a' } : { x: number; y: "a"; } >x : number >1 : number ->y : string ->'a' : string +>y : "a" +>'a' : "a" if (() => 43) { } >() => 43 : () => number @@ -308,7 +308,7 @@ do { }while(d) var e = 'a string'; >e : string ->'a string' : string +>'a string' : "a string" if (e) { } >e : string @@ -321,7 +321,7 @@ do { }while(e) var f = ''; >f : string ->'' : string +>'' : "" if (f) { } >f : string @@ -388,11 +388,11 @@ do { }while(j) var k = { x: 1, y: 'a' }; >k : { x: number; y: string; } ->{ x: 1, y: 'a' } : { x: number; y: string; } +>{ x: 1, y: 'a' } : { x: number; y: "a"; } >x : number >1 : number ->y : string ->'a' : string +>y : "a" +>'a' : "a" if (k) { } >k : { x: number; y: string; } diff --git a/tests/baselines/reference/implicitAnyAnyReturningFunction.types b/tests/baselines/reference/implicitAnyAnyReturningFunction.types index 66f9cf49cb03e..73b90b76a0b11 100644 --- a/tests/baselines/reference/implicitAnyAnyReturningFunction.types +++ b/tests/baselines/reference/implicitAnyAnyReturningFunction.types @@ -4,7 +4,7 @@ function A() { return ""; >"" : any ->"" : string +>"" : "" } function B() { @@ -26,7 +26,7 @@ class C { return ""; >"" : any ->"" : string +>"" : "" } public B() { diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict2.types b/tests/baselines/reference/importAndVariableDeclarationConflict2.types index eafc7be6deb50..4b6e9acec06f9 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict2.types +++ b/tests/baselines/reference/importAndVariableDeclarationConflict2.types @@ -4,7 +4,7 @@ module m { export var m = ''; >m : string ->'' : string +>'' : "" } import x = m.m; @@ -20,6 +20,6 @@ class C { var x = ''; >x : string ->'' : string +>'' : "" } } diff --git a/tests/baselines/reference/import_reference-exported-alias.types b/tests/baselines/reference/import_reference-exported-alias.types index 3f9c34f62dcf8..2f2496a7b772b 100644 --- a/tests/baselines/reference/import_reference-exported-alias.types +++ b/tests/baselines/reference/import_reference-exported-alias.types @@ -34,7 +34,7 @@ module App { >getUserName : () => string return "Bill Gates"; ->"Bill Gates" : string +>"Bill Gates" : "Bill Gates" } } } diff --git a/tests/baselines/reference/import_reference-to-type-alias.types b/tests/baselines/reference/import_reference-to-type-alias.types index 53c7dabcd5f32..e2327650f1abb 100644 --- a/tests/baselines/reference/import_reference-to-type-alias.types +++ b/tests/baselines/reference/import_reference-to-type-alias.types @@ -32,7 +32,7 @@ export module App { >getUserName : () => string return "Bill Gates"; ->"Bill Gates" : string +>"Bill Gates" : "Bill Gates" } } } diff --git a/tests/baselines/reference/inOperatorWithFunction.types b/tests/baselines/reference/inOperatorWithFunction.types index e85a86632c7c4..73c08c6932085 100644 --- a/tests/baselines/reference/inOperatorWithFunction.types +++ b/tests/baselines/reference/inOperatorWithFunction.types @@ -9,7 +9,7 @@ fn("a" in { "a": true }); >fn("a" in { "a": true }) : boolean >fn : (val: boolean) => boolean >"a" in { "a": true } : boolean ->"a" : string +>"a" : "a" >{ "a": true } : { "a": boolean; } >true : boolean diff --git a/tests/baselines/reference/inOperatorWithValidOperands.types b/tests/baselines/reference/inOperatorWithValidOperands.types index 0cca583e683c1..6e00a5344479f 100644 --- a/tests/baselines/reference/inOperatorWithValidOperands.types +++ b/tests/baselines/reference/inOperatorWithValidOperands.types @@ -31,7 +31,7 @@ var ra3 = a2 in x; var ra4 = '' in x; >ra4 : boolean >'' in x : boolean ->'' : string +>'' : "" >x : any var ra5 = 0 in x; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherType.types b/tests/baselines/reference/incrementOperatorWithAnyOtherType.types index 3643b646acead..66946c5f59039 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherType.types @@ -9,9 +9,9 @@ var ANY1; var ANY2: any[] = ["", ""]; >ANY2 : any[] ->["", ""] : string[] ->"" : string ->"" : string +>["", ""] : ""[] +>"" : "" +>"" : "" var obj = {x:1,y:null}; >obj : { x: number; y: any; } diff --git a/tests/baselines/reference/indexer.types b/tests/baselines/reference/indexer.types index a0142bb93830e..0f99e29313ee9 100644 --- a/tests/baselines/reference/indexer.types +++ b/tests/baselines/reference/indexer.types @@ -17,13 +17,13 @@ interface JQuery { var jq:JQuery={ 0: { id : "a" }, 1: { id : "b" } }; >jq : JQuery >JQuery : JQuery ->{ 0: { id : "a" }, 1: { id : "b" } } : { [x: number]: { id: string; }; 0: { id: string; }; 1: { id: string; }; } ->{ id : "a" } : { id: string; } ->id : string ->"a" : string ->{ id : "b" } : { id: string; } ->id : string ->"b" : string +>{ 0: { id : "a" }, 1: { id : "b" } } : { [x: number]: { id: "a"; } | { id: "b"; }; 0: { id: "a"; }; 1: { id: "b"; }; } +>{ id : "a" } : { id: "a"; } +>id : "a" +>"a" : "a" +>{ id : "b" } : { id: "b"; } +>id : "b" +>"b" : "b" jq[0].id; >jq[0].id : string diff --git a/tests/baselines/reference/indexer3.types b/tests/baselines/reference/indexer3.types index 8f0582f782ae8..fb43cae8cb4fa 100644 --- a/tests/baselines/reference/indexer3.types +++ b/tests/baselines/reference/indexer3.types @@ -10,5 +10,5 @@ var r: Date = dateMap["hello"] // result type includes indexer using BCT >Date : Date >dateMap["hello"] : Date >dateMap : { [x: string]: Date; } ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/indexerA.types b/tests/baselines/reference/indexerA.types index c6ff81b3a26ad..78da157e3e04e 100644 --- a/tests/baselines/reference/indexerA.types +++ b/tests/baselines/reference/indexerA.types @@ -17,13 +17,13 @@ class JQuery { var jq:JQuery={ 0: { id : "a" }, 1: { id : "b" } }; >jq : JQuery >JQuery : JQuery ->{ 0: { id : "a" }, 1: { id : "b" } } : { [x: number]: { id: string; }; 0: { id: string; }; 1: { id: string; }; } ->{ id : "a" } : { id: string; } ->id : string ->"a" : string ->{ id : "b" } : { id: string; } ->id : string ->"b" : string +>{ 0: { id : "a" }, 1: { id : "b" } } : { [x: number]: { id: "a"; } | { id: "b"; }; 0: { id: "a"; }; 1: { id: "b"; }; } +>{ id : "a" } : { id: "a"; } +>id : "a" +>"a" : "a" +>{ id : "b" } : { id: "b"; } +>id : "b" +>"b" : "b" jq[0].id; >jq[0].id : string diff --git a/tests/baselines/reference/indexerWithTuple.types b/tests/baselines/reference/indexerWithTuple.types index 7605fba051866..fcec4b39b96ab 100644 --- a/tests/baselines/reference/indexerWithTuple.types +++ b/tests/baselines/reference/indexerWithTuple.types @@ -1,29 +1,29 @@ === tests/cases/conformance/types/tuple/indexerWithTuple.ts === var strNumTuple: [string, number] = ["foo", 10]; >strNumTuple : [string, number] ->["foo", 10] : [string, number] ->"foo" : string +>["foo", 10] : ["foo", number] +>"foo" : "foo" >10 : number var numTupleTuple: [number, [string, number]] = [10, ["bar", 20]]; >numTupleTuple : [number, [string, number]] ->[10, ["bar", 20]] : [number, [string, number]] +>[10, ["bar", 20]] : [number, ["bar", number]] >10 : number ->["bar", 20] : [string, number] ->"bar" : string +>["bar", 20] : ["bar", number] +>"bar" : "bar" >20 : number var unionTuple1: [number, string| number] = [10, "foo"]; >unionTuple1 : [number, string | number] ->[10, "foo"] : [number, string] +>[10, "foo"] : [number, "foo"] >10 : number ->"foo" : string +>"foo" : "foo" var unionTuple2: [boolean, string| number] = [true, "foo"]; >unionTuple2 : [boolean, string | number] ->[true, "foo"] : [boolean, string] +>[true, "foo"] : [boolean, "foo"] >true : boolean ->"foo" : string +>"foo" : "foo" // no error var idx0 = 0; @@ -68,13 +68,13 @@ var ele15 = strNumTuple["0"]; // string >ele15 : string >strNumTuple["0"] : string >strNumTuple : [string, number] ->"0" : string +>"0" : "0" var ele16 = strNumTuple["1"]; // number >ele16 : number >strNumTuple["1"] : number >strNumTuple : [string, number] ->"1" : string +>"1" : "1" var strNumTuple1 = numTupleTuple[1]; //[string, number]; >strNumTuple1 : [string, number] @@ -122,13 +122,13 @@ var eleUnion15 = unionTuple1["0"]; // number >eleUnion15 : number >unionTuple1["0"] : number >unionTuple1 : [number, string | number] ->"0" : string +>"0" : "0" var eleUnion16 = unionTuple1["1"]; // string | number >eleUnion16 : string | number >unionTuple1["1"] : string | number >unionTuple1 : [number, string | number] ->"1" : string +>"1" : "1" var eleUnion20 = unionTuple2[0]; // boolean >eleUnion20 : boolean @@ -164,11 +164,11 @@ var eleUnion25 = unionTuple2["0"]; // boolean >eleUnion25 : boolean >unionTuple2["0"] : boolean >unionTuple2 : [boolean, string | number] ->"0" : string +>"0" : "0" var eleUnion26 = unionTuple2["1"]; // string | number >eleUnion26 : string | number >unionTuple2["1"] : string | number >unionTuple2 : [boolean, string | number] ->"1" : string +>"1" : "1" diff --git a/tests/baselines/reference/inferSecondaryParameter.types b/tests/baselines/reference/inferSecondaryParameter.types index 34dbb14ea6668..c4d827bb3c5e8 100644 --- a/tests/baselines/reference/inferSecondaryParameter.types +++ b/tests/baselines/reference/inferSecondaryParameter.types @@ -23,7 +23,7 @@ b.m("test", function (bug) { >b.m : (test: string, fn: Function) => any >b : Ib >m : (test: string, fn: Function) => any ->"test" : string +>"test" : "test" >function (bug) { var a: number = bug;} : (bug: any) => void >bug : any diff --git a/tests/baselines/reference/inferenceFromParameterlessLambda.types b/tests/baselines/reference/inferenceFromParameterlessLambda.types index 57747d881f646..1adf508226ba0 100644 --- a/tests/baselines/reference/inferenceFromParameterlessLambda.types +++ b/tests/baselines/reference/inferenceFromParameterlessLambda.types @@ -34,5 +34,5 @@ foo(n => n.length, () => 'hi'); >n : string >length : number >() => 'hi' : () => string ->'hi' : string +>'hi' : "hi" diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.types b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.types index da2fa24060f7f..9365013f050e0 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.types +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.types @@ -29,7 +29,7 @@ declare function foo(x: T, y: Int, z: Int): T; foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); >foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }) : string >foo : (x: T, y: Int, z: Int) => T ->"" : string +>"" : "" >{ method(p1) { return p1.length } } : { method(p1: string): number; } >method : (p1: string) => number >p1 : string diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.types b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.types index be937410cef0f..84b7c424c92e3 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.types +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.types @@ -29,7 +29,7 @@ declare function foo(x: T, y: Int, z: Int): T; foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); >foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }) : string >foo : (x: T, y: Int, z: Int) => T ->"" : string +>"" : "" >{ method(p1) { return p1.length } } : { [x: string]: (p1: string) => number; method(p1: string): number; } >method : (p1: string) => number >p1 : string diff --git a/tests/baselines/reference/inferentialTypingUsingApparentType3.types b/tests/baselines/reference/inferentialTypingUsingApparentType3.types index 9e0a4ceaea6de..8b4748b2084f9 100644 --- a/tests/baselines/reference/inferentialTypingUsingApparentType3.types +++ b/tests/baselines/reference/inferentialTypingUsingApparentType3.types @@ -19,7 +19,7 @@ class CharField implements Field { >input : string return "Yup"; ->"Yup" : string +>"Yup" : "Yup" } } diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType.types b/tests/baselines/reference/inferentialTypingWithFunctionType.types index 460156c91ead6..0360adefd7c5b 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType.types @@ -22,6 +22,6 @@ var s = map("", identity); >s : string >map("", identity) : string >map : (x: T, f: (s: T) => U) => U ->"" : string +>"" : "" >identity : (y: V) => V diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types index a83379b4c7317..86219faf53717 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types @@ -23,7 +23,7 @@ var s = map("", () => { return { x: identity }; }); >s : string >map("", () => { return { x: identity }; }) : string >map : (x: T, f: () => { x: (s: T) => U; }) => U ->"" : string +>"" : "" >() => { return { x: identity }; } : () => { x: (y: string) => string; } >{ x: identity } : { x: (y: V) => V; } >x : (y: V) => V diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types index 5a4decef4dc4e..cb7904b80603e 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types @@ -33,7 +33,7 @@ s = map("", dottedIdentity.x); >s : string >map("", dottedIdentity.x) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >dottedIdentity.x : (y: V) => V >dottedIdentity : { x: (y: V) => V; } >x : (y: V) => V @@ -44,10 +44,10 @@ s = map("", dottedIdentity['x']); >s : string >map("", dottedIdentity['x']) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >dottedIdentity['x'] : (y: V) => V >dottedIdentity : { x: (y: V) => V; } ->'x' : string +>'x' : "x" // function call s = map("", (() => identity)()); @@ -55,7 +55,7 @@ s = map("", (() => identity)()); >s : string >map("", (() => identity)()) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >(() => identity)() : (y: V) => V >(() => identity) : () => (y: V) => V >() => identity : () => (y: V) => V @@ -77,7 +77,7 @@ s = map("", new ic()); >s : string >map("", new ic()) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >new ic() : (y: V) => V >ic : IdentityConstructor @@ -90,7 +90,7 @@ s = map("", t = identity); >s : string >map("", t = identity) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >t = identity : (y: V) => V >t : any >identity : (y: V) => V @@ -101,7 +101,7 @@ s = map("", identity); >s : string >map("", identity) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >identity : (y: V) => V >identity : (y: V) => V >identity : (y: V) => V @@ -112,7 +112,7 @@ s = map("", (identity)); >s : string >map("", (identity)) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >(identity) : (y: V) => V >identity : (y: V) => V @@ -122,9 +122,9 @@ s = map("", ("", identity)); >s : string >map("", ("", identity)) : string >map : (array: T, func: (x: T) => U) => U ->"" : string +>"" : "" >("", identity) : (y: V) => V >"", identity : (y: V) => V ->"" : string +>"" : "" >identity : (y: V) => V diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types index cc9d8790bd4b5..4ca2d9a5e6423 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types @@ -36,9 +36,9 @@ var result = zipWith([1, 2], ['a', 'b'], pair); >[1, 2] : number[] >1 : number >2 : number ->['a', 'b'] : string[] ->'a' : string ->'b' : string +>['a', 'b'] : ("a" | "b")[] +>'a' : "a" +>'b' : "b" >pair : (x: T) => (y: S) => { x: T; y: S; } var i = result[0].x; // number diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.types b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.types index 3f170d1a6ece6..444c9b7706986 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.types +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.types @@ -6,7 +6,7 @@ class a { >x : () => string return "10"; ->"10" : string +>"10" : "10" } } @@ -18,6 +18,6 @@ class b extends a { >x : () => string return "20"; ->"20" : string +>"20" : "20" } } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.types b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.types index 22fa0a6660f14..5a1320cd66609 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.types +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.types @@ -6,7 +6,7 @@ class a { >x : () => string return "10"; ->"10" : string +>"10" : "10" } } @@ -18,6 +18,6 @@ class b extends a { >x : () => string return "20"; ->"20" : string +>"20" : "20" } } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.types b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.types index a7df20382ec42..3b6741770a459 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.types +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.types @@ -14,6 +14,6 @@ class b extends a { >x : () => string return "20"; ->"20" : string +>"20" : "20" } } diff --git a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types index 563cb58a755e0..ad8f6c2d6ae22 100644 --- a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types +++ b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types @@ -118,7 +118,7 @@ var x5: void = c('A0'); >x5 : void >c('A0') : void >c : C ->'A0' : string +>'A0' : "A0" var x6: number[] = c('C1'); >x6 : number[] @@ -142,5 +142,5 @@ var x9: void = c('generic'); >x9 : void >c('generic') : void >c : C ->'generic' : string +>'generic' : "generic" diff --git a/tests/baselines/reference/interfaceContextualType.types b/tests/baselines/reference/interfaceContextualType.types index e827f9a9d9b1e..61ed7c0d47824 100644 --- a/tests/baselines/reference/interfaceContextualType.types +++ b/tests/baselines/reference/interfaceContextualType.types @@ -39,7 +39,7 @@ class Bug { >this.values : IMap >this : this >values : IMap ->'comments' : string +>'comments' : "comments" >{ italic: true } : { italic: boolean; } >italic : boolean >true : boolean diff --git a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types index 7b5d60a526137..34c7fcfb04909 100644 --- a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types +++ b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types @@ -7,22 +7,22 @@ if (typeof x !== "string") { >typeof x !== "string" : boolean >typeof x : string >x : string | StringTreeArray ->"string" : string +>"string" : "string" x.push(""); >x.push("") : number >x.push : (...items: (string | StringTreeArray)[]) => number >x : StringTreeArray >push : (...items: (string | StringTreeArray)[]) => number ->"" : string +>"" : "" x.push([""]); >x.push([""]) : number >x.push : (...items: (string | StringTreeArray)[]) => number >x : StringTreeArray >push : (...items: (string | StringTreeArray)[]) => number ->[""] : string[] ->"" : string +>[""] : ""[] +>"" : "" } type StringTree = string | StringTreeArray; diff --git a/tests/baselines/reference/interfaceSubtyping.types b/tests/baselines/reference/interfaceSubtyping.types index 26a900a56b27a..07c0d6446b501 100644 --- a/tests/baselines/reference/interfaceSubtyping.types +++ b/tests/baselines/reference/interfaceSubtyping.types @@ -14,6 +14,6 @@ class Camera implements iface{ } foo() { return "s"; } >foo : () => string ->"s" : string +>"s" : "s" } diff --git a/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.types b/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.types index 1110992fd5251..755514680d296 100644 --- a/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.types +++ b/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.types @@ -25,7 +25,7 @@ var r2 = f(''); >r2 : number >f('') : number >f : Foo ->'' : string +>'' : "" var r3 = new f(); >r3 : any @@ -36,5 +36,5 @@ var r4 = new f(''); >r4 : Object >new f('') : Object >f : Foo ->'' : string +>'' : "" diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types index 7428ee73aa126..72a1854a98760 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types @@ -80,15 +80,15 @@ interface Foo { var a: Foo = { >a : Foo >Foo : Foo ->{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: boolean; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E; } +>{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: ""; c: boolean; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E; } a: 1, >a : number >1 : number b: '', ->b : string ->'' : string +>b : "" +>'' : "" c: true, >c : boolean diff --git a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types index 5288d9f15a434..b6c658e10dcf2 100644 --- a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types +++ b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types @@ -30,7 +30,7 @@ var r2 = f('A'); >r2 : any >f('A') : any >f : Foo ->'A' : string +>'A' : "A" var r3 = new f('a'); >r3 : any @@ -42,5 +42,5 @@ var r4 = new f('A'); >r4 : Object >new f('A') : Object >f : Foo ->'A' : string +>'A' : "A" diff --git a/tests/baselines/reference/intersectionTypeMembers.types b/tests/baselines/reference/intersectionTypeMembers.types index a97a54c7a8138..5cffc87caa581 100644 --- a/tests/baselines/reference/intersectionTypeMembers.types +++ b/tests/baselines/reference/intersectionTypeMembers.types @@ -21,25 +21,25 @@ var abc: A & B & C; >C : C abc.a = "hello"; ->abc.a = "hello" : string +>abc.a = "hello" : "hello" >abc.a : string >abc : A & B & C >a : string ->"hello" : string +>"hello" : "hello" abc.b = "hello"; ->abc.b = "hello" : string +>abc.b = "hello" : "hello" >abc.b : string >abc : A & B & C >b : string ->"hello" : string +>"hello" : "hello" abc.c = "hello"; ->abc.c = "hello" : string +>abc.c = "hello" : "hello" >abc.c : string >abc : A & B & C >c : string ->"hello" : string +>"hello" : "hello" interface X { x: A } >X : X @@ -63,31 +63,31 @@ var xyz: X & Y & Z; >Z : Z xyz.x.a = "hello"; ->xyz.x.a = "hello" : string +>xyz.x.a = "hello" : "hello" >xyz.x.a : string >xyz.x : A & B & C >xyz : X & Y & Z >x : A & B & C >a : string ->"hello" : string +>"hello" : "hello" xyz.x.b = "hello"; ->xyz.x.b = "hello" : string +>xyz.x.b = "hello" : "hello" >xyz.x.b : string >xyz.x : A & B & C >xyz : X & Y & Z >x : A & B & C >b : string ->"hello" : string +>"hello" : "hello" xyz.x.c = "hello"; ->xyz.x.c = "hello" : string +>xyz.x.c = "hello" : "hello" >xyz.x.c : string >xyz.x : A & B & C >xyz : X & Y & Z >x : A & B & C >c : string ->"hello" : string +>"hello" : "hello" type F1 = (x: string) => string; >F1 : (x: string) => string @@ -106,7 +106,7 @@ var s = f("hello"); >s : string >f("hello") : string >f : ((x: string) => string) & ((x: number) => number) ->"hello" : string +>"hello" : "hello" var n = f(42); >n : number diff --git a/tests/baselines/reference/intersectionTypeOverloading.types b/tests/baselines/reference/intersectionTypeOverloading.types index c478b6a08cb74..61f135923a054 100644 --- a/tests/baselines/reference/intersectionTypeOverloading.types +++ b/tests/baselines/reference/intersectionTypeOverloading.types @@ -24,7 +24,7 @@ var x = fg("abc"); >x : string >fg("abc") : string >fg : ((s: string) => string) & ((x: any) => any) ->"abc" : string +>"abc" : "abc" var x: string; >x : string @@ -33,7 +33,7 @@ var y = gf("abc"); >y : any >gf("abc") : any >gf : ((x: any) => any) & ((s: string) => string) ->"abc" : string +>"abc" : "abc" var y: any; >y : any diff --git a/tests/baselines/reference/invalidUndefinedValues.types b/tests/baselines/reference/invalidUndefinedValues.types index b88c202161874..d2a60f95ccb54 100644 --- a/tests/baselines/reference/invalidUndefinedValues.types +++ b/tests/baselines/reference/invalidUndefinedValues.types @@ -9,9 +9,9 @@ x = 1; >1 : number x = ''; ->x = '' : string +>x = '' : "" >x : any ->'' : string +>'' : "" x = true; >x = true : boolean diff --git a/tests/baselines/reference/ipromise4.types b/tests/baselines/reference/ipromise4.types index b12c47c7ed5b6..32461326c564f 100644 --- a/tests/baselines/reference/ipromise4.types +++ b/tests/baselines/reference/ipromise4.types @@ -116,7 +116,7 @@ p.then(function (x) { return "hello"; } ).then(function (x) { return x } ); // s >then : { (success?: (value: number) => Windows.Foundation.IPromise, error?: (error: any) => Windows.Foundation.IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: number) => Windows.Foundation.IPromise, error?: (error: any) => U, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: number) => U, error?: (error: any) => Windows.Foundation.IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Windows.Foundation.IPromise; } >function (x) { return "hello"; } : (x: number) => string >x : number ->"hello" : string +>"hello" : "hello" >then : { (success?: (value: string) => Windows.Foundation.IPromise, error?: (error: any) => Windows.Foundation.IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: string) => Windows.Foundation.IPromise, error?: (error: any) => U, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: string) => U, error?: (error: any) => Windows.Foundation.IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Windows.Foundation.IPromise; } >function (x) { return x } : (x: string) => string >x : string diff --git a/tests/baselines/reference/iterableArrayPattern30.types b/tests/baselines/reference/iterableArrayPattern30.types index d27db2e7544b7..58edb6ba6de51 100644 --- a/tests/baselines/reference/iterableArrayPattern30.types +++ b/tests/baselines/reference/iterableArrayPattern30.types @@ -6,11 +6,11 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) >v2 : boolean >new Map([["", true], ["hello", true]]) : Map >Map : MapConstructor ->[["", true], ["hello", true]] : [string, boolean][] ->["", true] : [string, boolean] ->"" : string +>[["", true], ["hello", true]] : (["", boolean] | ["hello", boolean])[] +>["", true] : ["", boolean] +>"" : "" >true : boolean ->["hello", true] : [string, boolean] ->"hello" : string +>["hello", true] : ["hello", boolean] +>"hello" : "hello" >true : boolean diff --git a/tests/baselines/reference/iteratorSpreadInCall12.types b/tests/baselines/reference/iteratorSpreadInCall12.types index 5e3e7bcdbc425..b540c9a67d770 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.types +++ b/tests/baselines/reference/iteratorSpreadInCall12.types @@ -60,11 +60,11 @@ class StringIterator { >next : () => { value: string; done: boolean; } return { ->{ value: "", done: false } : { value: string; done: boolean; } +>{ value: "", done: false } : { value: ""; done: boolean; } value: "", ->value : string ->"" : string +>value : "" +>"" : "" done: false >done : boolean diff --git a/tests/baselines/reference/iteratorSpreadInCall5.types b/tests/baselines/reference/iteratorSpreadInCall5.types index 043536ab4c0ea..b5f07a894abe9 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.types +++ b/tests/baselines/reference/iteratorSpreadInCall5.types @@ -51,11 +51,11 @@ class StringIterator { >next : () => { value: string; done: boolean; } return { ->{ value: "", done: false } : { value: string; done: boolean; } +>{ value: "", done: false } : { value: ""; done: boolean; } value: "", ->value : string ->"" : string +>value : "" +>"" : "" done: false >done : boolean diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.types b/tests/baselines/reference/jsFileCompilationShortHandProperty.types index e4dd1755cebb7..7a186d39ed97e 100644 --- a/tests/baselines/reference/jsFileCompilationShortHandProperty.types +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.types @@ -9,7 +9,7 @@ function foo() { var b = "Hello"; >b : string ->"Hello" : string +>"Hello" : "Hello" return { >{ a, b } : { a: number; b: string; } diff --git a/tests/baselines/reference/jsxReactTestSuite.types b/tests/baselines/reference/jsxReactTestSuite.types index 88c2c278e59a3..373c89e9f87b7 100644 --- a/tests/baselines/reference/jsxReactTestSuite.types +++ b/tests/baselines/reference/jsxReactTestSuite.types @@ -120,8 +120,8 @@ var x = "foo" + "bar" >"foo" + "bar" : string ->"foo" : string ->"bar" : string +>"foo" : "foo" +>"bar" : "bar" } attr2={ >attr2 : any @@ -130,12 +130,12 @@ var x = >"foo" + "bar" + "baz" + "bug" : string >"foo" + "bar" + "baz" : string >"foo" + "bar" : string ->"foo" : string ->"bar" : string +>"foo" : "foo" +>"bar" : "bar" "baz" + "bug" ->"baz" : string ->"bug" : string +>"baz" : "baz" +>"bug" : "bug" } attr3={ >attr3 : any @@ -144,12 +144,12 @@ var x = >"foo" + "bar" + "baz" + "bug" : string >"foo" + "bar" + "baz" : string >"foo" + "bar" : string ->"foo" : string ->"bar" : string +>"foo" : "foo" +>"bar" : "bar" "baz" + "bug" ->"baz" : string ->"bug" : string +>"baz" : "baz" +>"bug" : "bug" // Extra line here. } diff --git a/tests/baselines/reference/keywordField.types b/tests/baselines/reference/keywordField.types index 8bc977edd747f..5a41f28e6bcc5 100644 --- a/tests/baselines/reference/keywordField.types +++ b/tests/baselines/reference/keywordField.types @@ -12,9 +12,9 @@ obj.if = 1; var a = { if: "test" } >a : { if: string; } ->{ if: "test" } : { if: string; } ->if : string ->"test" : string +>{ if: "test" } : { if: "test"; } +>if : "test" +>"test" : "test" var n = a.if >n : string @@ -26,5 +26,5 @@ var q = a["if"]; >q : string >a["if"] : string >a : { if: string; } ->"if" : string +>"if" : "if" diff --git a/tests/baselines/reference/letDeclarations-es5-1.types b/tests/baselines/reference/letDeclarations-es5-1.types index b088677cd0a15..43ef19358432a 100644 --- a/tests/baselines/reference/letDeclarations-es5-1.types +++ b/tests/baselines/reference/letDeclarations-es5-1.types @@ -23,7 +23,7 @@ >l9 : number >0 : number >l10 : string ->"" : string +>"" : "" >l11 : any >null : null diff --git a/tests/baselines/reference/letDeclarations-es5.types b/tests/baselines/reference/letDeclarations-es5.types index f6e8d418632d0..3db5855b12695 100644 --- a/tests/baselines/reference/letDeclarations-es5.types +++ b/tests/baselines/reference/letDeclarations-es5.types @@ -24,7 +24,7 @@ let l9 = 0, l10 :string = "", l11 = null; >l9 : number >0 : number >l10 : string ->"" : string +>"" : "" >l11 : any >null : null diff --git a/tests/baselines/reference/letDeclarations.types b/tests/baselines/reference/letDeclarations.types index bb20f895a14c5..35bf3fe42e104 100644 --- a/tests/baselines/reference/letDeclarations.types +++ b/tests/baselines/reference/letDeclarations.types @@ -24,7 +24,7 @@ let l9 = 0, l10 :string = "", l11 = null; >l9 : number >0 : number >l10 : string ->"" : string +>"" : "" >l11 : any >null : null diff --git a/tests/baselines/reference/letDeclarations2.types b/tests/baselines/reference/letDeclarations2.types index eeb66838a6a7c..b77b15db63abc 100644 --- a/tests/baselines/reference/letDeclarations2.types +++ b/tests/baselines/reference/letDeclarations2.types @@ -5,7 +5,7 @@ module M { let l1 = "s"; >l1 : string ->"s" : string +>"s" : "s" export let l2 = 0; >l2 : number diff --git a/tests/baselines/reference/library_ObjectPrototypeProperties.types b/tests/baselines/reference/library_ObjectPrototypeProperties.types index 616a9da633bd3..2f41dd7c1eb3f 100644 --- a/tests/baselines/reference/library_ObjectPrototypeProperties.types +++ b/tests/baselines/reference/library_ObjectPrototypeProperties.types @@ -39,7 +39,7 @@ Object.prototype.hasOwnProperty("string"); >Object : ObjectConstructor >prototype : Object >hasOwnProperty : (v: string) => boolean ->"string" : string +>"string" : "string" Object.prototype.isPrototypeOf(Object); >Object.prototype.isPrototypeOf(Object) : boolean @@ -57,5 +57,5 @@ Object.prototype.propertyIsEnumerable("string"); >Object : ObjectConstructor >prototype : Object >propertyIsEnumerable : (v: string) => boolean ->"string" : string +>"string" : "string" diff --git a/tests/baselines/reference/literals1.types b/tests/baselines/reference/literals1.types index 69e50c22f4a57..876222dac45a2 100644 --- a/tests/baselines/reference/literals1.types +++ b/tests/baselines/reference/literals1.types @@ -29,19 +29,19 @@ var g = false; var h = ""; >h : string ->"" : string +>"" : "" var i = "hi"; >i : string ->"hi" : string +>"hi" : "hi" var j = ''; >j : string ->'' : string +>'' : "" var k = 'q\tq'; >k : string ->'q\tq' : string +>'q\tq' : "q\tq" var m = /q/; >m : RegExp diff --git a/tests/baselines/reference/localClassesInLoop.types b/tests/baselines/reference/localClassesInLoop.types index f1c06f934636d..1b90b1a419ea3 100644 --- a/tests/baselines/reference/localClassesInLoop.types +++ b/tests/baselines/reference/localClassesInLoop.types @@ -4,7 +4,7 @@ declare function use(a: any); >a : any "use strict" ->"use strict" : string +>"use strict" : "use strict" var data = []; >data : any[] diff --git a/tests/baselines/reference/localClassesInLoop_ES6.types b/tests/baselines/reference/localClassesInLoop_ES6.types index 518e75f4afa40..52a78c677cda7 100644 --- a/tests/baselines/reference/localClassesInLoop_ES6.types +++ b/tests/baselines/reference/localClassesInLoop_ES6.types @@ -5,7 +5,7 @@ declare function use(a: any); >a : any "use strict" ->"use strict" : string +>"use strict" : "use strict" var data = []; >data : any[] diff --git a/tests/baselines/reference/localTypes1.types b/tests/baselines/reference/localTypes1.types index 1770a36edb7cc..e597d06455478 100644 --- a/tests/baselines/reference/localTypes1.types +++ b/tests/baselines/reference/localTypes1.types @@ -361,25 +361,25 @@ function f6() { >C : typeof C x.a = "a"; ->x.a = "a" : string +>x.a = "a" : "a" >x.a : string >x : C >a : string ->"a" : string +>"a" : "a" x.b = "b"; ->x.b = "b" : string +>x.b = "b" : "b" >x.b : string >x : C >b : string ->"b" : string +>"b" : "b" x.c = "c"; ->x.c = "c" : string +>x.c = "c" : "c" >x.c : string >x : C >c : string ->"c" : string +>"c" : "c" return x; >x : C diff --git a/tests/baselines/reference/localTypes3.types b/tests/baselines/reference/localTypes3.types index 551096468c57f..cb3c9453cd02f 100644 --- a/tests/baselines/reference/localTypes3.types +++ b/tests/baselines/reference/localTypes3.types @@ -29,7 +29,7 @@ function f1() { >new C(10, "hello") : C >C : typeof C >10 : number ->"hello" : string +>"hello" : "hello" let x = v.x; >x : number @@ -78,7 +78,7 @@ function f2() { >v : f.C >new C("hello") : f.C >C : typeof C ->"hello" : string +>"hello" : "hello" let x = v.x; >x : number @@ -124,7 +124,7 @@ function f3() { >f(10, "hello") : typeof C >f : (x: X, y: Y) => typeof C >10 : number ->"hello" : string +>"hello" : "hello" let v = new C(); >v : f.C diff --git a/tests/baselines/reference/logicalNotOperatorWithEnumType.types b/tests/baselines/reference/logicalNotOperatorWithEnumType.types index 5d57916ceaafc..c101f8c4dc7ff 100644 --- a/tests/baselines/reference/logicalNotOperatorWithEnumType.types +++ b/tests/baselines/reference/logicalNotOperatorWithEnumType.types @@ -22,7 +22,7 @@ var ResultIsBoolean2 = !ENUM["B"]; >!ENUM["B"] : boolean >ENUM["B"] : ENUM >ENUM : typeof ENUM ->"B" : string +>"B" : "B" var ResultIsBoolean3 = !(ENUM.B + ENUM["C"]); >ResultIsBoolean3 : boolean @@ -34,7 +34,7 @@ var ResultIsBoolean3 = !(ENUM.B + ENUM["C"]); >B : ENUM >ENUM["C"] : ENUM >ENUM : typeof ENUM ->"C" : string +>"C" : "C" // multiple ! operators var ResultIsBoolean4 = !!ENUM; @@ -52,7 +52,7 @@ var ResultIsBoolean5 = !!!(ENUM["B"] + ENUM.C); >ENUM["B"] + ENUM.C : number >ENUM["B"] : ENUM >ENUM : typeof ENUM ->"B" : string +>"B" : "B" >ENUM.C : ENUM >ENUM : typeof ENUM >C : ENUM diff --git a/tests/baselines/reference/logicalNotOperatorWithStringType.types b/tests/baselines/reference/logicalNotOperatorWithStringType.types index 5ca820ea6d0aa..3feaf037d5e6d 100644 --- a/tests/baselines/reference/logicalNotOperatorWithStringType.types +++ b/tests/baselines/reference/logicalNotOperatorWithStringType.types @@ -5,13 +5,13 @@ var STRING: string; var STRING1: string[] = ["", "abc"]; >STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string +>["", "abc"] : ("" | "abc")[] +>"" : "" +>"abc" : "abc" function foo(): string { return "abc"; } >foo : () => string ->"abc" : string +>"abc" : "abc" class A { >A : A @@ -21,7 +21,7 @@ class A { static foo() { return ""; } >foo : () => string ->"" : string +>"" : "" } module M { >M : typeof M @@ -50,23 +50,23 @@ var ResultIsBoolean2 = !STRING1; var ResultIsBoolean3 = !""; >ResultIsBoolean3 : boolean >!"" : boolean ->"" : string +>"" : "" var ResultIsBoolean4 = !{ x: "", y: "" }; >ResultIsBoolean4 : boolean >!{ x: "", y: "" } : boolean ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string +>{ x: "", y: "" } : { x: ""; y: ""; } +>x : "" +>"" : "" +>y : "" +>"" : "" var ResultIsBoolean5 = !{ x: "", y: (s: string) => { return s; } }; >ResultIsBoolean5 : boolean >!{ x: "", y: (s: string) => { return s; } } : boolean ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string +>{ x: "", y: (s: string) => { return s; } } : { x: ""; y: (s: string) => string; } +>x : "" +>"" : "" >y : (s: string) => string >(s: string) => { return s; } : (s: string) => string >s : string @@ -145,7 +145,7 @@ var ResultIsBoolean14 = !!!(STRING + STRING); // miss assignment operators !""; >!"" : boolean ->"" : string +>"" : "" !STRING; >!STRING : boolean diff --git a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types index f887ad7ae140c..29b537853aaaa 100644 --- a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types +++ b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types @@ -107,12 +107,12 @@ function fn3u : U var r3 = t || { a: '' }; ->r3 : { a: string; } ->t || { a: '' } : { a: string; } +>r3 : T | { a: string; } +>t || { a: '' } : T | { a: ""; } >t : T ->{ a: '' } : { a: string; } ->a : string ->'' : string +>{ a: '' } : { a: ""; } +>a : "" +>'' : "" var r4: { a: string } = t || u; >r4 : { a: string; } diff --git a/tests/baselines/reference/matchingOfObjectLiteralConstraints.types b/tests/baselines/reference/matchingOfObjectLiteralConstraints.types index f694571c72706..1e3a77e61c100 100644 --- a/tests/baselines/reference/matchingOfObjectLiteralConstraints.types +++ b/tests/baselines/reference/matchingOfObjectLiteralConstraints.types @@ -13,9 +13,9 @@ function foo2(x: U, z: T) { } foo2({ y: "foo" }, "foo"); >foo2({ y: "foo" }, "foo") : void >foo2 : (x: U, z: T) => void ->{ y: "foo" } : { y: string; } ->y : string ->"foo" : string ->"foo" : string +>{ y: "foo" } : { y: "foo"; } +>y : "foo" +>"foo" : "foo" +>"foo" : "foo" diff --git a/tests/baselines/reference/mergedInterfacesWithIndexers.types b/tests/baselines/reference/mergedInterfacesWithIndexers.types index b228931660a3c..39533c5d9a7a6 100644 --- a/tests/baselines/reference/mergedInterfacesWithIndexers.types +++ b/tests/baselines/reference/mergedInterfacesWithIndexers.types @@ -31,11 +31,11 @@ var r2 = a['1']; >r2 : { length: number; } >a['1'] : { length: number; } >a : A ->'1' : string +>'1' : "1" var r3 = a['hi']; >r3 : { length: number; } >a['hi'] : { length: number; } >a : A ->'hi' : string +>'hi' : "hi" diff --git a/tests/baselines/reference/moduleAugmentationsBundledOutput1.types b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types index 80e9127905d6c..47453955f51e1 100644 --- a/tests/baselines/reference/moduleAugmentationsBundledOutput1.types +++ b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types @@ -30,7 +30,7 @@ import {Cls} from "./m1"; >prototype : Cls >bar : any >function() { return "1"; } : () => string ->"1" : string +>"1" : "1" declare module "./m1" { interface Cls { diff --git a/tests/baselines/reference/moduleCodeGenTest3.types b/tests/baselines/reference/moduleCodeGenTest3.types index 288b794326f61..77c59d8fc7300 100644 --- a/tests/baselines/reference/moduleCodeGenTest3.types +++ b/tests/baselines/reference/moduleCodeGenTest3.types @@ -2,12 +2,12 @@ module Baz { export var x = "hello"; } >Baz : typeof Baz >x : string ->"hello" : string +>"hello" : "hello" Baz.x = "goodbye"; ->Baz.x = "goodbye" : string +>Baz.x = "goodbye" : "goodbye" >Baz.x : string >Baz : typeof Baz >x : string ->"goodbye" : string +>"goodbye" : "goodbye" diff --git a/tests/baselines/reference/moduleCodegenTest4.types b/tests/baselines/reference/moduleCodegenTest4.types index 919432c938f1f..2df27dafb52d6 100644 --- a/tests/baselines/reference/moduleCodegenTest4.types +++ b/tests/baselines/reference/moduleCodegenTest4.types @@ -2,14 +2,14 @@ export module Baz { export var x = "hello"; } >Baz : typeof Baz >x : string ->"hello" : string +>"hello" : "hello" Baz.x = "goodbye"; ->Baz.x = "goodbye" : string +>Baz.x = "goodbye" : "goodbye" >Baz.x : string >Baz : typeof Baz >x : string ->"goodbye" : string +>"goodbye" : "goodbye" void 0; >void 0 : undefined diff --git a/tests/baselines/reference/moduleMerge.types b/tests/baselines/reference/moduleMerge.types index 06d532673edc0..99fe3c2a7c6b0 100644 --- a/tests/baselines/reference/moduleMerge.types +++ b/tests/baselines/reference/moduleMerge.types @@ -11,7 +11,7 @@ module A >Hello : () => string { return "from private B"; ->"from private B" : string +>"from private B" : "from private B" } } } @@ -26,7 +26,7 @@ module A >Hello : () => string { return "from export B"; ->"from export B" : string +>"from export B" : "from export B" } } } diff --git a/tests/baselines/reference/modulePrologueAMD.types b/tests/baselines/reference/modulePrologueAMD.types index b57b5a8bf2f33..f4c390ac060ad 100644 --- a/tests/baselines/reference/modulePrologueAMD.types +++ b/tests/baselines/reference/modulePrologueAMD.types @@ -1,6 +1,6 @@ === tests/cases/compiler/modulePrologueAMD.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" export class Foo {} >Foo : Foo diff --git a/tests/baselines/reference/modulePrologueCommonjs.types b/tests/baselines/reference/modulePrologueCommonjs.types index 5d76532b3e47b..0aeaef6c38e1b 100644 --- a/tests/baselines/reference/modulePrologueCommonjs.types +++ b/tests/baselines/reference/modulePrologueCommonjs.types @@ -1,6 +1,6 @@ === tests/cases/compiler/modulePrologueCommonjs.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" export class Foo {} >Foo : Foo diff --git a/tests/baselines/reference/modulePrologueES6.types b/tests/baselines/reference/modulePrologueES6.types index 5f09a60ac6aa7..4b6a74608cb55 100644 --- a/tests/baselines/reference/modulePrologueES6.types +++ b/tests/baselines/reference/modulePrologueES6.types @@ -1,6 +1,6 @@ === tests/cases/compiler/modulePrologueES6.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" export class Foo {} >Foo : Foo diff --git a/tests/baselines/reference/modulePrologueSystem.types b/tests/baselines/reference/modulePrologueSystem.types index ac0d52e4a2b8f..f54048b79a42a 100644 --- a/tests/baselines/reference/modulePrologueSystem.types +++ b/tests/baselines/reference/modulePrologueSystem.types @@ -1,6 +1,6 @@ === tests/cases/compiler/modulePrologueSystem.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" export class Foo {} >Foo : Foo diff --git a/tests/baselines/reference/modulePrologueUmd.types b/tests/baselines/reference/modulePrologueUmd.types index 2a1064da8e2a3..02f90df9704a7 100644 --- a/tests/baselines/reference/modulePrologueUmd.types +++ b/tests/baselines/reference/modulePrologueUmd.types @@ -1,6 +1,6 @@ === tests/cases/compiler/modulePrologueUmd.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" export class Foo {} >Foo : Foo diff --git a/tests/baselines/reference/moduleResolutionNoResolve.types b/tests/baselines/reference/moduleResolutionNoResolve.types index 3e96ed2b19762..dbec43bf1a210 100644 --- a/tests/baselines/reference/moduleResolutionNoResolve.types +++ b/tests/baselines/reference/moduleResolutionNoResolve.types @@ -6,5 +6,5 @@ import a = require('./b'); === tests/cases/compiler/b.ts === export var c = ''; >c : string ->'' : string +>'' : "" diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.types b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.types index b473adf2aa477..865546d12fae5 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.types +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.types @@ -7,7 +7,7 @@ module Z.M { >bar : () => string return ""; ->"" : string +>"" : "" } } module A.M { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.types b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.types index 56160637e0f4d..b2a3198eab8e4 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.types +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.types @@ -7,7 +7,7 @@ module Z.M { >bar : () => string return ""; ->"" : string +>"" : "" } } module A.M { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.types b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.types index b8574a2c71f69..02f47ec112b56 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.types +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.types @@ -7,7 +7,7 @@ module Z.M { >bar : () => string return ""; ->"" : string +>"" : "" } } module A.M { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.types b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.types index 65f820e060647..32e5cbd850ec7 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.types +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.types @@ -7,7 +7,7 @@ module Z.M { >bar : () => string return ""; ->"" : string +>"" : "" } } module A.M { diff --git a/tests/baselines/reference/moduleVisibilityTest1.types b/tests/baselines/reference/moduleVisibilityTest1.types index b54f897d01434..e4ce049908a75 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.types +++ b/tests/baselines/reference/moduleVisibilityTest1.types @@ -14,7 +14,7 @@ module OuterMod { export function someExportedOuterInnerFunc() { return "foo"; } >someExportedOuterInnerFunc : () => string ->"foo" : string +>"foo" : "foo" } } diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types index c6f4be850be65..20845f78393c0 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types @@ -66,14 +66,14 @@ module A { return 'hello ' + s; >'hello ' + s : string ->'hello ' : string +>'hello ' : "hello " >s : string } var ol = { s: 'hello', id: 2, isvalid: true }; >ol : { s: string; id: number; isvalid: boolean; } ->{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; } ->s : string ->'hello' : string +>{ s: 'hello', id: 2, isvalid: true } : { s: "hello"; id: number; isvalid: boolean; } +>s : "hello" +>'hello' : "hello" >id : number >2 : number >isvalid : boolean @@ -154,14 +154,14 @@ module Y { return 'hello ' + s; >'hello ' + s : string ->'hello ' : string +>'hello ' : "hello " >s : string } export var ol = { s: 'hello', id: 2, isvalid: true }; >ol : { s: string; id: number; isvalid: boolean; } ->{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; } ->s : string ->'hello' : string +>{ s: 'hello', id: 2, isvalid: true } : { s: "hello"; id: number; isvalid: boolean; } +>s : "hello" +>'hello' : "hello" >id : number >2 : number >isvalid : boolean diff --git a/tests/baselines/reference/moduledecl.types b/tests/baselines/reference/moduledecl.types index 0c117fb51840d..60d0c7e83f70a 100644 --- a/tests/baselines/reference/moduledecl.types +++ b/tests/baselines/reference/moduledecl.types @@ -156,7 +156,7 @@ module m1 { >d : () => string return "Hello"; ->"Hello" : string +>"Hello" : "Hello" } public e: { x: number; y: string; }; @@ -325,7 +325,7 @@ module exportTests { >f3 : () => string return "string"; ->"string" : string +>"string" : "string" } } class C2_private { @@ -342,7 +342,7 @@ module exportTests { >f3 : () => string return "string"; ->"string" : string +>"string" : "string" } } diff --git a/tests/baselines/reference/multiModuleClodule1.types b/tests/baselines/reference/multiModuleClodule1.types index b958d18f98400..7e0eab43b9c90 100644 --- a/tests/baselines/reference/multiModuleClodule1.types +++ b/tests/baselines/reference/multiModuleClodule1.types @@ -34,7 +34,7 @@ module C { function baz() { return ''; } >baz : () => string ->'' : string +>'' : "" } var c = new C(C.x); diff --git a/tests/baselines/reference/nameCollision.types b/tests/baselines/reference/nameCollision.types index e8badb7ab92ef..7a9052827c878 100644 --- a/tests/baselines/reference/nameCollision.types +++ b/tests/baselines/reference/nameCollision.types @@ -10,7 +10,7 @@ module A { var _A = ''; >_A : string ->'' : string +>'' : "" } module B { @@ -93,5 +93,5 @@ module D { export var E = 'hello'; >E : string ->'hello' : string +>'hello' : "hello" } diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.types b/tests/baselines/reference/negateOperatorWithAnyOtherType.types index f864c9d166ce4..77ee710f65729 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.types @@ -9,18 +9,18 @@ var ANY1; var ANY2: any[] = ["", ""]; >ANY2 : any[] ->["", ""] : string[] ->"" : string ->"" : string +>["", ""] : ""[] +>"" : "" +>"" : "" var obj: () => {} >obj : () => {} var obj1 = { x: "", y: () => { }}; >obj1 : { x: string; y: () => void; } ->{ x: "", y: () => { }} : { x: string; y: () => void; } ->x : string ->"" : string +>{ x: "", y: () => { }} : { x: ""; y: () => void; } +>x : "" +>"" : "" >y : () => void >() => { } : () => void diff --git a/tests/baselines/reference/negateOperatorWithEnumType.types b/tests/baselines/reference/negateOperatorWithEnumType.types index 2f39a581ef849..0db3930894499 100644 --- a/tests/baselines/reference/negateOperatorWithEnumType.types +++ b/tests/baselines/reference/negateOperatorWithEnumType.types @@ -21,7 +21,7 @@ var ResultIsNumber2 = -ENUM1["B"]; >-ENUM1["B"] : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" var ResultIsNumber3 = -(ENUM1.B + ENUM1[""]); >ResultIsNumber3 : number @@ -33,7 +33,7 @@ var ResultIsNumber3 = -(ENUM1.B + ENUM1[""]); >B : ENUM1 >ENUM1[""] : ENUM1 >ENUM1 : typeof ENUM1 ->"" : string +>"" : "" // miss assignment operators -ENUM; @@ -48,7 +48,7 @@ var ResultIsNumber3 = -(ENUM1.B + ENUM1[""]); >-ENUM1["B"] : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" -ENUM, ENUM1; >-ENUM, ENUM1 : typeof ENUM1 diff --git a/tests/baselines/reference/negateOperatorWithStringType.types b/tests/baselines/reference/negateOperatorWithStringType.types index 6ef570557fe5b..15b91f088d150 100644 --- a/tests/baselines/reference/negateOperatorWithStringType.types +++ b/tests/baselines/reference/negateOperatorWithStringType.types @@ -5,13 +5,13 @@ var STRING: string; var STRING1: string[] = ["", "abc"]; >STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string +>["", "abc"] : ("" | "abc")[] +>"" : "" +>"abc" : "abc" function foo(): string { return "abc"; } >foo : () => string ->"abc" : string +>"abc" : "abc" class A { >A : A @@ -21,7 +21,7 @@ class A { static foo() { return ""; } >foo : () => string ->"" : string +>"" : "" } module M { >M : typeof M @@ -50,23 +50,23 @@ var ResultIsNumber2 = -STRING1; var ResultIsNumber3 = -""; >ResultIsNumber3 : number >-"" : number ->"" : string +>"" : "" var ResultIsNumber4 = -{ x: "", y: "" }; >ResultIsNumber4 : number >-{ x: "", y: "" } : number ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string +>{ x: "", y: "" } : { x: ""; y: ""; } +>x : "" +>"" : "" +>y : "" +>"" : "" var ResultIsNumber5 = -{ x: "", y: (s: string) => { return s; } }; >ResultIsNumber5 : number >-{ x: "", y: (s: string) => { return s; } } : number ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string +>{ x: "", y: (s: string) => { return s; } } : { x: ""; y: (s: string) => string; } +>x : "" +>"" : "" >y : (s: string) => string >(s: string) => { return s; } : (s: string) => string >s : string @@ -128,7 +128,7 @@ var ResultIsNumber12 = -STRING.charAt(0); // miss assignment operators -""; >-"" : number ->"" : string +>"" : "" -STRING; >-STRING : number diff --git a/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.types index e07fa21fafec9..902149e50c1c6 100644 --- a/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.types @@ -18,5 +18,5 @@ var y = new i(""); // y should be string >y : string >new i("") : string >i : I ->"" : string +>"" : "" diff --git a/tests/baselines/reference/newWithSpreadES5.types b/tests/baselines/reference/newWithSpreadES5.types index a2c83ed6372e0..6eec4004803b9 100644 --- a/tests/baselines/reference/newWithSpreadES5.types +++ b/tests/baselines/reference/newWithSpreadES5.types @@ -86,7 +86,7 @@ new f(1, 2, "string"); >f : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"string" : string +>"string" : "string" new f(1, 2, ...a); >new f(1, 2, ...a) : any @@ -103,7 +103,7 @@ new f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Multiple spreads arguments new f2(...a, ...a); @@ -131,7 +131,7 @@ new f(1, 2, "string")(); >f : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"string" : string +>"string" : "string" new f(1, 2, ...a)(); >new f(1, 2, ...a)() : any @@ -150,7 +150,7 @@ new f(1, 2, ...a, "string")(); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Property access expression new b.f(1, 2, "string"); @@ -160,7 +160,7 @@ new b.f(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new b.f(1, 2, ...a); >new b.f(1, 2, ...a) : any @@ -181,7 +181,7 @@ new b.f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Parenthesised expression new (b.f)(1, 2, "string"); @@ -192,7 +192,7 @@ new (b.f)(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new (b.f)(1, 2, ...a); >new (b.f)(1, 2, ...a) : any @@ -215,7 +215,7 @@ new (b.f)(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression new d[1].f(1, 2, "string"); @@ -227,7 +227,7 @@ new d[1].f(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new d[1].f(1, 2, ...a); >new d[1].f(1, 2, ...a) : any @@ -252,7 +252,7 @@ new d[1].f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a punctuated key new e["a-b"].f(1, 2, "string"); @@ -260,18 +260,18 @@ new e["a-b"].f(1, 2, "string"); >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new e["a-b"].f(1, 2, ...a); >new e["a-b"].f(1, 2, ...a) : any >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number @@ -283,13 +283,13 @@ new e["a-b"].f(1, 2, ...a, "string"); >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Basic expression new B(1, 2, "string"); @@ -297,7 +297,7 @@ new B(1, 2, "string"); >B : typeof B >1 : number >2 : number ->"string" : string +>"string" : "string" new B(1, 2, ...a); >new B(1, 2, ...a) : B @@ -314,23 +314,23 @@ new B(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Property access expression new c["a-b"](1, 2, "string"); >new c["a-b"](1, 2, "string") : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new c["a-b"](1, 2, ...a); >new c["a-b"](1, 2, ...a) : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -340,12 +340,12 @@ new c["a-b"](1, 2, ...a, "string"); >new c["a-b"](1, 2, ...a, "string") : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Parenthesised expression new (c["a-b"])(1, 2, "string"); @@ -353,17 +353,17 @@ new (c["a-b"])(1, 2, "string"); >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new (c["a-b"])(1, 2, ...a); >new (c["a-b"])(1, 2, ...a) : B >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -374,12 +374,12 @@ new (c["a-b"])(1, 2, ...a, "string"); >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression new g[1]["a-b"](1, 2, "string"); @@ -388,10 +388,10 @@ new g[1]["a-b"](1, 2, "string"); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new g[1]["a-b"](1, 2, ...a); >new g[1]["a-b"](1, 2, ...a) : B @@ -399,7 +399,7 @@ new g[1]["a-b"](1, 2, ...a); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -411,12 +411,12 @@ new g[1]["a-b"](1, 2, ...a, "string"); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a punctuated key new h["a-b"]["a-b"](1, 2, "string"); @@ -424,19 +424,19 @@ new h["a-b"]["a-b"](1, 2, "string"); >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new h["a-b"]["a-b"](1, 2, ...a); >new h["a-b"]["a-b"](1, 2, ...a) : B >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -447,13 +447,13 @@ new h["a-b"]["a-b"](1, 2, ...a, "string"); >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a number new i["a-b"][1](1, 2, "string"); @@ -461,18 +461,18 @@ new i["a-b"][1](1, 2, "string"); >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number ->"string" : string +>"string" : "string" new i["a-b"][1](1, 2, ...a); >new i["a-b"][1](1, 2, ...a) : any >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number @@ -484,11 +484,11 @@ new i["a-b"][1](1, 2, ...a, "string"); >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" diff --git a/tests/baselines/reference/newWithSpreadES6.types b/tests/baselines/reference/newWithSpreadES6.types index 52951729e3de4..af5893c8e01cc 100644 --- a/tests/baselines/reference/newWithSpreadES6.types +++ b/tests/baselines/reference/newWithSpreadES6.types @@ -87,7 +87,7 @@ new f(1, 2, "string"); >f : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"string" : string +>"string" : "string" new f(1, 2, ...a); >new f(1, 2, ...a) : any @@ -104,7 +104,7 @@ new f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Multiple spreads arguments new f2(...a, ...a); @@ -132,7 +132,7 @@ new f(1, 2, "string")(); >f : (x: number, y: number, ...z: string[]) => void >1 : number >2 : number ->"string" : string +>"string" : "string" new f(1, 2, ...a)(); >new f(1, 2, ...a)() : any @@ -151,7 +151,7 @@ new f(1, 2, ...a, "string")(); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Property access expression new b.f(1, 2, "string"); @@ -161,7 +161,7 @@ new b.f(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new b.f(1, 2, ...a); >new b.f(1, 2, ...a) : any @@ -182,7 +182,7 @@ new b.f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Parenthesised expression new (b.f)(1, 2, "string"); @@ -193,7 +193,7 @@ new (b.f)(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new (b.f)(1, 2, ...a); >new (b.f)(1, 2, ...a) : any @@ -216,7 +216,7 @@ new (b.f)(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression new d[1].f(1, 2, "string"); @@ -228,7 +228,7 @@ new d[1].f(1, 2, "string"); >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new d[1].f(1, 2, ...a); >new d[1].f(1, 2, ...a) : any @@ -253,7 +253,7 @@ new d[1].f(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a punctuated key new e["a-b"].f(1, 2, "string"); @@ -261,18 +261,18 @@ new e["a-b"].f(1, 2, "string"); >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number ->"string" : string +>"string" : "string" new e["a-b"].f(1, 2, ...a); >new e["a-b"].f(1, 2, ...a) : any >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number @@ -284,13 +284,13 @@ new e["a-b"].f(1, 2, ...a, "string"); >e["a-b"].f : new (x: number, y: number, ...z: string[]) => any >e["a-b"] : A >e : { [key: string]: A; } ->"a-b" : string +>"a-b" : "a-b" >f : new (x: number, y: number, ...z: string[]) => any >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Basic expression new B(1, 2, "string"); @@ -298,7 +298,7 @@ new B(1, 2, "string"); >B : typeof B >1 : number >2 : number ->"string" : string +>"string" : "string" new B(1, 2, ...a); >new B(1, 2, ...a) : B @@ -315,23 +315,23 @@ new B(1, 2, ...a, "string"); >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Property access expression new c["a-b"](1, 2, "string"); >new c["a-b"](1, 2, "string") : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new c["a-b"](1, 2, ...a); >new c["a-b"](1, 2, ...a) : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -341,12 +341,12 @@ new c["a-b"](1, 2, ...a, "string"); >new c["a-b"](1, 2, ...a, "string") : B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Parenthesised expression new (c["a-b"])(1, 2, "string"); @@ -354,17 +354,17 @@ new (c["a-b"])(1, 2, "string"); >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new (c["a-b"])(1, 2, ...a); >new (c["a-b"])(1, 2, ...a) : B >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -375,12 +375,12 @@ new (c["a-b"])(1, 2, ...a, "string"); >(c["a-b"]) : typeof B >c["a-b"] : typeof B >c : C ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression new g[1]["a-b"](1, 2, "string"); @@ -389,10 +389,10 @@ new g[1]["a-b"](1, 2, "string"); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new g[1]["a-b"](1, 2, ...a); >new g[1]["a-b"](1, 2, ...a) : B @@ -400,7 +400,7 @@ new g[1]["a-b"](1, 2, ...a); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -412,12 +412,12 @@ new g[1]["a-b"](1, 2, ...a, "string"); >g[1] : C >g : C[] >1 : number ->"a-b" : string +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a punctuated key new h["a-b"]["a-b"](1, 2, "string"); @@ -425,19 +425,19 @@ new h["a-b"]["a-b"](1, 2, "string"); >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number ->"string" : string +>"string" : "string" new h["a-b"]["a-b"](1, 2, ...a); >new h["a-b"]["a-b"](1, 2, ...a) : B >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number >...a : string @@ -448,13 +448,13 @@ new h["a-b"]["a-b"](1, 2, ...a, "string"); >h["a-b"]["a-b"] : typeof B >h["a-b"] : C >h : { [key: string]: C; } ->"a-b" : string ->"a-b" : string +>"a-b" : "a-b" +>"a-b" : "a-b" >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" // Element access expression with a number new i["a-b"][1](1, 2, "string"); @@ -462,18 +462,18 @@ new i["a-b"][1](1, 2, "string"); >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number ->"string" : string +>"string" : "string" new i["a-b"][1](1, 2, ...a); >new i["a-b"][1](1, 2, ...a) : any >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number @@ -485,11 +485,11 @@ new i["a-b"][1](1, 2, ...a, "string"); >i["a-b"][1] : any >i["a-b"] : any >i : C[][] ->"a-b" : string +>"a-b" : "a-b" >1 : number >1 : number >2 : number >...a : string >a : string[] ->"string" : string +>"string" : "string" diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types index afe2ff7bd22e0..80bec7c1f22ee 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types @@ -2,9 +2,9 @@ var regexMatchList = ['', '']; >regexMatchList : string[] ->['', ''] : string[] ->'' : string ->'' : string +>['', ''] : ""[] +>'' : "" +>'' : "" regexMatchList.forEach(match => ''.replace(match, '')); >regexMatchList.forEach(match => ''.replace(match, '')) : void @@ -15,8 +15,8 @@ regexMatchList.forEach(match => ''.replace(match, '')); >match : string >''.replace(match, '') : string >''.replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ->'' : string +>'' : "" >replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >match : string ->'' : string +>'' : "" diff --git a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types index b7b21bf8f9258..324e9d6f87a36 100644 --- a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types +++ b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types @@ -28,14 +28,14 @@ var strRepresentation3 = MyEmusEnum["monehh"]; >strRepresentation3 : any >MyEmusEnum["monehh"] : any >MyEmusEnum : typeof MyEmusEnum ->"monehh" : string +>"monehh" : "monehh" // Should be okay; should be a MyEmusEnum var strRepresentation4 = MyEmusEnum["emu"]; >strRepresentation4 : MyEmusEnum >MyEmusEnum["emu"] : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->"emu" : string +>"emu" : "emu" // Should be okay, as we suppress implicit 'any' property access checks @@ -43,7 +43,7 @@ var x = {}["hi"]; >x : any >{}["hi"] : any >{} : {} ->"hi" : string +>"hi" : "hi" // Should be okay, as we suppress implicit 'any' property access checks var y = {}[10]; @@ -54,7 +54,7 @@ var y = {}[10]; var hi: any = "hi"; >hi : any ->"hi" : string +>"hi" : "hi" var emptyObj = {}; >emptyObj : {} diff --git a/tests/baselines/reference/nonIterableRestElement1.types b/tests/baselines/reference/nonIterableRestElement1.types index a15fe5afd38cb..4410d7838cac3 100644 --- a/tests/baselines/reference/nonIterableRestElement1.types +++ b/tests/baselines/reference/nonIterableRestElement1.types @@ -4,11 +4,11 @@ var c = {}; >{} : {} [...c] = ["", 0]; ->[...c] = ["", 0] : (string | number)[] +>[...c] = ["", 0] : ("" | number)[] >[...c] : undefined[] >...c : any >c : {} ->["", 0] : (string | number)[] ->"" : string +>["", 0] : ("" | number)[] +>"" : "" >0 : number diff --git a/tests/baselines/reference/nonIterableRestElement2.types b/tests/baselines/reference/nonIterableRestElement2.types index c39a592d2e68d..783545e6f3910 100644 --- a/tests/baselines/reference/nonIterableRestElement2.types +++ b/tests/baselines/reference/nonIterableRestElement2.types @@ -4,11 +4,11 @@ var c = {}; >{} : {} [...c] = ["", 0]; ->[...c] = ["", 0] : (string | number)[] +>[...c] = ["", 0] : ("" | number)[] >[...c] : undefined[] >...c : any >c : {} ->["", 0] : (string | number)[] ->"" : string +>["", 0] : ("" | number)[] +>"" : "" >0 : number diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types index 42243076e9f1b..e459b5813ff26 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types @@ -49,17 +49,17 @@ var r1 = true ? null : 1; var r2 = true ? '' : null; >r2 : string ->true ? '' : null : string +>true ? '' : null : "" >true : boolean ->'' : string +>'' : "" >null : null var r2 = true ? null : ''; >r2 : string ->true ? null : '' : string +>true ? null : '' : "" >true : boolean >null : null ->'' : string +>'' : "" var r3 = true ? true : null; >r3 : boolean diff --git a/tests/baselines/reference/numberPropertyAccess.types b/tests/baselines/reference/numberPropertyAccess.types index b7f5479ed7974..2ea0ff8f2ea25 100644 --- a/tests/baselines/reference/numberPropertyAccess.types +++ b/tests/baselines/reference/numberPropertyAccess.types @@ -16,20 +16,20 @@ var b = x.hasOwnProperty('toFixed'); >x.hasOwnProperty : (v: string) => boolean >x : number >hasOwnProperty : (v: string) => boolean ->'toFixed' : string +>'toFixed' : "toFixed" var c = x['toExponential'](); >c : string >x['toExponential']() : string >x['toExponential'] : (fractionDigits?: number) => string >x : number ->'toExponential' : string +>'toExponential' : "toExponential" var d = x['hasOwnProperty']('toFixed'); >d : boolean >x['hasOwnProperty']('toFixed') : boolean >x['hasOwnProperty'] : (v: string) => boolean >x : number ->'hasOwnProperty' : string ->'toFixed' : string +>'hasOwnProperty' : "hasOwnProperty" +>'toFixed' : "toFixed" diff --git a/tests/baselines/reference/numericIndexingResults.types b/tests/baselines/reference/numericIndexingResults.types index 560bbdc74a8e7..f049a5ca1bde1 100644 --- a/tests/baselines/reference/numericIndexingResults.types +++ b/tests/baselines/reference/numericIndexingResults.types @@ -6,10 +6,10 @@ class C { >x : number 1 = ''; ->'' : string +>'' : "" "2" = '' ->'' : string +>'' : "" } var c: C; @@ -20,19 +20,19 @@ var r1 = c['1']; >r1 : string >c['1'] : string >c : C ->'1' : string +>'1' : "1" var r2 = c['2']; >r2 : string >c['2'] : string >c : C ->'2' : string +>'2' : "2" var r3 = c['3']; >r3 : any >c['3'] : any >c : C ->'3' : string +>'3' : "3" var r4 = c[1]; >r4 : string @@ -70,19 +70,19 @@ var r1 = i['1']; >r1 : string >i['1'] : string >i : I ->'1' : string +>'1' : "1" var r2 = i['2']; >r2 : string >i['2'] : string >i : I ->'2' : string +>'2' : "2" var r3 = i['3']; >r3 : any >i['3'] : any >i : I ->'3' : string +>'3' : "3" var r4 = i[1]; >r4 : string @@ -116,19 +116,19 @@ var r1 = a['1']; >r1 : string >a['1'] : string >a : { [x: number]: string; 1: string; "2": string; } ->'1' : string +>'1' : "1" var r2 = a['2']; >r2 : string >a['2'] : string >a : { [x: number]: string; 1: string; "2": string; } ->'2' : string +>'2' : "2" var r3 = a['3']; >r3 : any >a['3'] : any >a : { [x: number]: string; 1: string; "2": string; } ->'3' : string +>'3' : "3" var r4 = a[1]; >r4 : string @@ -151,27 +151,27 @@ var r6 = a[3]; var b: { [x: number]: string } = { 1: '', "2": '' } >b : { [x: number]: string; } >x : number ->{ 1: '', "2": '' } : { [x: number]: string; 1: string; "2": string; } ->'' : string ->'' : string +>{ 1: '', "2": '' } : { [x: number]: ""; 1: ""; "2": ""; } +>'' : "" +>'' : "" var r1a = b['1']; >r1a : any >b['1'] : any >b : { [x: number]: string; } ->'1' : string +>'1' : "1" var r2a = b['2']; >r2a : any >b['2'] : any >b : { [x: number]: string; } ->'2' : string +>'2' : "2" var r3 = b['3']; >r3 : any >b['3'] : any >b : { [x: number]: string; } ->'3' : string +>'3' : "3" var r4 = b[1]; >r4 : string @@ -194,27 +194,27 @@ var r6 = b[3]; var b2: { [x: number]: string; 1: string; "2": string; } = { 1: '', "2": '' } >b2 : { [x: number]: string; 1: string; "2": string; } >x : number ->{ 1: '', "2": '' } : { [x: number]: string; 1: string; "2": string; } ->'' : string ->'' : string +>{ 1: '', "2": '' } : { [x: number]: ""; 1: ""; "2": ""; } +>'' : "" +>'' : "" var r1b = b2['1']; >r1b : string >b2['1'] : string >b2 : { [x: number]: string; 1: string; "2": string; } ->'1' : string +>'1' : "1" var r2b = b2['2']; >r2b : string >b2['2'] : string >b2 : { [x: number]: string; 1: string; "2": string; } ->'2' : string +>'2' : "2" var r3 = b2['3']; >r3 : any >b2['3'] : any >b2 : { [x: number]: string; 1: string; "2": string; } ->'3' : string +>'3' : "3" var r4 = b2[1]; >r4 : string diff --git a/tests/baselines/reference/objectLitGetterSetter.types b/tests/baselines/reference/objectLitGetterSetter.types index 4f7865374e2d2..440b8c46b03a8 100644 --- a/tests/baselines/reference/objectLitGetterSetter.types +++ b/tests/baselines/reference/objectLitGetterSetter.types @@ -9,7 +9,7 @@ >Object : ObjectConstructor >defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any >obj : {} ->"accProperty" : string +>"accProperty" : "accProperty" >({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor >PropertyDescriptor : PropertyDescriptor >({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : { get: () => number; set: (v: any) => void; } @@ -22,7 +22,7 @@ eval("public = 1;"); >eval("public = 1;") : any >eval : (x: string) => any ->"public = 1;" : string +>"public = 1;" : "public = 1;" return 11; >11 : number diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.types b/tests/baselines/reference/objectLiteralArraySpecialization.types index b32eaa0441e18..9b5cbd4813541 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.types +++ b/tests/baselines/reference/objectLiteralArraySpecialization.types @@ -25,32 +25,32 @@ interface MyArrayWrapper { >T : T } var thing = create([ { name: "bob", id: 24 }, { name: "doug", id: 32 } ]); // should not error ->thing : MyArrayWrapper<{ name: string; id: number; }> ->create([ { name: "bob", id: 24 }, { name: "doug", id: 32 } ]) : MyArrayWrapper<{ name: string; id: number; }> +>thing : MyArrayWrapper<{ name: string; id: number; } | { name: string; id: number; }> +>create([ { name: "bob", id: 24 }, { name: "doug", id: 32 } ]) : MyArrayWrapper<{ name: string; id: number; } | { name: string; id: number; }> >create : (initialValues?: T[]) => MyArrayWrapper ->[ { name: "bob", id: 24 }, { name: "doug", id: 32 } ] : { name: string; id: number; }[] ->{ name: "bob", id: 24 } : { name: string; id: number; } ->name : string ->"bob" : string +>[ { name: "bob", id: 24 }, { name: "doug", id: 32 } ] : ({ name: "bob"; id: number; } | { name: "doug"; id: number; })[] +>{ name: "bob", id: 24 } : { name: "bob"; id: number; } +>name : "bob" +>"bob" : "bob" >id : number >24 : number ->{ name: "doug", id: 32 } : { name: string; id: number; } ->name : string ->"doug" : string +>{ name: "doug", id: 32 } : { name: "doug"; id: number; } +>name : "doug" +>"doug" : "doug" >id : number >32 : number thing.doSomething((x, y) => x.name === "bob"); // should not error >thing.doSomething((x, y) => x.name === "bob") : void ->thing.doSomething : (predicate: (x: { name: string; id: number; }, y: { name: string; id: number; }) => boolean) => void ->thing : MyArrayWrapper<{ name: string; id: number; }> ->doSomething : (predicate: (x: { name: string; id: number; }, y: { name: string; id: number; }) => boolean) => void ->(x, y) => x.name === "bob" : (x: { name: string; id: number; }, y: { name: string; id: number; }) => boolean ->x : { name: string; id: number; } ->y : { name: string; id: number; } +>thing.doSomething : (predicate: (x: { name: string; id: number; } | { name: string; id: number; }, y: { name: string; id: number; } | { name: string; id: number; }) => boolean) => void +>thing : MyArrayWrapper<{ name: string; id: number; } | { name: string; id: number; }> +>doSomething : (predicate: (x: { name: string; id: number; } | { name: string; id: number; }, y: { name: string; id: number; } | { name: string; id: number; }) => boolean) => void +>(x, y) => x.name === "bob" : (x: { name: string; id: number; } | { name: string; id: number; }, y: { name: string; id: number; } | { name: string; id: number; }) => boolean +>x : { name: string; id: number; } | { name: string; id: number; } +>y : { name: string; id: number; } | { name: string; id: number; } >x.name === "bob" : boolean >x.name : string ->x : { name: string; id: number; } +>x : { name: string; id: number; } | { name: string; id: number; } >name : string ->"bob" : string +>"bob" : "bob" diff --git a/tests/baselines/reference/objectLiteralContextualTyping.types b/tests/baselines/reference/objectLiteralContextualTyping.types index 8100b7a54463f..39eadec3fd381 100644 --- a/tests/baselines/reference/objectLiteralContextualTyping.types +++ b/tests/baselines/reference/objectLiteralContextualTyping.types @@ -27,9 +27,9 @@ var x = foo({ name: "Sprocket" }); >x : string >foo({ name: "Sprocket" }) : string >foo : { (item: Item): string; (item: any): number; } ->{ name: "Sprocket" } : { name: string; } ->name : string ->"Sprocket" : string +>{ name: "Sprocket" } : { name: "Sprocket"; } +>name : "Sprocket" +>"Sprocket" : "Sprocket" var x: string; >x : string @@ -38,11 +38,11 @@ var y = foo({ name: "Sprocket", description: "Bumpy wheel" }); >y : string >foo({ name: "Sprocket", description: "Bumpy wheel" }) : string >foo : { (item: Item): string; (item: any): number; } ->{ name: "Sprocket", description: "Bumpy wheel" } : { name: string; description: string; } ->name : string ->"Sprocket" : string ->description : string ->"Bumpy wheel" : string +>{ name: "Sprocket", description: "Bumpy wheel" } : { name: "Sprocket"; description: "Bumpy wheel"; } +>name : "Sprocket" +>"Sprocket" : "Sprocket" +>description : "Bumpy wheel" +>"Bumpy wheel" : "Bumpy wheel" var y: string; >y : string @@ -51,9 +51,9 @@ var z = foo({ name: "Sprocket", description: false }); >z : number >foo({ name: "Sprocket", description: false }) : number >foo : { (item: Item): string; (item: any): number; } ->{ name: "Sprocket", description: false } : { name: string; description: boolean; } ->name : string ->"Sprocket" : string +>{ name: "Sprocket", description: false } : { name: "Sprocket"; description: boolean; } +>name : "Sprocket" +>"Sprocket" : "Sprocket" >description : boolean >false : boolean diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types index 869a67fb22f1e..07af599706fff 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types @@ -5,7 +5,7 @@ var id: number = 10000; var name: string = "my name"; >name : string ->"my name" : string +>"my name" : "my name" var person: { name: string; id: number } = { name, id }; >person : { name: string; id: number; } @@ -54,7 +54,7 @@ var person1 = bar("Hello", 5); >person1 : { name: string; id: number; } >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number var person2: { name: string } = bar("Hello", 5); @@ -62,7 +62,7 @@ var person2: { name: string } = bar("Hello", 5); >name : string >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number var person3: { name: string; id:number } = bar("Hello", 5); @@ -71,6 +71,6 @@ var person3: { name: string; id:number } = bar("Hello", 5); >id : number >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types index 710fc43033925..dcf33a8b2d21f 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types @@ -5,7 +5,7 @@ var id: number = 10000; var name: string = "my name"; >name : string ->"my name" : string +>"my name" : "my name" var person: { name: string; id: number } = { name, id }; >person : { name: string; id: number; } @@ -54,7 +54,7 @@ var person1 = bar("Hello", 5); >person1 : { name: string; id: number; } >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number var person2: { name: string } = bar("Hello", 5); @@ -62,7 +62,7 @@ var person2: { name: string } = bar("Hello", 5); >name : string >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number var person3: { name: string; id: number } = bar("Hello", 5); @@ -71,6 +71,6 @@ var person3: { name: string; id: number } = bar("Hello", 5); >id : number >bar("Hello", 5) : { name: string; id: number; } >bar : (name: string, id: number) => { name: string; id: number; } ->"Hello" : string +>"Hello" : "Hello" >5 : number diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types index 083d411812857..4f2745a55d825 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types @@ -5,7 +5,7 @@ var id: number = 10000; var name: string = "my name"; >name : string ->"my name" : string +>"my name" : "my name" var person = { name, id }; >person : { name: string; id: number; } diff --git a/tests/baselines/reference/objectTypePropertyAccess.types b/tests/baselines/reference/objectTypePropertyAccess.types index 5fc03bd86ed5e..7656a8a303d26 100644 --- a/tests/baselines/reference/objectTypePropertyAccess.types +++ b/tests/baselines/reference/objectTypePropertyAccess.types @@ -23,7 +23,7 @@ var r2 = c['toString'](); >c['toString']() : string >c['toString'] : () => string >c : C ->'toString' : string +>'toString' : "toString" var r3 = c.foo; >r3 : string @@ -35,7 +35,7 @@ var r4 = c['foo']; >r4 : string >c['foo'] : string >c : C ->'foo' : string +>'foo' : "foo" interface I { >I : I @@ -59,7 +59,7 @@ var r5 = i['toString'](); >i['toString']() : string >i['toString'] : () => string >i : I ->'toString' : string +>'toString' : "toString" var r6 = i.bar; >r6 : string @@ -71,15 +71,15 @@ var r7 = i['bar']; >r7 : string >i['bar'] : string >i : I ->'bar' : string +>'bar' : "bar" var a = { >a : { foo: string; } ->{ foo: ''} : { foo: string; } +>{ foo: ''} : { foo: ""; } foo: '' ->foo : string ->'' : string +>foo : "" +>'' : "" } var r8 = a.toString(); @@ -94,7 +94,7 @@ var r9 = a['toString'](); >a['toString']() : string >a['toString'] : () => string >a : { foo: string; } ->'toString' : string +>'toString' : "toString" var r10 = a.foo; >r10 : string @@ -106,5 +106,5 @@ var r11 = a['foo']; >r11 : string >a['foo'] : string >a : { foo: string; } ->'foo' : string +>'foo' : "foo" diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.types b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.types index 93caca61bfa9b..ea0ee84b575d1 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.types +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.types @@ -64,7 +64,7 @@ var r1e = i['hm']; // should be Object >r1e : any >i['hm'] : any >i : I ->'hm' : string +>'hm' : "hm" var x: { >x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; } @@ -113,5 +113,5 @@ var r2e = x['hm']; // should be Object >r2e : any >x['hm'] : any >x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; } ->'hm' : string +>'hm' : "hm" diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.types b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.types index 427b700fb592b..c0b5c9d5a776a 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.types +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.types @@ -61,7 +61,7 @@ var r1e = i['hm']; // should be Object >r1e : any >i['hm'] : any >i : I ->'hm' : string +>'hm' : "hm" var x: { >x : { new (): number; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; } @@ -110,5 +110,5 @@ var r2e = x['hm']; // should be Object >r2e : any >x['hm'] : any >x : { new (): number; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; } ->'hm' : string +>'hm' : "hm" diff --git a/tests/baselines/reference/objectTypeWithNumericProperty.types b/tests/baselines/reference/objectTypeWithNumericProperty.types index 32efd3398fb28..de69cd15903f7 100644 --- a/tests/baselines/reference/objectTypeWithNumericProperty.types +++ b/tests/baselines/reference/objectTypeWithNumericProperty.types @@ -28,13 +28,13 @@ var r3 = c['1']; >r3 : number >c['1'] : number >c : C ->'1' : string +>'1' : "1" var r4 = c['1.1']; >r4 : string >c['1.1'] : string >c : C ->'1.1' : string +>'1.1' : "1.1" interface I { >I : I @@ -63,13 +63,13 @@ var r3 = i['1']; >r3 : number >i['1'] : number >i : I ->'1' : string +>'1' : "1" var r4 = i['1.1']; >r4 : string >i['1.1'] : string >i : I ->'1.1' : string +>'1.1' : "1.1" var a: { >a : { 1: number; 1.1: string; } @@ -94,23 +94,23 @@ var r3 = a['1']; >r3 : number >a['1'] : number >a : { 1: number; 1.1: string; } ->'1' : string +>'1' : "1" var r4 = a['1.1']; >r4 : string >a['1.1'] : string >a : { 1: number; 1.1: string; } ->'1.1' : string +>'1.1' : "1.1" var b = { >b : { 1: number; 1.1: string; } ->{ 1: 1, 1.1: ""} : { 1: number; 1.1: string; } +>{ 1: 1, 1.1: ""} : { 1: number; 1.1: ""; } 1: 1, >1 : number 1.1: "" ->"" : string +>"" : "" } var r1 = b[1]; @@ -129,11 +129,11 @@ var r3 = b['1']; >r3 : number >b['1'] : number >b : { 1: number; 1.1: string; } ->'1' : string +>'1' : "1" var r4 = b['1.1']; >r4 : string >b['1.1'] : string >b : { 1: number; 1.1: string; } ->'1.1' : string +>'1.1' : "1.1" diff --git a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.types b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.types index 490f3101751a4..21f9f220c1e2b 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.types +++ b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.types @@ -32,19 +32,19 @@ var r1 = c['0.1']; >r1 : void >c['0.1'] : void >c : C ->'0.1' : string +>'0.1' : "0.1" var r2 = c['.1']; >r2 : Object >c['.1'] : Object >c : C ->'.1' : string +>'.1' : ".1" var r3 = c['1']; >r3 : number >c['1'] : number >c : C ->'1' : string +>'1' : "1" var r3 = c[1]; >r3 : number @@ -56,7 +56,7 @@ var r4 = c['1.']; >r4 : string >c['1.'] : string >c : C ->'1.' : string +>'1.' : "1." var r3 = c[1.]; // same as indexing by 1 when done numerically >r3 : number @@ -68,13 +68,13 @@ var r5 = c['1..']; >r5 : boolean >c['1..'] : boolean >c : C ->'1..' : string +>'1..' : "1.." var r6 = c['1.0']; >r6 : Date >c['1.0'] : Date >c : C ->'1.0' : string +>'1.0' : "1.0" var r3 = c[1.0]; // same as indexing by 1 when done numerically >r3 : number @@ -101,13 +101,13 @@ var r8 = i["-1.0"]; >r8 : RegExp >i["-1.0"] : RegExp >i : I ->"-1.0" : string +>"-1.0" : "-1.0" var r9 = i["-1"]; >r9 : Date >i["-1"] : Date >i : I ->"-1" : string +>"-1" : "-1" var r10 = i[0x1] >r10 : number @@ -163,19 +163,19 @@ var r1 = i['0.1']; >r1 : void >i['0.1'] : void >i : I ->'0.1' : string +>'0.1' : "0.1" var r2 = i['.1']; >r2 : Object >i['.1'] : Object >i : I ->'.1' : string +>'.1' : ".1" var r3 = i['1']; >r3 : number >i['1'] : number >i : I ->'1' : string +>'1' : "1" var r3 = c[1]; >r3 : number @@ -187,7 +187,7 @@ var r4 = i['1.']; >r4 : string >i['1.'] : string >i : I ->'1.' : string +>'1.' : "1." var r3 = c[1.]; // same as indexing by 1 when done numerically >r3 : number @@ -199,13 +199,13 @@ var r5 = i['1..']; >r5 : boolean >i['1..'] : boolean >i : I ->'1..' : string +>'1..' : "1.." var r6 = i['1.0']; >r6 : Date >i['1.0'] : Date >i : I ->'1.0' : string +>'1.0' : "1.0" var r3 = c[1.0]; // same as indexing by 1 when done numerically >r3 : number @@ -232,13 +232,13 @@ var r8 = i["-1.0"]; >r8 : RegExp >i["-1.0"] : RegExp >i : I ->"-1.0" : string +>"-1.0" : "-1.0" var r9 = i["-1"]; >r9 : Date >i["-1"] : Date >i : I ->"-1" : string +>"-1" : "-1" var r10 = i[0x1] >r10 : number @@ -290,19 +290,19 @@ var r1 = a['0.1']; >r1 : void >a['0.1'] : void >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'0.1' : string +>'0.1' : "0.1" var r2 = a['.1']; >r2 : Object >a['.1'] : Object >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'.1' : string +>'.1' : ".1" var r3 = a['1']; >r3 : number >a['1'] : number >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'1' : string +>'1' : "1" var r3 = c[1]; >r3 : number @@ -314,7 +314,7 @@ var r4 = a['1.']; >r4 : string >a['1.'] : string >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'1.' : string +>'1.' : "1." var r3 = c[1.]; // same as indexing by 1 when done numerically >r3 : number @@ -326,13 +326,13 @@ var r5 = a['1..']; >r5 : boolean >a['1..'] : boolean >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'1..' : string +>'1..' : "1.." var r6 = a['1.0']; >r6 : Date >a['1.0'] : Date >a : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": Date; } ->'1.0' : string +>'1.0' : "1.0" var r3 = c[1.0]; // same as indexing by 1 when done numerically >r3 : number @@ -359,13 +359,13 @@ var r8 = i["-1.0"]; >r8 : RegExp >i["-1.0"] : RegExp >i : I ->"-1.0" : string +>"-1.0" : "-1.0" var r9 = i["-1"]; >r9 : Date >i["-1"] : Date >i : I ->"-1" : string +>"-1" : "-1" var r10 = i[0x1] >r10 : number @@ -395,7 +395,7 @@ var r13 = i[-01] var b = { >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->{ "0.1": null, ".1": new Object(), "1": 1, "1.": "", "1..": true, "1.0": new Date(), "-1.0": /123/, "-1": Date} : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } +>{ "0.1": null, ".1": new Object(), "1": 1, "1.": "", "1..": true, "1.0": new Date(), "-1.0": /123/, "-1": Date} : { "1": number; "0.1": void; ".1": Object; "1.": ""; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } "0.1": null, >null : void @@ -409,7 +409,7 @@ var b = { >1 : number "1.": "", ->"" : string +>"" : "" "1..": true, >true : boolean @@ -430,19 +430,19 @@ var r1 = b['0.1']; >r1 : void >b['0.1'] : void >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'0.1' : string +>'0.1' : "0.1" var r2 = b['.1']; >r2 : Object >b['.1'] : Object >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'.1' : string +>'.1' : ".1" var r3 = b['1']; >r3 : number >b['1'] : number >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'1' : string +>'1' : "1" var r3 = c[1]; >r3 : number @@ -454,7 +454,7 @@ var r4 = b['1.']; >r4 : string >b['1.'] : string >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'1.' : string +>'1.' : "1." var r3 = c[1.]; // same as indexing by 1 when done numerically >r3 : number @@ -466,13 +466,13 @@ var r5 = b['1..']; >r5 : boolean >b['1..'] : boolean >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'1..' : string +>'1..' : "1.." var r6 = b['1.0']; >r6 : Date >b['1.0'] : Date >b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; } ->'1.0' : string +>'1.0' : "1.0" var r3 = c[1.0]; // same as indexing by 1 when done numerically >r3 : number @@ -499,13 +499,13 @@ var r8 = i["-1.0"]; >r8 : RegExp >i["-1.0"] : RegExp >i : I ->"-1.0" : string +>"-1.0" : "-1.0" var r9 = i["-1"]; >r9 : Date >i["-1"] : Date >i : I ->"-1" : string +>"-1" : "-1" var r10 = i[0x1] >r10 : number diff --git a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.types b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.types index b676d284e7000..4e59b096c53cd 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.types +++ b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.types @@ -17,26 +17,26 @@ var r = c[" "]; >r : number >c[" "] : number >c : C ->" " : string +>" " : " " var r2 = c[" "]; >r2 : any >c[" "] : any >c : C ->" " : string +>" " : " " var r3 = c["a b"]; >r3 : string >c["a b"] : string >c : C ->"a b" : string +>"a b" : "a b" // BUG 817263 var r4 = c["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : number >c["~!@#$%^&*()_+{}|:'<>?\/.,`"] : number >c : C ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : string +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : "~!@#$%^&*()_+{}|:'<>?/.,`" interface I { >I : I @@ -54,26 +54,26 @@ var r = i[" "]; >r : number >i[" "] : number >i : I ->" " : string +>" " : " " var r2 = i[" "]; >r2 : any >i[" "] : any >i : I ->" " : string +>" " : " " var r3 = i["a b"]; >r3 : string >i["a b"] : string >i : I ->"a b" : string +>"a b" : "a b" // BUG 817263 var r4 = i["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : number >i["~!@#$%^&*()_+{}|:'<>?\/.,`"] : number >i : I ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : string +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : "~!@#$%^&*()_+{}|:'<>?/.,`" var a: { @@ -88,36 +88,36 @@ var r = a[" "]; >r : number >a[" "] : number >a : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->" " : string +>" " : " " var r2 = a[" "]; >r2 : any >a[" "] : any >a : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->" " : string +>" " : " " var r3 = a["a b"]; >r3 : string >a["a b"] : string >a : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->"a b" : string +>"a b" : "a b" // BUG 817263 var r4 = a["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : number >a["~!@#$%^&*()_+{}|:'<>?\/.,`"] : number >a : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : string +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : "~!@#$%^&*()_+{}|:'<>?/.,`" var b = { >b : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->{ " ": 1, "a b": "", "~!@#$%^&*()_+{}|:'<>?\/.,`": 1,} : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } +>{ " ": 1, "a b": "", "~!@#$%^&*()_+{}|:'<>?\/.,`": 1,} : { " ": number; "a b": ""; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } " ": 1, >1 : number "a b": "", ->"" : string +>"" : "" "~!@#$%^&*()_+{}|:'<>?\/.,`": 1, >1 : number @@ -127,24 +127,24 @@ var r = b[" "]; >r : number >b[" "] : number >b : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->" " : string +>" " : " " var r2 = b[" "]; >r2 : any >b[" "] : any >b : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->" " : string +>" " : " " var r3 = b["a b"]; >r3 : string >b["a b"] : string >b : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->"a b" : string +>"a b" : "a b" // BUG 817263 var r4 = b["~!@#$%^&*()_+{}|:'<>?\/.,`"]; >r4 : number >b["~!@#$%^&*()_+{}|:'<>?\/.,`"] : number >b : { " ": number; "a b": string; "~!@#$%^&*()_+{}|:'<>?\/.,`": number; } ->"~!@#$%^&*()_+{}|:'<>?\/.,`" : string +>"~!@#$%^&*()_+{}|:'<>?\/.,`" : "~!@#$%^&*()_+{}|:'<>?/.,`" diff --git a/tests/baselines/reference/objectTypesIdentity.types b/tests/baselines/reference/objectTypesIdentity.types index 3491682954ae7..04fbe5c3a1c3a 100644 --- a/tests/baselines/reference/objectTypesIdentity.types +++ b/tests/baselines/reference/objectTypesIdentity.types @@ -37,9 +37,9 @@ var a: { foo: string; } var b = { foo: '' }; >b : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types index 545e2376bb34b..86a2ebec7c92e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types @@ -60,7 +60,7 @@ var b = { foo(x: string) { return ''; } }; >{ foo(x: string) { return ''; } } : { foo(x: string): string; } >foo : (x: string) => string >x : string ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types index 378c5c4fa0cc8..12ebec233aa43 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types @@ -62,7 +62,7 @@ var b = { foo(x: RegExp) { return ''; } }; >foo : (x: RegExp) => string >x : RegExp >RegExp : RegExp ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types index 62426cb033338..7808037fd70e9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types @@ -64,7 +64,7 @@ var b = { foo(x: string) { return ''; } }; >{ foo(x: string) { return ''; } } : { foo(x: string): string; } >foo : (x: string) => string >x : string ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types index edaad51b32ea7..ea89bbc059e30 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types @@ -110,7 +110,7 @@ var b = { >foo : (x: any) => any >x : any >'' : any ->'' : string +>'' : "" }; diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types index 2e5e7231721ea..4dd31ec26d346 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types @@ -47,7 +47,7 @@ var b = { new(x: RegExp) { return ''; } }; // not a construct signature, functio >new : (x: RegExp) => string >x : RegExp >RegExp : RegExp ->'' : string +>'' : "" function foo1b(x: B); >foo1b : { (x: B): any; (x: B): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types index b7f5995395912..b7d4b42a83e29 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types @@ -49,7 +49,7 @@ var b = { new(x: string) { return ''; } }; // not a construct signature, functio >{ new(x: string) { return ''; } } : { new(x: string): string; } >new : (x: string) => string >x : string ->'' : string +>'' : "" function foo1b(x: B); >foo1b : { (x: B): any; (x: B): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types index 90ed7fd094537..33598fe815f11 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types @@ -77,7 +77,7 @@ var b = { foo(x: T) { return ''; } }; >RegExp : RegExp >x : T >T : T ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.types index 4974b0874eba2..265dd91784b75 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.types @@ -121,7 +121,7 @@ var b = { foo(x: T, y: U) { return ''; } }; >T : T >y : U >U : U ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.types index b5c2f6bdef0e8..89d0ceb2c73b7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.types @@ -155,7 +155,7 @@ var b = { foo(x: T, y: U) { return ''; } }; >T : T >y : U >U : U ->'' : string +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types index ef3ec91f479c5..40c1733a1e166 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types @@ -60,7 +60,7 @@ var b = { new(x: T) { return ''; } }; // not a construct signa >RegExp : RegExp >x : T >T : T ->'' : string +>'' : "" function foo1b(x: B>); >foo1b : { (x: B): any; (x: B): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types index b1d1d79ac0582..2c2145658097e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types @@ -99,7 +99,7 @@ var b = { new(x: T, y: U) { return ''; } }; // no >T : T >y : U >U : U ->'' : string +>'' : "" function foo1b(x: B, Array>); >foo1b : { (x: B): any; (x: B): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types index d8109a6a826fa..6b3dab83ded85 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types @@ -133,7 +133,7 @@ var b = { new(x: T, y: U) { return ''; } }; // not a >T : T >y : U >U : U ->'' : string +>'' : "" function foo1b(x: B); >foo1b : { (x: B): any; (x: B): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types index 2284d06ffbd0f..c8bbf5514cf7d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types @@ -50,9 +50,9 @@ var a: { var b: { [x: number]: string; } = { foo: '' }; >b : { [x: number]: string; } >x : number ->{ foo: '' } : { [x: number]: undefined; foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { [x: number]: undefined; foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types index ae384bbb4db36..ca07792999e58 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types @@ -50,9 +50,9 @@ var a: { var b: { [x: number]: string; } = { foo: '' }; >b : { [x: number]: string; } >x : number ->{ foo: '' } : { [x: number]: undefined; foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { [x: number]: undefined; foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.types b/tests/baselines/reference/objectTypesIdentityWithOptionality.types index bab319f359857..c9522a7a2fac6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.types +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.types @@ -37,9 +37,9 @@ var a: { foo?: string; } var b = { foo: '' }; >b : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" function foo2(x: I); >foo2 : { (x: I): any; (x: I): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.types b/tests/baselines/reference/objectTypesIdentityWithPrivates.types index c828f45ac5ab2..d2701aa727570 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.types +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.types @@ -47,9 +47,9 @@ var a: { foo: string; } var b = { foo: '' }; >b : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.types b/tests/baselines/reference/objectTypesIdentityWithPublics.types index daae624a7d146..1d8b636b76c7a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.types +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.types @@ -37,9 +37,9 @@ var a: { foo: string; } var b = { foo: '' }; >b : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types index a7eeb67250477..bffb72683331f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types @@ -50,9 +50,9 @@ var a: { var b: { [x: string]: string; } = { foo: '' }; >b : { [x: string]: string; } >x : string ->{ foo: '' } : { [x: string]: string; foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { [x: string]: ""; foo: ""; } +>foo : "" +>'' : "" function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; } diff --git a/tests/baselines/reference/octalIntegerLiteral.types b/tests/baselines/reference/octalIntegerLiteral.types index 8352e5fac0c3e..7aaabc6fe852d 100644 --- a/tests/baselines/reference/octalIntegerLiteral.types +++ b/tests/baselines/reference/octalIntegerLiteral.types @@ -17,10 +17,10 @@ var oct4 = 0o7777777777777777777777777777777777777777777777777777777777777777777 var obj1 = { >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->{ 0o45436: "Hello", a: 0o45436, b: oct1, oct1, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true} : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } +>{ 0o45436: "Hello", a: 0o45436, b: oct1, oct1, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true} : { 0o45436: "Hello"; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } 0o45436: "Hello", ->"Hello" : string +>"Hello" : "Hello" a: 0o45436, >a : number @@ -39,10 +39,10 @@ var obj1 = { var obj2 = { >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->{ 0O45436: "hi", a: 0O45436, b: oct2, oct2, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false,} : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } +>{ 0O45436: "hi", a: 0O45436, b: oct2, oct2, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false,} : { 0O45436: "hi"; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } 0O45436: "hi", ->"hi" : string +>"hi" : "hi" a: 0O45436, >a : number @@ -67,12 +67,12 @@ obj1[0o45436]; // string obj1["0o45436"]; // any >obj1["0o45436"] : any >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"0o45436" : string +>"0o45436" : "0o45436" obj1["19230"]; // string >obj1["19230"] : string >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"19230" : string +>"19230" : "19230" obj1[19230]; // string >obj1[19230] : string @@ -82,22 +82,22 @@ obj1[19230]; // string obj1["a"]; // number >obj1["a"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"a" : string +>"a" : "a" obj1["b"]; // number >obj1["b"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"b" : string +>"b" : "b" obj1["oct1"]; // number >obj1["oct1"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"oct1" : string +>"oct1" : "oct1" obj1["Infinity"]; // boolean >obj1["Infinity"] : boolean >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" obj2[0O45436]; // string >obj2[0O45436] : string @@ -107,12 +107,12 @@ obj2[0O45436]; // string obj2["0O45436"]; // any >obj2["0O45436"] : any >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"0O45436" : string +>"0O45436" : "0O45436" obj2["19230"]; // string >obj2["19230"] : string >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"19230" : string +>"19230" : "19230" obj2[19230]; // string >obj2[19230] : string @@ -122,17 +122,17 @@ obj2[19230]; // string obj2["a"]; // number >obj2["a"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"a" : string +>"a" : "a" obj2["b"]; // number >obj2["b"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"b" : string +>"b" : "b" obj2["oct2"]; // number >obj2["oct2"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"oct2" : string +>"oct2" : "oct2" obj2[5.462437423415177e+244]; // boolean >obj2[5.462437423415177e+244] : boolean @@ -142,10 +142,10 @@ obj2[5.462437423415177e+244]; // boolean obj2["5.462437423415177e+244"]; // boolean >obj2["5.462437423415177e+244"] : boolean >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"5.462437423415177e+244" : string +>"5.462437423415177e+244" : "5.462437423415177e+244" obj2["Infinity"]; // any >obj2["Infinity"] : any >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" diff --git a/tests/baselines/reference/octalIntegerLiteralES6.types b/tests/baselines/reference/octalIntegerLiteralES6.types index 7ef32b4928933..c0c979183d606 100644 --- a/tests/baselines/reference/octalIntegerLiteralES6.types +++ b/tests/baselines/reference/octalIntegerLiteralES6.types @@ -17,10 +17,10 @@ var oct4 = 0o7777777777777777777777777777777777777777777777777777777777777777777 var obj1 = { >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->{ 0o45436: "Hello", a: 0o45436, b: oct1, oct1, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true} : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } +>{ 0o45436: "Hello", a: 0o45436, b: oct1, oct1, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true} : { 0o45436: "Hello"; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } 0o45436: "Hello", ->"Hello" : string +>"Hello" : "Hello" a: 0o45436, >a : number @@ -39,10 +39,10 @@ var obj1 = { var obj2 = { >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->{ 0O45436: "hi", a: 0O45436, b: oct2, oct2, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false,} : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } +>{ 0O45436: "hi", a: 0O45436, b: oct2, oct2, 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false,} : { 0O45436: "hi"; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } 0O45436: "hi", ->"hi" : string +>"hi" : "hi" a: 0O45436, >a : number @@ -67,12 +67,12 @@ obj1[0o45436]; // string obj1["0o45436"]; // any >obj1["0o45436"] : any >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"0o45436" : string +>"0o45436" : "0o45436" obj1["19230"]; // string >obj1["19230"] : string >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"19230" : string +>"19230" : "19230" obj1[19230]; // string >obj1[19230] : string @@ -82,22 +82,22 @@ obj1[19230]; // string obj1["a"]; // number >obj1["a"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"a" : string +>"a" : "a" obj1["b"]; // number >obj1["b"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"b" : string +>"b" : "b" obj1["oct1"]; // number >obj1["oct1"] : number >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"oct1" : string +>"oct1" : "oct1" obj1["Infinity"]; // boolean >obj1["Infinity"] : boolean >obj1 : { 0o45436: string; a: number; b: number; oct1: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" obj2[0O45436]; // string >obj2[0O45436] : string @@ -107,12 +107,12 @@ obj2[0O45436]; // string obj2["0O45436"]; // any >obj2["0O45436"] : any >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"0O45436" : string +>"0O45436" : "0O45436" obj2["19230"]; // string >obj2["19230"] : string >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"19230" : string +>"19230" : "19230" obj2[19230]; // string >obj2[19230] : string @@ -122,17 +122,17 @@ obj2[19230]; // string obj2["a"]; // number >obj2["a"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"a" : string +>"a" : "a" obj2["b"]; // number >obj2["b"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"b" : string +>"b" : "b" obj2["oct2"]; // number >obj2["oct2"] : number >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"oct2" : string +>"oct2" : "oct2" obj2[5.462437423415177e+244]; // boolean >obj2[5.462437423415177e+244] : boolean @@ -142,10 +142,10 @@ obj2[5.462437423415177e+244]; // boolean obj2["5.462437423415177e+244"]; // boolean >obj2["5.462437423415177e+244"] : boolean >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"5.462437423415177e+244" : string +>"5.462437423415177e+244" : "5.462437423415177e+244" obj2["Infinity"]; // any >obj2["Infinity"] : any >obj2 : { 0O45436: string; a: number; b: number; oct2: number; 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: boolean; } ->"Infinity" : string +>"Infinity" : "Infinity" diff --git a/tests/baselines/reference/optionalAccessorsInInterface1.types b/tests/baselines/reference/optionalAccessorsInInterface1.types index d030849e55433..ae642edbc4098 100644 --- a/tests/baselines/reference/optionalAccessorsInInterface1.types +++ b/tests/baselines/reference/optionalAccessorsInInterface1.types @@ -21,7 +21,7 @@ defineMyProperty({}, "name", { get: function () { return 5; } }); >defineMyProperty({}, "name", { get: function () { return 5; } }) : any >defineMyProperty : (o: any, p: string, attributes: MyPropertyDescriptor) => any >{} : {} ->"name" : string +>"name" : "name" >{ get: function () { return 5; } } : { get: () => number; } >get : () => number >function () { return 5; } : () => number @@ -49,7 +49,7 @@ defineMyProperty2({}, "name", { get: function () { return 5; } }); >defineMyProperty2({}, "name", { get: function () { return 5; } }) : any >defineMyProperty2 : (o: any, p: string, attributes: MyPropertyDescriptor2) => any >{} : {} ->"name" : string +>"name" : "name" >{ get: function () { return 5; } } : { get: () => number; } >get : () => number >function () { return 5; } : () => number diff --git a/tests/baselines/reference/overloadCallTest.types b/tests/baselines/reference/overloadCallTest.types index bd71931197560..8b35c56bf576a 100644 --- a/tests/baselines/reference/overloadCallTest.types +++ b/tests/baselines/reference/overloadCallTest.types @@ -13,13 +13,13 @@ class foo { function bar(foo?: string) { return "foo" }; >bar : { (): string; (s: string): any; } >foo : string ->"foo" : string +>"foo" : "foo" var test = bar("test"); >test : any >bar("test") : any >bar : { (): string; (s: string): any; } ->"test" : string +>"test" : "test" var goo = bar(); >goo : string @@ -31,7 +31,7 @@ class foo { >goo : string >bar("test") : any >bar : { (): string; (s: string): any; } ->"test" : string +>"test" : "test" } } diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types index 066015389d220..3a8758fefd267 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types @@ -36,7 +36,7 @@ module Bugs { >args[index] : any >args : any[] >index : any ->'undefined' : string +>'undefined' : "undefined" ? args[index] >args[index] : any @@ -58,7 +58,7 @@ function bug3(f:(x:string)=>string) { return f("s") } >x : string >f("s") : string >f : (x: string) => string ->"s" : string +>"s" : "s" function fprime(x:string):string { return x; } >fprime : (x: string) => string diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types index e6ff0cda468dc..ce8ce3f3308e3 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types @@ -44,11 +44,11 @@ module Bugs { >tokens.push : (...items: IToken[]) => number >tokens : IToken[] >push : (...items: IToken[]) => number ->{ startIndex: 1, type: '', bracket: 3 } : { startIndex: number; type: string; bracket: number; } +>{ startIndex: 1, type: '', bracket: 3 } : { startIndex: number; type: ""; bracket: number; } >startIndex : number >1 : number ->type : string ->'' : string +>type : "" +>'' : "" >bracket : number >3 : number @@ -59,12 +59,12 @@ module Bugs { >push : (...items: IToken[]) => number >({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 }) : IToken >IToken : IToken ->({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 }) : { startIndex: number; type: string; bracket: number; state: null; length: number; } ->{ startIndex: 1, type: '', bracket: 3, state: null, length: 10 } : { startIndex: number; type: string; bracket: number; state: null; length: number; } +>({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 }) : { startIndex: number; type: ""; bracket: number; state: null; length: number; } +>{ startIndex: 1, type: '', bracket: 3, state: null, length: 10 } : { startIndex: number; type: ""; bracket: number; state: null; length: number; } >startIndex : number >1 : number ->type : string ->'' : string +>type : "" +>'' : "" >bracket : number >3 : number >state : null diff --git a/tests/baselines/reference/overloadResolutionWithAny.types b/tests/baselines/reference/overloadResolutionWithAny.types index e66368d355441..c8eb1399cb2b2 100644 --- a/tests/baselines/reference/overloadResolutionWithAny.types +++ b/tests/baselines/reference/overloadResolutionWithAny.types @@ -13,7 +13,7 @@ var func: { func(""); // number >func("") : number >func : { (s: string): number; (s: any): string; } ->"" : string +>"" : "" func(3); // string >func(3) : string @@ -58,18 +58,18 @@ func2(x, x); // string func2("", ""); // number >func2("", "") : number >func2 : { (s: string, t: string): number; (s: any, t: string): boolean; (s: string, t: any): RegExp; (s: any, t: any): string; } ->"" : string ->"" : string +>"" : "" +>"" : "" func2(x, ""); // boolean >func2(x, "") : boolean >func2 : { (s: string, t: string): number; (s: any, t: string): boolean; (s: string, t: any): RegExp; (s: any, t: any): string; } >x : any ->"" : string +>"" : "" func2("", x); // RegExp >func2("", x) : RegExp >func2 : { (s: string, t: string): number; (s: any, t: string): boolean; (s: string, t: any): RegExp; (s: any, t: any): string; } ->"" : string +>"" : "" >x : any diff --git a/tests/baselines/reference/overloadReturnTypes.types b/tests/baselines/reference/overloadReturnTypes.types index 3de1aec1196c6..c0f573fb98074 100644 --- a/tests/baselines/reference/overloadReturnTypes.types +++ b/tests/baselines/reference/overloadReturnTypes.types @@ -28,7 +28,7 @@ function attr(nameOrMap: any, value?: string): any { >typeof nameOrMap === "object" : boolean >typeof nameOrMap : string >nameOrMap : any ->"object" : string +>"object" : "object" // handle map case return new Accessor; @@ -38,7 +38,7 @@ function attr(nameOrMap: any, value?: string): any { else { // handle string case return "s"; ->"s" : string +>"s" : "s" } } diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArity.types b/tests/baselines/reference/overloadsAndTypeArgumentArity.types index b69f394e83d17..bd86c19beb965 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArity.types +++ b/tests/baselines/reference/overloadsAndTypeArgumentArity.types @@ -24,10 +24,10 @@ declare function Callbacks(flags?: string): void; Callbacks('s'); // no error >Callbacks('s') : void >Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } ->'s' : string +>'s' : "s" new Callbacks('s'); // no error >new Callbacks('s') : any >Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } ->'s' : string +>'s' : "s" diff --git a/tests/baselines/reference/overloadsWithConstraints.types b/tests/baselines/reference/overloadsWithConstraints.types index b045904ece5bb..87974482f4348 100644 --- a/tests/baselines/reference/overloadsWithConstraints.types +++ b/tests/baselines/reference/overloadsWithConstraints.types @@ -19,5 +19,5 @@ var v = f(""); >v : string >f("") : string >f : { (x: T): T; (x: T): T; } ->"" : string +>"" : "" diff --git a/tests/baselines/reference/parser630933.types b/tests/baselines/reference/parser630933.types index 3f991f58d3076..9a0ba9e720548 100644 --- a/tests/baselines/reference/parser630933.types +++ b/tests/baselines/reference/parser630933.types @@ -1,7 +1,7 @@ === tests/cases/conformance/parser/ecmascript5/RegressionTests/parser630933.ts === var a = "Hello"; >a : string ->"Hello" : string +>"Hello" : "Hello" var b = a.match(/\/ver=([^/]+)/); >b : RegExpMatchArray diff --git a/tests/baselines/reference/parserInterfaceKeywordInEnum1.types b/tests/baselines/reference/parserInterfaceKeywordInEnum1.types index f6b613f3f6085..57c4ef2ebec74 100644 --- a/tests/baselines/reference/parserInterfaceKeywordInEnum1.types +++ b/tests/baselines/reference/parserInterfaceKeywordInEnum1.types @@ -1,6 +1,6 @@ === tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserInterfaceKeywordInEnum1.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" enum Bar { >Bar : Bar diff --git a/tests/baselines/reference/parserModuleDeclaration11.types b/tests/baselines/reference/parserModuleDeclaration11.types index 98075a505f796..21d9f0803eac4 100644 --- a/tests/baselines/reference/parserModuleDeclaration11.types +++ b/tests/baselines/reference/parserModuleDeclaration11.types @@ -14,7 +14,7 @@ string.foo("abc"); >string.foo : (s: string) => any >string : typeof string >foo : (s: string) => any ->"abc" : string +>"abc" : "abc" var x: string.X; >x : string.X diff --git a/tests/baselines/reference/parserStrictMode16.types b/tests/baselines/reference/parserStrictMode16.types index a7a68ab781143..bb48fd0551198 100644 --- a/tests/baselines/reference/parserStrictMode16.types +++ b/tests/baselines/reference/parserStrictMode16.types @@ -1,6 +1,6 @@ === tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts === "use strict"; ->"use strict" : string +>"use strict" : "use strict" delete this; >delete this : boolean @@ -16,5 +16,5 @@ delete null; delete "a"; >delete "a" : boolean ->"a" : string +>"a" : "a" diff --git a/tests/baselines/reference/parserSymbolProperty6.types b/tests/baselines/reference/parserSymbolProperty6.types index a802765cb4f30..13553eb27c6cf 100644 --- a/tests/baselines/reference/parserSymbolProperty6.types +++ b/tests/baselines/reference/parserSymbolProperty6.types @@ -6,5 +6,5 @@ class C { >Symbol.toStringTag : symbol >Symbol : SymbolConstructor >toStringTag : symbol ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/plusOperatorWithEnumType.types b/tests/baselines/reference/plusOperatorWithEnumType.types index e6dd769900e48..921cb794b05e0 100644 --- a/tests/baselines/reference/plusOperatorWithEnumType.types +++ b/tests/baselines/reference/plusOperatorWithEnumType.types @@ -26,7 +26,7 @@ var ResultIsNumber3 = +ENUM1["A"]; >+ENUM1["A"] : number >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" var ResultIsNumber4 = +(ENUM[0] + ENUM1["B"]); >ResultIsNumber4 : number @@ -38,7 +38,7 @@ var ResultIsNumber4 = +(ENUM[0] + ENUM1["B"]); >0 : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" // miss assignment operators +ENUM; diff --git a/tests/baselines/reference/plusOperatorWithStringType.types b/tests/baselines/reference/plusOperatorWithStringType.types index c285a88c5d9c8..ad363970e6d1b 100644 --- a/tests/baselines/reference/plusOperatorWithStringType.types +++ b/tests/baselines/reference/plusOperatorWithStringType.types @@ -5,13 +5,13 @@ var STRING: string; var STRING1: string[] = ["", "abc"]; >STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string +>["", "abc"] : ("" | "abc")[] +>"" : "" +>"abc" : "abc" function foo(): string { return "abc"; } >foo : () => string ->"abc" : string +>"abc" : "abc" class A { >A : A @@ -21,7 +21,7 @@ class A { static foo() { return ""; } >foo : () => string ->"" : string +>"" : "" } module M { >M : typeof M @@ -50,23 +50,23 @@ var ResultIsNumber2 = +STRING1; var ResultIsNumber3 = +""; >ResultIsNumber3 : number >+"" : number ->"" : string +>"" : "" var ResultIsNumber4 = +{ x: "", y: "" }; >ResultIsNumber4 : number >+{ x: "", y: "" } : number ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string +>{ x: "", y: "" } : { x: ""; y: ""; } +>x : "" +>"" : "" +>y : "" +>"" : "" var ResultIsNumber5 = +{ x: "", y: (s: string) => { return s; } }; >ResultIsNumber5 : number >+{ x: "", y: (s: string) => { return s; } } : number ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string +>{ x: "", y: (s: string) => { return s; } } : { x: ""; y: (s: string) => string; } +>x : "" +>"" : "" >y : (s: string) => string >(s: string) => { return s; } : (s: string) => string >s : string @@ -128,7 +128,7 @@ var ResultIsNumber12 = +STRING.charAt(0); // miss assignment operators +""; >+"" : number ->"" : string +>"" : "" +STRING; >+STRING : number diff --git a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.types b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.types index ce785983ce87f..fcb0a27388bcc 100644 --- a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.types +++ b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.types @@ -24,6 +24,6 @@ module Foo { export var x = "hello"; >x : string ->"hello" : string +>"hello" : "hello" } diff --git a/tests/baselines/reference/promiseChaining.types b/tests/baselines/reference/promiseChaining.types index 23a8b276fdc1a..fa40d8b68fc7e 100644 --- a/tests/baselines/reference/promiseChaining.types +++ b/tests/baselines/reference/promiseChaining.types @@ -42,7 +42,7 @@ class Chain { >then : (cb: (x: S) => S) => Chain >x => "abc" : (x: S) => string >x : S ->"abc" : string +>"abc" : "abc" >then : (cb: (x: string) => S) => Chain >x => x.length : (x: string) => number >x : string diff --git a/tests/baselines/reference/promiseTypeInference.types b/tests/baselines/reference/promiseTypeInference.types index 2789f71087679..f3026c68f2123 100644 --- a/tests/baselines/reference/promiseTypeInference.types +++ b/tests/baselines/reference/promiseTypeInference.types @@ -45,7 +45,7 @@ var $$x = load("something").then(s => convert(s)); >load("something").then : (success?: (value: string) => Promise) => Promise >load("something") : Promise >load : (name: string) => Promise ->"something" : string +>"something" : "something" >then : (success?: (value: string) => Promise) => Promise >s => convert(s) : (s: string) => IPromise >s : string diff --git a/tests/baselines/reference/promiseVoidErrorCallback.types b/tests/baselines/reference/promiseVoidErrorCallback.types index 82b248f64bdb8..5cca176a20e67 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.types +++ b/tests/baselines/reference/promiseVoidErrorCallback.types @@ -30,9 +30,9 @@ function f1(): Promise { >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } >Promise : PromiseConstructor >resolve : { (value: T | PromiseLike): Promise; (): Promise; } ->{ __t1: "foo_t1" } : { __t1: string; } ->__t1 : string ->"foo_t1" : string +>{ __t1: "foo_t1" } : { __t1: "foo_t1"; } +>__t1 : "foo_t1" +>"foo_t1" : "foo_t1" } function f2(x: T1): T2 { @@ -48,7 +48,7 @@ function f2(x: T1): T2 { >x.__t1 : string >x : T1 >__t1 : string ->":foo_21" : string +>":foo_21" : ":foo_21" } var x3 = f1() @@ -84,6 +84,6 @@ var x3 = f1() >x.__t2 : string >x : T2 >__t2 : string ->"bar" : string +>"bar" : "bar" }); diff --git a/tests/baselines/reference/propagationOfPromiseInitialization.types b/tests/baselines/reference/propagationOfPromiseInitialization.types index bd100f75b3e6b..c9933f1837a71 100644 --- a/tests/baselines/reference/propagationOfPromiseInitialization.types +++ b/tests/baselines/reference/propagationOfPromiseInitialization.types @@ -33,7 +33,7 @@ foo.then((x) => { // x is inferred to be a number return "asdf"; ->"asdf" : string +>"asdf" : "asdf" }).then((x) => { >then : (successCallback: (promiseValue: string) => TResult, errorCallback?: (reason: any) => TResult) => IPromise diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.types index d808cddef8338..5faaf4d021639 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.types @@ -19,7 +19,7 @@ class C { >x['getDate']() : number >x['getDate'] : () => number >x : T ->'getDate' : string +>'getDate' : "getDate" return a + x.getDate(); >a + x.getDate() : number @@ -71,7 +71,7 @@ var r2b = i.foo['getDate'](); >i.foo : Date >i : I >foo : Date ->'getDate' : string +>'getDate' : "getDate" var a: { >a : () => T @@ -96,7 +96,7 @@ var r3b = a()['getDate'](); >a()['getDate'] : () => number >a() : Date >a : () => T ->'getDate' : string +>'getDate' : "getDate" var b = { >b : { foo: (x: T) => number; } @@ -115,7 +115,7 @@ var b = { >x['getDate']() : number >x['getDate'] : () => number >x : T ->'getDate' : string +>'getDate' : "getDate" return a + x.getDate(); >a + x.getDate() : number diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types index 9ea015cc9ce2d..ad2ba3e829dc7 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.types @@ -6,7 +6,7 @@ class A { foo(): string { return ''; } >foo : () => string ->'' : string +>'' : "" } class B extends A { @@ -17,7 +17,7 @@ class B extends A { >bar : () => string return ''; ->'' : string +>'' : "" } } @@ -40,7 +40,7 @@ class C { >x['foo']() : string >x['foo'] : () => string >x : U ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string @@ -61,7 +61,7 @@ class C { >x['foo']() : string >x['foo'] : () => string >x : U ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string @@ -145,7 +145,7 @@ var r2b = i.foo['foo'](); >i.foo : B >i : I >foo : B ->'foo' : string +>'foo' : "foo" var a: { >a : { (): U; (x: U): U; (x: U, y: T): U; } @@ -198,7 +198,7 @@ var r3b = a()['foo'](); >a()['foo'] : () => string >a() : A >a : { (): U; (x: U): U; (x: U, y: T): U; } ->'foo' : string +>'foo' : "foo" // parameter supplied for type argument inference to succeed var aB = new B(); @@ -224,7 +224,7 @@ var r3d = a(aB, aB)['foo'](); >a : { (): U; (x: U): U; (x: U, y: T): U; } >aB : B >aB : B ->'foo' : string +>'foo' : "foo" var b = { >b : { foo: (x: U, y: T) => string; } @@ -247,7 +247,7 @@ var b = { >x['foo']() : string >x['foo'] : () => string >x : U ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types index f2423f2bff8c2..30a17935fc11a 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.types @@ -6,7 +6,7 @@ class A { foo(): string { return ''; } >foo : () => string ->'' : string +>'' : "" } class B extends A { @@ -17,7 +17,7 @@ class B extends A { >bar : () => string return ''; ->'' : string +>'' : "" } } @@ -41,7 +41,7 @@ class C { >x['foo']() : string >x['foo'] : () => string >x : T ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string @@ -63,7 +63,7 @@ class C { >x['foo']() : string >x['foo'] : () => string >x : U ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string @@ -132,7 +132,7 @@ var r2b = i.foo['foo'](); >i.foo : B >i : I >foo : B ->'foo' : string +>'foo' : "foo" var a: { >a : { (): T; (x: U): U; } @@ -167,7 +167,7 @@ var r3b = a()['foo'](); >a()['foo'] : () => string >a() : A >a : { (): T; (x: U): U; } ->'foo' : string +>'foo' : "foo" // parameter supplied for type argument inference for U var r3c = a(new B()).foo(); // valid call to an invalid function, U is inferred as B, which has a foo @@ -188,7 +188,7 @@ var r3d = a(new B())['foo'](); // valid call to an invalid function, U is inferr >a : { (): T; (x: U): U; } >new B() : B >B : typeof B ->'foo' : string +>'foo' : "foo" var b = { >b : { foo: (x: T) => string; } @@ -210,7 +210,7 @@ var b = { >x['foo']() : string >x['foo'] : () => string >x : T ->'foo' : string +>'foo' : "foo" return a + x.foo(); >a + x.foo() : string diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.types b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.types index 9d25bebea3719..40df60d02470d 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.types +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.types @@ -15,7 +15,7 @@ class C { >x['toString']() : string >x['toString'] : () => string >x : T ->'toString' : string +>'toString' : "toString" return a + x.toString(); >a + x.toString() : string @@ -64,7 +64,7 @@ var r2b = i.foo['toString'](); >i.foo : number >i : I >foo : number ->'toString' : string +>'toString' : "toString" var a: { >a : () => T @@ -87,7 +87,7 @@ var r3b: string = a()['toString'](); >a()['toString'] : () => string >a() : {} >a : () => T ->'toString' : string +>'toString' : "toString" var b = { >b : { foo: (x: T) => string; } @@ -105,7 +105,7 @@ var b = { >x['toString']() : string >x['toString'] : () => string >x : T ->'toString' : string +>'toString' : "toString" return a + x.toString(); >a + x.toString() : string diff --git a/tests/baselines/reference/propertyNamesWithStringLiteral.types b/tests/baselines/reference/propertyNamesWithStringLiteral.types index 9c3eb5f201540..4e3c9c6080cf9 100644 --- a/tests/baselines/reference/propertyNamesWithStringLiteral.types +++ b/tests/baselines/reference/propertyNamesWithStringLiteral.types @@ -35,7 +35,7 @@ var a = Color.namedColors["azure"]; >Color.namedColors : NamedColors >Color : typeof Color >namedColors : NamedColors ->"azure" : string +>"azure" : "azure" var a = Color.namedColors.blue; // Should not error >a : _Color @@ -51,5 +51,5 @@ var a = Color.namedColors["pale blue"]; // should not error >Color.namedColors : NamedColors >Color : typeof Color >namedColors : NamedColors ->"pale blue" : string +>"pale blue" : "pale blue" diff --git a/tests/baselines/reference/protoAsIndexInIndexExpression.types b/tests/baselines/reference/protoAsIndexInIndexExpression.types index 56650cbf4eb49..fe7f2ca2491e4 100644 --- a/tests/baselines/reference/protoAsIndexInIndexExpression.types +++ b/tests/baselines/reference/protoAsIndexInIndexExpression.types @@ -17,7 +17,7 @@ WorkspacePrototype['__proto__'] = EntityPrototype; >WorkspacePrototype['__proto__'] = EntityPrototype : any >WorkspacePrototype['__proto__'] : any >WorkspacePrototype : { serialize: () => any; } ->'__proto__' : string +>'__proto__' : "___proto__" >EntityPrototype : any var o = { diff --git a/tests/baselines/reference/protoInIndexer.types b/tests/baselines/reference/protoInIndexer.types index bfafc56404ae4..27f1f721fd3b2 100644 --- a/tests/baselines/reference/protoInIndexer.types +++ b/tests/baselines/reference/protoInIndexer.types @@ -7,7 +7,7 @@ class X { >this['__proto__'] = null : null >this['__proto__'] : any >this : this ->'__proto__' : string +>'__proto__' : "___proto__" >null : null } } diff --git a/tests/baselines/reference/prototypeOnConstructorFunctions.types b/tests/baselines/reference/prototypeOnConstructorFunctions.types index 8d1b16e7a21d5..949cb4d7499f5 100644 --- a/tests/baselines/reference/prototypeOnConstructorFunctions.types +++ b/tests/baselines/reference/prototypeOnConstructorFunctions.types @@ -15,7 +15,7 @@ var i: I1; i.const.prototype.prop = "yo"; ->i.const.prototype.prop = "yo" : string +>i.const.prototype.prop = "yo" : "yo" >i.const.prototype.prop : any >i.const.prototype : any >i.const : new (options?: any, element?: any) => any @@ -23,5 +23,5 @@ i.const.prototype.prop = "yo"; >const : new (options?: any, element?: any) => any >prototype : any >prop : any ->"yo" : string +>"yo" : "yo" diff --git a/tests/baselines/reference/quotedPropertyName3.types b/tests/baselines/reference/quotedPropertyName3.types index 7c957372e0dde..f5f1d47bbc822 100644 --- a/tests/baselines/reference/quotedPropertyName3.types +++ b/tests/baselines/reference/quotedPropertyName3.types @@ -11,7 +11,7 @@ class Test { >() => this["prop1"] : () => number >this["prop1"] : number >this : this ->"prop1" : string +>"prop1" : "prop1" var y: number = x(); >y : number diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.types b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.types index 482ec707e49d5..3e74ba7f57b10 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.types +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.types @@ -14,7 +14,7 @@ export class MemberName { public prefix: string = ""; >prefix : string ->"" : string +>"" : "" } export class MemberNameArray extends MemberName { >MemberNameArray : MemberNameArray diff --git a/tests/baselines/reference/recursiveInitializer.types b/tests/baselines/reference/recursiveInitializer.types index f5bc2338902b5..ad6b8059b6cab 100644 --- a/tests/baselines/reference/recursiveInitializer.types +++ b/tests/baselines/reference/recursiveInitializer.types @@ -22,7 +22,7 @@ var s1 = s1 + ''; >s1 : any >s1 + '' : string >s1 : any ->'' : string +>'' : "" var s2 /* any */ = s2 + s2; >s2 : any @@ -39,7 +39,7 @@ var s3 : string = s3 + s3; var s4 = '' + s4; >s4 : any >'' + s4 : string ->'' : string +>'' : "" >s4 : any // boolean unless otherwise specified diff --git a/tests/baselines/reference/regExpWithSlashInCharClass.types b/tests/baselines/reference/regExpWithSlashInCharClass.types index fafe6e1be69b0..e866f2bc22900 100644 --- a/tests/baselines/reference/regExpWithSlashInCharClass.types +++ b/tests/baselines/reference/regExpWithSlashInCharClass.types @@ -3,26 +3,26 @@ var foo1 = "a/".replace(/.[/]/, ""); >foo1 : string >"a/".replace(/.[/]/, "") : string >"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ->"a/" : string +>"a/" : "a/" >replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[/]/ : RegExp ->"" : string +>"" : "" var foo2 = "a//".replace(/.[//]/g, ""); >foo2 : string >"a//".replace(/.[//]/g, "") : string >"a//".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ->"a//" : string +>"a//" : "a//" >replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[//]/g : RegExp ->"" : string +>"" : "" var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix"); >foo3 : string >"a/".replace(/.[/no sleep /till/]/, "bugfix") : string >"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ->"a/" : string +>"a/" : "a/" >replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[/no sleep /till/]/ : RegExp ->"bugfix" : string +>"bugfix" : "bugfix" diff --git a/tests/baselines/reference/requireEmitSemicolon.types b/tests/baselines/reference/requireEmitSemicolon.types index 43ca9ef29c815..541cd67cb856e 100644 --- a/tests/baselines/reference/requireEmitSemicolon.types +++ b/tests/baselines/reference/requireEmitSemicolon.types @@ -23,7 +23,7 @@ export module Database { >P : typeof P >Models : typeof P.Models >Person : typeof P.Models.Person ->"Rock" : string +>"Rock" : "Rock" } } } diff --git a/tests/baselines/reference/restElementWithAssignmentPattern5.types b/tests/baselines/reference/restElementWithAssignmentPattern5.types index e3934c3119721..56abd81503780 100644 --- a/tests/baselines/reference/restElementWithAssignmentPattern5.types +++ b/tests/baselines/reference/restElementWithAssignmentPattern5.types @@ -4,13 +4,13 @@ var s: string, s2: string; >s2 : string [...[s, s2]] = ["", ""]; ->[...[s, s2]] = ["", ""] : string[] +>[...[s, s2]] = ["", ""] : ""[] >[...[s, s2]] : string[] >...[s, s2] : string >[s, s2] : string[] >s : string >s2 : string ->["", ""] : string[] ->"" : string ->"" : string +>["", ""] : ""[] +>"" : "" +>"" : "" diff --git a/tests/baselines/reference/returnStatement1.types b/tests/baselines/reference/returnStatement1.types index b7e166ffa75a9..0c90955104394 100644 --- a/tests/baselines/reference/returnStatement1.types +++ b/tests/baselines/reference/returnStatement1.types @@ -13,6 +13,6 @@ function f() { }; ("harmless extra line"); ->("harmless extra line") : string ->"harmless extra line" : string +>("harmless extra line") : "harmless extra line" +>"harmless extra line" : "harmless extra line" } diff --git a/tests/baselines/reference/returnStatements.types b/tests/baselines/reference/returnStatements.types index e5332b2e6acbd..5998f60ead5a9 100644 --- a/tests/baselines/reference/returnStatements.types +++ b/tests/baselines/reference/returnStatements.types @@ -6,7 +6,7 @@ function fn1(): number { return 1; } function fn2(): string { return ''; } >fn2 : () => string ->'' : string +>'' : "" function fn3(): void { return undefined; } >fn3 : () => void diff --git a/tests/baselines/reference/scannerStringLiteralWithContainingNullCharacter1.types b/tests/baselines/reference/scannerStringLiteralWithContainingNullCharacter1.types index 43eadd8c2918d41dbe14a88bc9f0895ee1368afc..9d17f416c39e001ffb0ce706beaec89019300423 100644 GIT binary patch delta 17 YcmZo+Y+;;G#igVWW1yhK%f-tD04AveT>t<8 delta 17 YcmZo+Y+;;G#Z_EVl$n>#%f-tD05UTKx : string ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/selfInLambdas.types b/tests/baselines/reference/selfInLambdas.types index 3addf07c75ab1..bd6140ac21347 100644 --- a/tests/baselines/reference/selfInLambdas.types +++ b/tests/baselines/reference/selfInLambdas.types @@ -67,7 +67,7 @@ class X { private value = "value"; >value : string ->"value" : string +>"value" : "value" public foo() { >foo : () => void diff --git a/tests/baselines/reference/shebang.types b/tests/baselines/reference/shebang.types index 5fd6f0533ec52..b1a175d53dc03 100644 --- a/tests/baselines/reference/shebang.types +++ b/tests/baselines/reference/shebang.types @@ -2,5 +2,5 @@ #!/usr/bin/env node var foo = 'I wish the generated JS to be executed in node'; >foo : string ->'I wish the generated JS to be executed in node' : string +>'I wish the generated JS to be executed in node' : "I wish the generated JS to be executed in node" diff --git a/tests/baselines/reference/sourceMap-LineBreaks.types b/tests/baselines/reference/sourceMap-LineBreaks.types index 1e0220906da9d..810ee63d75b39 100644 --- a/tests/baselines/reference/sourceMap-LineBreaks.types +++ b/tests/baselines/reference/sourceMap-LineBreaks.types @@ -32,9 +32,9 @@ var stringLiteralWithCarriageReturnLineFeed = "line 1\ line 2"; var stringLiteralWithCarriageReturn = "line 1\ line 2"; >stringLiteralWithLineFeed : string ->"line 1\line 2" : string +>"line 1\line 2" : "line 1line 2" var stringLiteralWithLineSeparator = "line 1\
line 2";
var stringLiteralWithParagraphSeparator = "line 1\
line 2";
var stringLiteralWithNextLine = "line 1\…line 2"; >stringLiteralWithCarriageReturnLineFeed : string ->"line 1\line 2" : string +>"line 1\line 2" : "line 1line 2" diff --git a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.types b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.types index 827f523e277ee..26bfd605b9529 100644 --- a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.types +++ b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.types @@ -19,11 +19,11 @@ module Foo { var x = "test1"; >x : string ->"test1" : string +>"test1" : "test1" var y = "test 2\ >y : string ->"test 2\isn't this a lot of fun" : string +>"test 2\isn't this a lot of fun" : "test 2isn't this a lot of fun" isn't this a lot of fun"; var z = window.document; diff --git a/tests/baselines/reference/sourceMapValidationClass.types b/tests/baselines/reference/sourceMapValidationClass.types index 3e5234b0d6e90..6bea3cbf00ea1 100644 --- a/tests/baselines/reference/sourceMapValidationClass.types +++ b/tests/baselines/reference/sourceMapValidationClass.types @@ -12,11 +12,11 @@ class Greeter { return "

" + this.greeting + "

"; >"

" + this.greeting + "

" : string >"

" + this.greeting : string ->"

" : string +>"

" : "

" >this.greeting : string >this : this >greeting : string ->"

" : string +>"" : "" } private x: string; >x : string diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.types b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.types index 5cca47a0a417e..6c20ffad3fef0 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.types +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.types @@ -8,5 +8,5 @@ class Greeter { public nameA = "Ten"; >nameA : string ->"Ten" : string +>"Ten" : "Ten" } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.types b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.types index 12d8d56cf6e14..3638ffaa8f6c2 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.types +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.types @@ -13,5 +13,5 @@ class Greeter extends AbstractGreeter { public nameA = "Ten"; >nameA : string ->"Ten" : string +>"Ten" : "Ten" } diff --git a/tests/baselines/reference/sourceMapValidationClasses.types b/tests/baselines/reference/sourceMapValidationClasses.types index 5b3512c06c16d..68305c881e561 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.types +++ b/tests/baselines/reference/sourceMapValidationClasses.types @@ -4,7 +4,7 @@ module Foo.Bar { >Bar : typeof Bar "use strict"; ->"use strict" : string +>"use strict" : "use strict" class Greeter { >Greeter : Greeter @@ -19,11 +19,11 @@ module Foo.Bar { return "

" + this.greeting + "

"; >"

" + this.greeting + "

" : string >"

" + this.greeting : string ->"

" : string +>"

" : "

" >this.greeting : string >this : this >greeting : string ->"

" : string +>"" : "" } } @@ -43,7 +43,7 @@ module Foo.Bar { >greeter : Greeter >new Greeter("Hello, world!") : Greeter >Greeter : typeof Greeter ->"Hello, world!" : string +>"Hello, world!" : "Hello, world!" var str = greeter.greet(); >str : string @@ -102,9 +102,9 @@ module Foo.Bar { >b : Greeter[] >foo2("Hello", "World", "!") : Greeter[] >foo2 : (greeting: string, ...restGreetings: string[]) => Greeter[] ->"Hello" : string ->"World" : string ->"!" : string +>"Hello" : "Hello" +>"World" : "World" +>"!" : "!" // This is simple signle line comment for (var j = 0; j < b.length; j++) { diff --git a/tests/baselines/reference/sourceMapValidationDecorators.types b/tests/baselines/reference/sourceMapValidationDecorators.types index 2fc05972307d2..b4436efc35a87 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.types +++ b/tests/baselines/reference/sourceMapValidationDecorators.types @@ -91,11 +91,11 @@ class Greeter { return "

" + this.greeting + "

"; >"

" + this.greeting + "

" : string >"

" + this.greeting : string ->"

" : string +>"

" : "

" >this.greeting : string >this : this >greeting : string ->"

" : string +>"" : "" } @PropertyDecorator1 diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types index fbe264eeeae67..7a0d270f16720 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types @@ -15,10 +15,10 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function getRobot() { >getRobot : () => [number, string, string] @@ -30,20 +30,20 @@ function getRobot() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" function getMultiRobot() { >getMultiRobot : () => [string, [string, string]] @@ -94,10 +94,10 @@ for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { > : undefined >nameA : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -158,11 +158,11 @@ for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging > : undefined >primarySkillA : string >secondarySkillA : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -218,10 +218,10 @@ for (let [numberB] = getRobot(), i = 0; i < 1; i++) { } for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >numberB : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -276,11 +276,11 @@ for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { } for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >nameB : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -342,10 +342,10 @@ for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; >numberA2 : number >nameA2 : string >skillA2 : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -406,11 +406,11 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", " >nameMA : string >primarySkillA : string >secondarySkillA : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -469,10 +469,10 @@ for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >numberA3 : number | string >robotAInfo : (number | string)[] ->[2, "trimmer", "trimming"] : (number | string)[] +>[2, "trimmer", "trimming"] : (number | "trimmer" | "trimming")[] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -527,11 +527,11 @@ for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { } for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >multiRobotAInfo : (string | string[])[] ->["trimmer", ["trimming", "edging"]] : (string | string[])[] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ("trimmer" | ("trimming" | "edging")[])[] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types index a50f506262d5b..1f2bd8241317a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types @@ -15,10 +15,10 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function getRobot() { >getRobot : () => [number, string, string] @@ -30,20 +30,20 @@ function getRobot() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" function getMultiRobot() { >getMultiRobot : () => [string, [string, string]] @@ -124,14 +124,14 @@ for ([, nameA] = getRobot(), i = 0; i < 1; i++) { } for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[, nameA] = [2, "trimmer", "trimming"], i = 0 : number ->[, nameA] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameA] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[, nameA] : [undefined, string] > : undefined >nameA : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -201,17 +201,17 @@ for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) } for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] >[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] > : undefined >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -276,13 +276,13 @@ for ([numberB] = getRobot(), i = 0; i < 1; i++) { } for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberB] = [2, "trimmer", "trimming"], i = 0 : number ->[numberB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberB] : [number] >numberB : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -346,14 +346,14 @@ for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { } for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >[nameB] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[nameB] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameB] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] >[nameB] : [string] >nameB : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -422,15 +422,15 @@ for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { } for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0 : number ->[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberA2, nameA2, skillA2] : [number, string, string] >numberA2 : number >nameA2 : string >skillA2 : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -500,17 +500,17 @@ for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; } for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] >[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] >nameMA : string >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -586,10 +586,10 @@ for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1 >robotAInfo : (number | string)[] >[2, "trimmer", "trimming"] : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -661,11 +661,11 @@ for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging" >multiRobotAInfo : (string | [string, string])[] >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types index 245328296ebed..a006da6088893 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types @@ -15,10 +15,10 @@ type MultiSkilledRobot = [string, string[]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function getRobot() { >getRobot : () => [number, string, string] @@ -30,20 +30,20 @@ function getRobot() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["mower", ["mowing", ""]] : [string, string[]] ->"mower" : string ->["mowing", ""] : string[] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ("mowing" | "")[]] +>"mower" : "mower" +>["mowing", ""] : ("mowing" | "")[] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" function getMultiRobot() { >getMultiRobot : () => [string, string[]] @@ -55,7 +55,7 @@ function getMultiRobot() { for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { > : undefined >nameA : string ->"name" : string +>"name" : "name" >robotA : [number, string, string] >i : number >0 : number @@ -75,7 +75,7 @@ for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { > : undefined >nameA : string ->"name" : string +>"name" : "name" >getRobot() : [number, string, string] >getRobot : () => [number, string, string] >i : number @@ -96,11 +96,11 @@ for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { > : undefined >nameA : string ->"name" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"name" : "name" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -121,16 +121,16 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" >multiRobotA : [string, string[]] >i : number >0 : number @@ -152,16 +152,16 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" >getMultiRobot() : [string, string[]] >getMultiRobot : () => [string, string[]] >i : number @@ -184,21 +184,21 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -260,10 +260,10 @@ for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >numberB : number >-1 : number >1 : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -281,7 +281,7 @@ for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { >nameB : string ->"name" : string +>"name" : "name" >multiRobotA : [string, string[]] >i : number >0 : number @@ -300,7 +300,7 @@ for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { } for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { >nameB : string ->"name" : string +>"name" : "name" >getMultiRobot() : [string, string[]] >getMultiRobot : () => [string, string[]] >i : number @@ -320,12 +320,12 @@ for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { } for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >nameB : string ->"name" : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>"name" : "name" +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -347,9 +347,9 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i >-1 : number >1 : number >nameA2 : string ->"name" : string +>"name" : "name" >skillA2 : string ->"skill" : string +>"skill" : "skill" >robotA : [number, string, string] >i : number >0 : number @@ -371,9 +371,9 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 >-1 : number >1 : number >nameA2 : string ->"name" : string +>"name" : "name" >skillA2 : string ->"skill" : string +>"skill" : "skill" >getRobot() : [number, string, string] >getRobot : () => [number, string, string] >i : number @@ -396,13 +396,13 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "t >-1 : number >1 : number >nameA2 : string ->"name" : string +>"name" : "name" >skillA2 : string ->"skill" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"skill" : "skill" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -421,21 +421,21 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "t for (let [nameMA = "noName", >nameMA : string ->"noName" : string +>"noName" : "noName" [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = multiRobotA, i = 0; i < 1; i++) { >multiRobotA : [string, string[]] @@ -456,21 +456,21 @@ for (let } for (let [nameMA = "noName", >nameMA : string ->"noName" : string +>"noName" : "noName" [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : [string, string[]] @@ -492,28 +492,28 @@ for (let [nameMA = "noName", } for (let [nameMA = "noName", >nameMA : string ->"noName" : string +>"noName" : "noName" [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i : number >0 : number >i < 1 : boolean @@ -578,10 +578,10 @@ for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < >-1 : number >1 : number >robotAInfo : (number | string)[] ->[2, "trimmer", "trimming"] : (number | string)[] +>[2, "trimmer", "trimming"] : (number | "trimmer" | "trimming")[] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types index 3bef86dcf80a8..5780a1313b019 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types @@ -15,10 +15,10 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function getRobot() { >getRobot : () => [number, string, string] @@ -30,20 +30,20 @@ function getRobot() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" function getMultiRobot() { >getMultiRobot : () => [string, [string, string]] @@ -78,11 +78,11 @@ let i: number; for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { >[, nameA = "name"] = robotA, i = 0 : number >[, nameA = "name"] = robotA : [number, string, string] ->[, nameA = "name"] : [undefined, string] +>[, nameA = "name"] : [undefined, "name"] > : undefined ->nameA = "name" : string +>nameA = "name" : "name" >nameA : string ->"name" : string +>"name" : "name" >robotA : [number, string, string] >i = 0 : number >i : number @@ -103,11 +103,11 @@ for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { >[, nameA = "name"] = getRobot(), i = 0 : number >[, nameA = "name"] = getRobot() : [number, string, string] ->[, nameA = "name"] : [undefined, string] +>[, nameA = "name"] : [undefined, "name"] > : undefined ->nameA = "name" : string +>nameA = "name" : "name" >nameA : string ->"name" : string +>"name" : "name" >getRobot() : [number, string, string] >getRobot : () => [number, string, string] >i = 0 : number @@ -128,16 +128,16 @@ for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { } for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[, nameA = "name"] = [2, "trimmer", "trimming"], i = 0 : number ->[, nameA = "name"] = [2, "trimmer", "trimming"] : [number, string, string] ->[, nameA = "name"] : [undefined, string] +>[, nameA = "name"] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] +>[, nameA = "name"] : [undefined, "name"] > : undefined ->nameA = "name" : string +>nameA = "name" : "name" >nameA : string ->"name" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"name" : "name" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -157,25 +157,25 @@ for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { for ([, [ >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA, i = 0 : number >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA : [string, [string, string]] ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, ["none", "none"]] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : ["none", "none"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" >multiRobotA : [string, [string, string]] >i = 0 : number >i : number @@ -196,25 +196,25 @@ for ([, [ for ([, [ >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot(), i = 0 : number >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, ["none", "none"]] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : ["none", "none"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" >getMultiRobot() : [string, [string, string]] >getMultiRobot : () => [string, [string, string]] >i = 0 : number @@ -235,31 +235,31 @@ for ([, [ } for ([, [ >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, ["none", "none"]] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : ["none", "none"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { ->["none", "none"] : [string, string] ->"none" : string ->"none" : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -330,16 +330,16 @@ for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { } for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberB = -1] = [2, "trimmer", "trimming"], i = 0 : number ->[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberB = -1] : [number] >numberB = -1 : number >numberB : number >-1 : number >1 : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -359,10 +359,10 @@ for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { >[nameB = "name"] = multiRobotA, i = 0 : number >[nameB = "name"] = multiRobotA : [string, [string, string]] ->[nameB = "name"] : [string] ->nameB = "name" : string +>[nameB = "name"] : ["name"] +>nameB = "name" : "name" >nameB : string ->"name" : string +>"name" : "name" >multiRobotA : [string, [string, string]] >i = 0 : number >i : number @@ -383,10 +383,10 @@ for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { >[nameB = "name"] = getMultiRobot(), i = 0 : number >[nameB = "name"] = getMultiRobot() : [string, [string, string]] ->[nameB = "name"] : [string] ->nameB = "name" : string +>[nameB = "name"] : ["name"] +>nameB = "name" : "name" >nameB : string ->"name" : string +>"name" : "name" >getMultiRobot() : [string, [string, string]] >getMultiRobot : () => [string, [string, string]] >i = 0 : number @@ -407,16 +407,16 @@ for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { } for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >[nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[nameB = "name"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] ->[nameB = "name"] : [string] ->nameB = "name" : string +>[nameB = "name"] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>[nameB = "name"] : ["name"] +>nameB = "name" : "name" >nameB : string ->"name" : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>"name" : "name" +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -437,17 +437,17 @@ for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0 : number >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA : [number, string, string] ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, "name", "skill"] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "name" : string +>nameA2 = "name" : "name" >nameA2 : string ->"name" : string ->skillA2 = "skill" : string +>"name" : "name" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string +>"skill" : "skill" >robotA : [number, string, string] >i = 0 : number >i : number @@ -468,17 +468,17 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 : number >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() : [number, string, string] ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, "name", "skill"] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "name" : string +>nameA2 = "name" : "name" >nameA2 : string ->"name" : string ->skillA2 = "skill" : string +>"name" : "name" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string +>"skill" : "skill" >getRobot() : [number, string, string] >getRobot : () => [number, string, string] >i = 0 : number @@ -499,22 +499,22 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i } for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0 : number ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"] : [number, string, string] ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, "name", "skill"] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "name" : string +>nameA2 = "name" : "name" >nameA2 : string ->"name" : string ->skillA2 = "skill" : string +>"name" : "name" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"skill" : "skill" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -534,21 +534,21 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimm for (let [nameMA = "noName", >nameMA : string ->"noName" : string +>"noName" : "noName" [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = multiRobotA, i = 0; i < 1; i++) { >multiRobotA : [string, [string, string]] @@ -570,29 +570,29 @@ for (let for ([nameMA = "noName", >[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot(), i = 0 : number >[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : [string, [string, string]] ->nameMA = "noName" : string +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : ["noName", ["none", "none"]] +>nameMA = "noName" : "noName" >nameMA : string ->"noName" : string +>"noName" : "noName" [ ->[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary" ] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : ["none", "none"] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : [string, [string, string]] @@ -615,37 +615,37 @@ for ([nameMA = "noName", } for ([nameMA = "noName", >[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 : number ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : [string, [string, string]] ->nameMA = "noName" : string +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : ["noName", ["none", "none"]] +>nameMA = "noName" : "noName" >nameMA : string ->"noName" : string +>"noName" : "noName" [ ->[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary" ] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : ["none", "none"] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["none", "none"] ->["none", "none"] : [string, string] ->"none" : string ->"none" : string +>["none", "none"] : ["none", "none"] +>"none" : "none" +>"none" : "none" ] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" >i = 0 : number >i : number >0 : number @@ -730,10 +730,10 @@ for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; >robotAInfo : (number | string)[] >[2, "trimmer", "trimming"] : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types index 21a7122e5648f..cf5c0146aeb63 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types @@ -37,24 +37,24 @@ interface MultiRobot { let robot: Robot = { name: "mower", skill: "mowing" }; >robot : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >multiRobot : MultiRobot >MultiRobot : MultiRobot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function getRobot() { >getRobot : () => Robot @@ -113,11 +113,11 @@ for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; >nameA : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -188,15 +188,15 @@ for (let { skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i : number @@ -265,11 +265,11 @@ for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimm >skillA : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -346,15 +346,15 @@ for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types index 81beb06d3d76d..afaace1db8131 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types @@ -37,24 +37,24 @@ interface MultiRobot { let robot: Robot = { name: "mower", skill: "mowing" }; >robot : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >multiRobot : MultiRobot >MultiRobot : MultiRobot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function getRobot() { >getRobot : () => Robot @@ -137,11 +137,11 @@ for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < >nameA : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -227,15 +227,15 @@ for ({ skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -306,11 +306,11 @@ for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++ >name : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -390,15 +390,15 @@ for ({ skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -480,11 +480,11 @@ for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming >skillA : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -576,15 +576,15 @@ for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -658,11 +658,11 @@ for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < >skill : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -745,15 +745,15 @@ for ({ name, skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types index c9e76f8858180..b94224dc494bb 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types @@ -37,24 +37,24 @@ interface MultiRobot { let robot: Robot = { name: "mower", skill: "mowing" }; >robot : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >multiRobot : MultiRobot >MultiRobot : MultiRobot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function getRobot() { >getRobot : () => Robot @@ -72,7 +72,7 @@ function getMultiRobot() { for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >robot : Robot >i : number >0 : number @@ -92,7 +92,7 @@ for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >getRobot() : Robot >getRobot : () => Robot >i : number @@ -113,14 +113,14 @@ for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -143,19 +143,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -181,19 +181,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -220,32 +220,32 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i : number @@ -267,10 +267,10 @@ for (let { for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"skill" : string +>"skill" : "skill" >robot : Robot >i : number >0 : number @@ -290,10 +290,10 @@ for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"skill" : string +>"skill" : "skill" >getRobot() : Robot >getRobot : () => Robot >i : number @@ -314,17 +314,17 @@ for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"skill" : string +>"skill" : "skill" >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i : number >0 : number >i < 1 : boolean @@ -344,7 +344,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -352,19 +352,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -387,7 +387,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -395,19 +395,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -431,7 +431,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -439,32 +439,32 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types index aa8c95bae0114..4e50c33eb39a4 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types @@ -37,24 +37,24 @@ interface MultiRobot { let robot: Robot = { name: "mower", skill: "mowing" }; >robot : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >multiRobot : MultiRobot >MultiRobot : MultiRobot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function getRobot() { >getRobot : () => Robot @@ -85,11 +85,11 @@ let name: string, primary: string, secondary: string, skill: string; for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { >{name: nameA = "noName" } = robot, i = 0 : number >{name: nameA = "noName" } = robot : Robot ->{name: nameA = "noName" } : { name?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName" } : { name?: "noName"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >robot : Robot >i = 0 : number >i : number @@ -110,11 +110,11 @@ for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { >{name: nameA = "noName" } = getRobot(), i = 0 : number >{name: nameA = "noName" } = getRobot() : Robot ->{name: nameA = "noName" } : { name?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName" } : { name?: "noName"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >getRobot() : Robot >getRobot : () => Robot >i = 0 : number @@ -136,18 +136,18 @@ for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { >{name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0 : number >{name: nameA = "noName" } = { name: "trimmer", skill: "trimming" } : Robot ->{name: nameA = "noName" } : { name?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName" } : { name?: "noName"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -167,31 +167,31 @@ for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, for ({ >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -214,31 +214,31 @@ for ({ for ({ >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -262,44 +262,44 @@ for ({ for ({ >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number >{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -371,11 +371,11 @@ for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; >name : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -395,11 +395,11 @@ for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; for ({ >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -409,11 +409,11 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -436,11 +436,11 @@ for ({ for ({ >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -450,11 +450,11 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -478,11 +478,11 @@ for ({ for ({ >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number >{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: "none"; secondary?: "none"; }; } skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -492,24 +492,24 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -533,15 +533,15 @@ for ({ for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { >{name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0 : number >{name: nameA = "noName", skill: skillA = "skill" } = robot : Robot ->{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: "noName"; skill?: "skill"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string ->skill : string ->skillA = "skill" : string +>"noName" : "noName" +>skill : "skill" +>skillA = "skill" : "skill" >skillA : string ->"skill" : string +>"skill" : "skill" >robot : Robot >i = 0 : number >i : number @@ -562,15 +562,15 @@ for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { >{name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0 : number >{name: nameA = "noName", skill: skillA = "skill" } = getRobot() : Robot ->{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: "noName"; skill?: "skill"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string ->skill : string ->skillA = "skill" : string +>"noName" : "noName" +>skill : "skill" +>skillA = "skill" : "skill" >skillA : string ->"skill" : string +>"skill" : "skill" >getRobot() : Robot >getRobot : () => Robot >i = 0 : number @@ -592,22 +592,22 @@ for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { >{name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0 : number >{name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" } : Robot ->{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } ->name : string ->nameA = "noName" : string +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: "noName"; skill?: "skill"; } +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string ->skill : string ->skillA = "skill" : string +>"noName" : "noName" +>skill : "skill" +>skillA = "skill" : "skill" >skillA : string ->"skill" : string +>"skill" : "skill" >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -627,37 +627,37 @@ for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimme for ({ >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: "noName"; skills?: { primary?: "none"; secondary?: "none"; }; } name: nameA = "noName", ->name : string ->nameA = "noName" : string +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -680,37 +680,37 @@ for ({ for ({ >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: "noName"; skills?: { primary?: "none"; secondary?: "none"; }; } name: nameA = "noName", ->name : string ->nameA = "noName" : string +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -734,50 +734,50 @@ for ({ for ({ >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number >{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: "noName"; skills?: { primary?: "none"; secondary?: "none"; }; } name: nameA = "noName", ->name : string ->nameA = "noName" : string +>name : "noName" +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number @@ -852,11 +852,11 @@ for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "tr >skill : string >{ name: "trimmer", skill: "trimming" } : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" >i = 0 : number >i : number >0 : number @@ -876,14 +876,14 @@ for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "tr for ({ >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: "none"; secondary?: "none"; }; } name = "noName", >name : string skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -893,11 +893,11 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = multiRobot, i = 0; i < 1; i++) { >multiRobot : MultiRobot @@ -920,14 +920,14 @@ for ({ for ({ >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: "none"; secondary?: "none"; }; } name = "noName", >name : string skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -937,11 +937,11 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = getMultiRobot(), i = 0; i < 1; i++) { >getMultiRobot() : MultiRobot @@ -965,14 +965,14 @@ for ({ for ({ >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number >{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: "none"; secondary?: "none"; }; } name = "noName", >name : string skills: { ->skills : { primary?: string; secondary?: string; } ->{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>skills : { primary?: "none"; secondary?: "none"; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -982,24 +982,24 @@ for ({ >secondary : string } = { primary: "none", secondary: "none" } ->{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } ->primary : string ->"none" : string ->secondary : string ->"none" : string +>{ primary: "none", secondary: "none" } : { primary?: "none"; secondary?: "none"; } +>primary : "none" +>"none" : "none" +>secondary : "none" +>"none" : "none" } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, >{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot >MultiRobot : MultiRobot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" i = 0; i < 1; i++) { >i = 0 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types index 95c947f8fcc20..5e6086aa90bd9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types @@ -15,18 +15,18 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let robots = [robotA, robotB]; >robots : [number, string, string][] @@ -44,20 +44,20 @@ function getRobots() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; >multiRobots : [string, [string, string]][] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types index 33b503d0d8fd0..114b5bbd788de 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types @@ -15,18 +15,18 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let robots = [robotA, robotB]; >robots : [number, string, string][] @@ -44,20 +44,20 @@ function getRobots() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; >multiRobots : [string, [string, string]][] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types index 488b5c4614537..6127a518b0bd6 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types @@ -15,18 +15,18 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let robots = [robotA, robotB]; >robots : [number, string, string][] @@ -44,20 +44,20 @@ function getRobots() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; >multiRobots : [string, [string, string]][] @@ -75,7 +75,7 @@ function getMultiRobots() { for (let [, nameA = "noName"] of robots) { > : undefined >nameA : string ->"noName" : string +>"noName" : "noName" >robots : [number, string, string][] console.log(nameA); @@ -88,7 +88,7 @@ for (let [, nameA = "noName"] of robots) { for (let [, nameA = "noName"] of getRobots()) { > : undefined >nameA : string ->"noName" : string +>"noName" : "noName" >getRobots() : [number, string, string][] >getRobots : () => [number, string, string][] @@ -102,7 +102,7 @@ for (let [, nameA = "noName"] of getRobots()) { for (let [, nameA = "noName"] of [robotA, robotB]) { > : undefined >nameA : string ->"noName" : string +>"noName" : "noName" >[robotA, robotB] : [number, string, string][] >robotA : [number, string, string] >robotB : [number, string, string] @@ -119,16 +119,16 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of multiRobots) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >multiRobots : [string, [string, string]][] console.log(primarySkillA); @@ -143,16 +143,16 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of getMultiRobots()) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -168,16 +168,16 @@ for (let [, [ primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] @@ -234,7 +234,7 @@ for (let [numberB = -1] of [robotA, robotB]) { } for (let [nameB = "noName"] of multiRobots) { >nameB : string ->"noName" : string +>"noName" : "noName" >multiRobots : [string, [string, string]][] console.log(nameB); @@ -246,7 +246,7 @@ for (let [nameB = "noName"] of multiRobots) { } for (let [nameB = "noName"] of getMultiRobots()) { >nameB : string ->"noName" : string +>"noName" : "noName" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -259,7 +259,7 @@ for (let [nameB = "noName"] of getMultiRobots()) { } for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { >nameB : string ->"noName" : string +>"noName" : "noName" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] @@ -277,9 +277,9 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { >-1 : number >1 : number >nameA2 : string ->"noName" : string +>"noName" : "noName" >skillA2 : string ->"skill" : string +>"skill" : "skill" >robots : [number, string, string][] console.log(nameA2); @@ -294,9 +294,9 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { >-1 : number >1 : number >nameA2 : string ->"noName" : string +>"noName" : "noName" >skillA2 : string ->"skill" : string +>"skill" : "skill" >getRobots() : [number, string, string][] >getRobots : () => [number, string, string][] @@ -312,9 +312,9 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robot >-1 : number >1 : number >nameA2 : string ->"noName" : string +>"noName" : "noName" >skillA2 : string ->"skill" : string +>"skill" : "skill" >[robotA, robotB] : [number, string, string][] >robotA : [number, string, string] >robotB : [number, string, string] @@ -328,20 +328,20 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robot } for (let [nameMA = "noName", [ >nameMA : string ->"noName" : string +>"noName" : "noName" primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of multiRobots) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >multiRobots : [string, [string, string]][] console.log(nameMA); @@ -353,20 +353,20 @@ for (let [nameMA = "noName", [ } for (let [nameMA = "noName", [ >nameMA : string ->"noName" : string +>"noName" : "noName" primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of getMultiRobots()) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -379,20 +379,20 @@ for (let [nameMA = "noName", [ } for (let [nameMA = "noName", [ >nameMA : string ->"noName" : string +>"noName" : "noName" primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types index 14189ad9d81af..ade03ac89cf59 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types @@ -15,18 +15,18 @@ type MultiSkilledRobot = [string, [string, string]]; let robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let robots = [robotA, robotB]; >robots : [number, string, string][] @@ -44,20 +44,20 @@ function getRobots() { let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; >multiRobots : [string, [string, string]][] @@ -93,11 +93,11 @@ let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string >multiRobotAInfo : (string | [string, string])[] for ([, nameA = "noName"] of robots) { ->[, nameA = "noName"] : string[] +>[, nameA = "noName"] : "noName"[] > : undefined ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >robots : [number, string, string][] console.log(nameA); @@ -108,11 +108,11 @@ for ([, nameA = "noName"] of robots) { >nameA : string } for ([, nameA = "noName"] of getRobots()) { ->[, nameA = "noName"] : string[] +>[, nameA = "noName"] : "noName"[] > : undefined ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >getRobots() : [number, string, string][] >getRobots : () => [number, string, string][] @@ -124,11 +124,11 @@ for ([, nameA = "noName"] of getRobots()) { >nameA : string } for ([, nameA = "noName"] of [robotA, robotB]) { ->[, nameA = "noName"] : string[] +>[, nameA = "noName"] : "noName"[] > : undefined ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >[robotA, robotB] : [number, string, string][] >robotA : [number, string, string] >robotB : [number, string, string] @@ -141,25 +141,25 @@ for ([, nameA = "noName"] of [robotA, robotB]) { >nameA : string } for ([, [ ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ["skill1", "skill2"][] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of multiRobots) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >multiRobots : [string, [string, string]][] console.log(primarySkillA); @@ -170,25 +170,25 @@ for ([, [ >primarySkillA : string } for ([, [ ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ["skill1", "skill2"][] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of getMultiRobots()) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -200,25 +200,25 @@ for ([, [ >primarySkillA : string } for ([, [ ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ["skill1", "skill2"][] > : undefined ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] @@ -280,10 +280,10 @@ for ([numberB = -1] of [robotA, robotB]) { >numberB : number } for ([nameB = "noName"] of multiRobots) { ->[nameB = "noName"] : string[] ->nameB = "noName" : string +>[nameB = "noName"] : "noName"[] +>nameB = "noName" : "noName" >nameB : string ->"noName" : string +>"noName" : "noName" >multiRobots : [string, [string, string]][] console.log(nameB); @@ -294,10 +294,10 @@ for ([nameB = "noName"] of multiRobots) { >nameB : string } for ([nameB = "noName"] of getMultiRobots()) { ->[nameB = "noName"] : string[] ->nameB = "noName" : string +>[nameB = "noName"] : "noName"[] +>nameB = "noName" : "noName" >nameB : string ->"noName" : string +>"noName" : "noName" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -309,10 +309,10 @@ for ([nameB = "noName"] of getMultiRobots()) { >nameB : string } for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { ->[nameB = "noName"] : string[] ->nameB = "noName" : string +>[nameB = "noName"] : "noName"[] +>nameB = "noName" : "noName" >nameB : string ->"noName" : string +>"noName" : "noName" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] @@ -326,17 +326,17 @@ for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { } for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { ->[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | "noName" | "skill")[] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "noName" : string +>nameA2 = "noName" : "noName" >nameA2 : string ->"noName" : string ->skillA2 = "skill" : string +>"noName" : "noName" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string +>"skill" : "skill" >robots : [number, string, string][] console.log(nameA2); @@ -347,17 +347,17 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { >nameA2 : string } for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { ->[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | "noName" | "skill")[] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "noName" : string +>nameA2 = "noName" : "noName" >nameA2 : string ->"noName" : string ->skillA2 = "skill" : string +>"noName" : "noName" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string +>"skill" : "skill" >getRobots() : [number, string, string][] >getRobots : () => [number, string, string][] @@ -369,17 +369,17 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { >nameA2 : string } for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { ->[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | "noName" | "skill")[] >numberA2 = -1 : number >numberA2 : number >-1 : number >1 : number ->nameA2 = "noName" : string +>nameA2 = "noName" : "noName" >nameA2 : string ->"noName" : string ->skillA2 = "skill" : string +>"noName" : "noName" +>skillA2 = "skill" : "skill" >skillA2 : string ->"skill" : string +>"skill" : "skill" >[robotA, robotB] : [number, string, string][] >robotA : [number, string, string] >robotB : [number, string, string] @@ -392,27 +392,27 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) >nameA2 : string } for ([nameMA = "noName", [ ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] ->nameMA = "noName" : string +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ("noName" | ["skill1", "skill2"])[] +>nameMA = "noName" : "noName" >nameMA : string ->"noName" : string ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>"noName" : "noName" +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of multiRobots) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >multiRobots : [string, [string, string]][] console.log(nameMA); @@ -423,27 +423,27 @@ for ([nameMA = "noName", [ >nameMA : string } for ([nameMA = "noName", [ ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] ->nameMA = "noName" : string +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ("noName" | ["skill1", "skill2"])[] +>nameMA = "noName" : "noName" >nameMA : string ->"noName" : string ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>"noName" : "noName" +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of getMultiRobots()) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >getMultiRobots() : [string, [string, string]][] >getMultiRobots : () => [string, [string, string]][] @@ -455,27 +455,27 @@ for ([nameMA = "noName", [ >nameMA : string } for ([nameMA = "noName", [ ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] ->nameMA = "noName" : string +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : ("noName" | ["skill1", "skill2"])[] +>nameMA = "noName" : "noName" >nameMA : string ->"noName" : string ->[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] ->[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] +>"noName" : "noName" +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : ["skill1", "skill2"] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : ["primary", "secondary"] primarySkillA = "primary", ->primarySkillA = "primary" : string +>primarySkillA = "primary" : "primary" >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" ->secondarySkillA = "secondary" : string +>secondarySkillA = "secondary" : "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { ->["skill1", "skill2"] : [string, string] ->"skill1" : string ->"skill2" : string +>["skill1", "skill2"] : ["skill1", "skill2"] +>"skill1" : "skill1" +>"skill2" : "skill2" >[multiRobotA, multiRobotB] : [string, [string, string]][] >multiRobotA : [string, [string, string]] >multiRobotB : [string, [string, string]] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types index 17c060225dc65..991405cc19e43 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types @@ -37,42 +37,42 @@ interface MultiRobot { let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; >robots : Robot[] >Robot : Robot ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >multiRobots : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" function getRobots() { >getRobots : () => Robot[] @@ -116,17 +116,17 @@ for (let {name: nameA } of getRobots()) { for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >name : any >nameA : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -172,27 +172,27 @@ for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "m >primaryA : string >secondary : any >secondaryA : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -236,17 +236,17 @@ for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { >nameA : string >skill : any >skillA : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -298,27 +298,27 @@ for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of >primaryA : string >secondary : any >secondaryA : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types index 1f2925425455e..078d6008d4b2e 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types @@ -37,42 +37,42 @@ interface MultiRobot { let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; >robots : Robot[] >Robot : Robot ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >multiRobots : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" function getRobots() { >getRobots : () => Robot[] @@ -130,19 +130,19 @@ for ({name: nameA } of getRobots()) { } for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{name: nameA } : { name: string; } ->name : { name: string; skill: string; } +>name : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } >nameA : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -188,33 +188,33 @@ for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots( } for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } ->skills : { name: string; skills: { primary: string; secondary: string; }; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } >{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } >primary : string >primaryA : string >secondary : string >secondaryA : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -250,18 +250,18 @@ for ({name } of getRobots()) { } for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{name } : { name: string; } ->name : { name: string; skill: string; } ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>name : { name: string; skill: string; } | { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -303,31 +303,31 @@ for ({ skills: { primary, secondary } } of getMultiRobots()) { } for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } ->skills : { name: string; skills: { primary: string; secondary: string; }; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } >{ primary, secondary } : { primary: string; secondary: string; } >primary : string >secondary : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -371,21 +371,21 @@ for ({name: nameA, skill: skillA } of getRobots()) { } for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{name: nameA, skill: skillA } : { name: string; skill: string; } ->name : { name: string; skill: string; } +>name : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } >nameA : string ->skill : { name: string; skill: string; } +>skill : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } >skillA : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -435,35 +435,35 @@ for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of get } for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >{name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : { name: string; skills: { primary: string; secondary: string; }; } +>name : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } >nameA : string ->skills : { name: string; skills: { primary: string; secondary: string; }; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } >{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } >primary : string >primaryA : string >secondary : string >secondaryA : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void @@ -501,19 +501,19 @@ for ({name, skill } of getRobots()) { } for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{name, skill } : { name: string; skill: string; } ->name : { name: string; skill: string; } ->skill : { name: string; skill: string; } ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>name : { name: string; skill: string; } | { name: string; skill: string; } +>skill : { name: string; skill: string; } | { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -557,32 +557,32 @@ for ({name, skills: { primary, secondary } } of getMultiRobots()) { } for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >{name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : { name: string; skills: { primary: string; secondary: string; }; } ->skills : { name: string; skills: { primary: string; secondary: string; }; } +>name : { name: string; skills: { primary: string; secondary: string; }; } | { name: string; skills: { primary: string; secondary: string; }; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } >{ primary, secondary } : { primary: string; secondary: string; } >primary : string >secondary : string ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types index 36f67f946f0c1..63d5a305f57bf 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types @@ -37,42 +37,42 @@ interface MultiRobot { let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; >robots : Robot[] >Robot : Robot ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >multiRobots : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" function getRobots() { >getRobots : () => Robot[] @@ -91,7 +91,7 @@ function getMultiRobots() { for (let {name: nameA = "noName" } of robots) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >robots : Robot[] console.log(nameA); @@ -104,7 +104,7 @@ for (let {name: nameA = "noName" } of robots) { for (let {name: nameA = "noName" } of getRobots()) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >getRobots() : Robot[] >getRobots : () => Robot[] @@ -118,18 +118,18 @@ for (let {name: nameA = "noName" } of getRobots()) { for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >name : any >nameA : string ->"noName" : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>"noName" : "noName" +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -142,17 +142,17 @@ for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "sec >skills : any >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" >multiRobots : MultiRobot[] console.log(primaryA); @@ -166,17 +166,17 @@ for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "sec >skills : any >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" >getMultiRobots() : MultiRobot[] >getMultiRobots : () => MultiRobot[] @@ -191,42 +191,42 @@ for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "sec >skills : any >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -239,10 +239,10 @@ for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "sec for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"noSkill" : string +>"noSkill" : "noSkill" >robots : Robot[] console.log(nameA); @@ -255,10 +255,10 @@ for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"noSkill" : string +>"noSkill" : "noSkill" >getRobots() : Robot[] >getRobots : () => Robot[] @@ -272,21 +272,21 @@ for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >name : any >nameA : string ->"noName" : string +>"noName" : "noName" >skill : any >skillA : string ->"noSkill" : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>"noSkill" : "noSkill" +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -299,7 +299,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -307,19 +307,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of multiRobots) { >multiRobots : MultiRobot[] @@ -335,7 +335,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -343,19 +343,19 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of getMultiRobots()) { >getMultiRobots() : MultiRobot[] @@ -372,7 +372,7 @@ for (let { name: nameA = "noName", >name : any >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : any @@ -380,44 +380,44 @@ for (let { primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types index fe630aafccc7a..8d8072ec6e86c 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types @@ -37,42 +37,42 @@ interface MultiRobot { let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; >robots : Robot[] >Robot : Robot ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >multiRobots : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" function getRobots() { >getRobots : () => Robot[] @@ -102,11 +102,11 @@ let name: string, primary: string, secondary: string, skill: string; >skill : string for ({name: nameA = "noName" } of robots) { ->{name: nameA = "noName" } : { name: string; } +>{name: nameA = "noName" } : { name: "noName"; } >name : Robot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >robots : Robot[] console.log(nameA); @@ -117,11 +117,11 @@ for ({name: nameA = "noName" } of robots) { >nameA : string } for ({name: nameA = "noName" } of getRobots()) { ->{name: nameA = "noName" } : { name: string; } +>{name: nameA = "noName" } : { name: "noName"; } >name : Robot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >getRobots() : Robot[] >getRobots : () => Robot[] @@ -133,22 +133,22 @@ for ({name: nameA = "noName" } of getRobots()) { >nameA : string } for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->{name: nameA = "noName" } : { name: string; } ->name : { name: string; skill: string; } ->nameA = "noName" : string +>{name: nameA = "noName" } : { name: "noName"; } +>name : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } +>nameA = "noName" : "noName" >nameA : string ->"noName" : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>"noName" : "noName" +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -158,25 +158,25 @@ for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: " >nameA : string } for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: "nosKill"; secondary?: "noSkill"; }; } >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } ->primary : string ->primaryA = "primary" : string +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string ->secondary : string ->secondaryA = "secondary" : string +>"primary" : "primary" +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" >multiRobots : MultiRobot[] console.log(primaryA); @@ -187,25 +187,25 @@ for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "seconda >primaryA : string } for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: "nosKill"; secondary?: "noSkill"; }; } >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } ->primary : string ->primaryA = "primary" : string +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string ->secondary : string ->secondaryA = "secondary" : string +>"primary" : "primary" +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" >getMultiRobots() : MultiRobot[] >getMultiRobots : () => MultiRobot[] @@ -217,50 +217,50 @@ for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "seconda >primaryA : string } for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = ->{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: "nosKill"; secondary?: "noSkill"; }; } >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } ->primary : string ->primaryA = "primary" : string +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string ->secondary : string ->secondaryA = "secondary" : string +>"primary" : "primary" +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" { primary: "nosKill", secondary: "noSkill" } } of ->{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"nosKill" : string ->secondary : string ->"noSkill" : string +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: "nosKill"; secondary?: "noSkill"; } +>primary : "nosKill" +>"nosKill" : "nosKill" +>secondary : "noSkill" +>"noSkill" : "noSkill" [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -297,18 +297,18 @@ for ({ name = "noName" } of getRobots()) { } for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{ name = "noName" } : { name: string; } ->name : { name: string; skill: string; } ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>name : { name: string; skill: string; } | { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -318,11 +318,11 @@ for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimme >nameA : string } for ({ ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } skills: { >skills : MultiRobot ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -332,11 +332,11 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of multiRobots) { >multiRobots : MultiRobot[] @@ -349,11 +349,11 @@ for ({ >primaryA : string } for ({ ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } skills: { >skills : MultiRobot ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -363,11 +363,11 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of getMultiRobots()) { >getMultiRobots() : MultiRobot[] @@ -381,11 +381,11 @@ for ({ >primaryA : string } for ({ ->{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } skills: { ->skills : { name: string; skills: { primary: string; secondary: string; }; } ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -395,34 +395,34 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(primaryA); >console.log(primaryA) : void @@ -434,15 +434,15 @@ for ({ for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { ->{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: "noName"; skill: "noSkill"; } >name : Robot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >skill : Robot ->skillA = "noSkill" : string +>skillA = "noSkill" : "noSkill" >skillA : string ->"noSkill" : string +>"noSkill" : "noSkill" >robots : Robot[] console.log(nameA); @@ -453,15 +453,15 @@ for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { >nameA : string } for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { ->{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: "noName"; skill: "noSkill"; } >name : Robot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" >skill : Robot ->skillA = "noSkill" : string +>skillA = "noSkill" : "noSkill" >skillA : string ->"noSkill" : string +>"noSkill" : "noSkill" >getRobots() : Robot[] >getRobots : () => Robot[] @@ -473,26 +473,26 @@ for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { >nameA : string } for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { ->{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } ->name : { name: string; skill: string; } ->nameA = "noName" : string +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: "noName"; skill: "noSkill"; } +>name : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } +>nameA = "noName" : "noName" >nameA : string ->"noName" : string ->skill : { name: string; skill: string; } ->skillA = "noSkill" : string +>"noName" : "noName" +>skill : { name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; } +>skillA = "noSkill" : "noSkill" >skillA : string ->"noSkill" : string ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>"noSkill" : "noSkill" +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -502,37 +502,37 @@ for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", >nameA : string } for ({ ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: "noName"; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name: nameA = "noName", >name : MultiRobot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of multiRobots) { >multiRobots : MultiRobot[] @@ -545,37 +545,37 @@ for ({ >nameA : string } for ({ ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: "noName"; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name: nameA = "noName", >name : MultiRobot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of getMultiRobots()) { >getMultiRobots() : MultiRobot[] @@ -589,62 +589,62 @@ for ({ >nameA : string } for ({ ->{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: "noName"; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name: nameA = "noName", >name : MultiRobot ->nameA = "noName" : string +>nameA = "noName" : "noName" >nameA : string ->"noName" : string +>"noName" : "noName" skills: { >skills : MultiRobot ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: "primary"; secondary?: "secondary"; } primary: primaryA = "primary", ->primary : string ->primaryA = "primary" : string +>primary : "primary" +>primaryA = "primary" : "primary" >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" ->secondary : string ->secondaryA = "secondary" : string +>secondary : "secondary" +>secondaryA = "secondary" : "secondary" >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] >MultiRobot : MultiRobot ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void @@ -683,19 +683,19 @@ for ({ name = "noName", skill = "noSkill" } of getRobots()) { } for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { >{ name = "noName", skill = "noSkill" } : { name: string; skill: string; } ->name : { name: string; skill: string; } ->skill : { name: string; skill: string; } ->[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>name : { name: string; skill: string; } | { name: string; skill: string; } +>skill : { name: string; skill: string; } | { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : ({ name: "mower"; skill: "mowing"; } | { name: "trimmer"; skill: "trimming"; })[] +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" console.log(nameA); >console.log(nameA) : void @@ -705,14 +705,14 @@ for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing >nameA : string } for ({ ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name = "noName", >name : MultiRobot skills: { >skills : MultiRobot ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -722,11 +722,11 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of multiRobots) { >multiRobots : MultiRobot[] @@ -739,14 +739,14 @@ for ({ >nameA : string } for ({ ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name = "noName", >name : MultiRobot skills: { >skills : MultiRobot ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -756,11 +756,11 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of getMultiRobots()) { >getMultiRobots() : MultiRobot[] @@ -774,14 +774,14 @@ for ({ >nameA : string } for ({ ->{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: "noSkill"; secondary?: "noSkill"; }; } name = "noName", ->name : { name: string; skills: { primary: string; secondary: string; }; } +>name : { name: string; skills: { primary: string; secondary: string; }; } | { name: string; skills: { primary: string; secondary: string; }; } skills: { ->skills : { name: string; skills: { primary: string; secondary: string; }; } ->{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>skills : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } >{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } primary = "primary", @@ -791,34 +791,34 @@ for ({ >secondary : string } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, ->[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : ({ name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } | { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; })[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" console.log(nameA); >console.log(nameA) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types index 029e47cd3a0f7..ef656f8031a33 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types @@ -26,15 +26,15 @@ interface Robot { var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >robotA : Robot >Robot : Robot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { >foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void @@ -93,15 +93,15 @@ foo1(robotA); foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void >foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" foo2(robotA); >foo2(robotA) : void @@ -111,15 +111,15 @@ foo2(robotA); foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void >foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" foo3(robotA); >foo3(robotA) : void @@ -129,13 +129,13 @@ foo3(robotA); foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void >foo3 : ({ skills }: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types index a9e5c2d6ee6aa..1257d98958f09 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types @@ -26,15 +26,15 @@ interface Robot { var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >robotA : Robot >Robot : Robot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" function foo1( >foo1 : ({ @@ -50,19 +50,19 @@ function foo1( primary: primaryA = "primary", >primary : any >primaryA : string ->"primary" : string +>"primary" : "primary" secondary: secondaryA = "secondary" >secondary : any >secondaryA : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } ->{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"SomeSkill" : string ->secondary : string ->"someSkill" : string +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: "SomeSkill"; secondary?: "someSkill"; } +>primary : "SomeSkill" +>"SomeSkill" : "SomeSkill" +>secondary : "someSkill" +>"someSkill" : "someSkill" }: Robot = robotA) { >Robot : Robot @@ -87,7 +87,7 @@ function foo2( name: nameC = "name", >name : any >nameC : string ->"name" : string +>"name" : "name" skills: { >skills : any @@ -95,19 +95,19 @@ function foo2( primary: primaryB = "primary", >primary : any >primaryB : string ->"primary" : string +>"primary" : "primary" secondary: secondaryB = "secondary" >secondary : any >secondaryB : string ->"secondary" : string +>"secondary" : "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } ->{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"SomeSkill" : string ->secondary : string ->"someSkill" : string +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: "SomeSkill"; secondary?: "someSkill"; } +>primary : "SomeSkill" +>"SomeSkill" : "SomeSkill" +>secondary : "someSkill" +>"someSkill" : "someSkill" }: Robot = robotA) { >Robot : Robot @@ -123,11 +123,11 @@ function foo2( function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { >foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void >skills : { primary?: string; secondary?: string; } ->{ primary: "SomeSkill", secondary: "someSkill" } : { primary: string; secondary: string; } ->primary : string ->"SomeSkill" : string ->secondary : string ->"someSkill" : string +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary: "SomeSkill"; secondary: "someSkill"; } +>primary : "SomeSkill" +>"SomeSkill" : "SomeSkill" +>secondary : "someSkill" +>"someSkill" : "someSkill" >Robot : Robot >robotA : Robot @@ -159,15 +159,15 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" foo2(robotA); >foo2(robotA) : void @@ -189,15 +189,15 @@ foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" foo3(robotA); >foo3(robotA) : void @@ -207,13 +207,13 @@ foo3(robotA); foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void >foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types index 894cd714c7368..46539e69aa4f6 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types @@ -17,16 +17,16 @@ declare var console: { } var hello = "hello"; >hello : string ->"hello" : string +>"hello" : "hello" var robotA: Robot = { name: "mower", skill: "mowing" }; >robotA : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" function foo1({ name: nameA }: Robot) { >foo1 : ({ name: nameA }: Robot) => void @@ -77,11 +77,11 @@ foo1(robotA); foo1({ name: "Edger", skill: "cutting edges" }); >foo1({ name: "Edger", skill: "cutting edges" }) : void >foo1 : ({ name: nameA }: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" foo2(robotA); >foo2(robotA) : void @@ -91,11 +91,11 @@ foo2(robotA); foo2({ name: "Edger", skill: "cutting edges" }); >foo2({ name: "Edger", skill: "cutting edges" }) : void >foo2 : ({ name: nameB, skill: skillB }: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" foo3(robotA); >foo3(robotA) : void @@ -105,9 +105,9 @@ foo3(robotA); foo3({ name: "Edger", skill: "cutting edges" }); >foo3({ name: "Edger", skill: "cutting edges" }) : void >foo3 : ({ name }: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types index 669708f412f2e..798e8afde02c7 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types @@ -17,22 +17,22 @@ declare var console: { } var hello = "hello"; >hello : string ->"hello" : string +>"hello" : "hello" var robotA: Robot = { name: "mower", skill: "mowing" }; >robotA : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" function foo1({ name: nameA = "" }: Robot = { }) { >foo1 : ({ name: nameA = "" }?: Robot) => void >name : any >nameA : string ->"" : string +>"" : "" >Robot : Robot >{ } : {} @@ -47,10 +47,10 @@ function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = { >foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void >name : any >nameB : string ->"" : string +>"" : "" >skill : any >skillB : string ->"noSkill" : string +>"noSkill" : "noSkill" >Robot : Robot >{} : {} @@ -64,7 +64,7 @@ function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = { function foo3({ name = "" }: Robot = {}) { >foo3 : ({ name = "" }?: Robot) => void >name : string ->"" : string +>"" : "" >Robot : Robot >{} : {} @@ -84,11 +84,11 @@ foo1(robotA); foo1({ name: "Edger", skill: "cutting edges" }); >foo1({ name: "Edger", skill: "cutting edges" }) : void >foo1 : ({ name: nameA = "" }?: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" foo2(robotA); >foo2(robotA) : void @@ -98,11 +98,11 @@ foo2(robotA); foo2({ name: "Edger", skill: "cutting edges" }); >foo2({ name: "Edger", skill: "cutting edges" }) : void >foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" foo3(robotA); >foo3(robotA) : void @@ -112,9 +112,9 @@ foo3(robotA); foo3({ name: "Edger", skill: "cutting edges" }); >foo3({ name: "Edger", skill: "cutting edges" }) : void >foo3 : ({ name = "" }?: Robot) => void ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types index 9c695f1c0dd77..d02474ef291c5 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types @@ -12,10 +12,10 @@ type Robot = [number, string, string]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function foo1([, nameA]: Robot) { >foo1 : ([, nameA]: [number, string, string]) => void @@ -81,10 +81,10 @@ foo1(robotA); foo1([2, "trimmer", "trimming"]); >foo1([2, "trimmer", "trimming"]) : void >foo1 : ([, nameA]: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo2(robotA); >foo2(robotA) : void @@ -94,10 +94,10 @@ foo2(robotA); foo2([2, "trimmer", "trimming"]); >foo2([2, "trimmer", "trimming"]) : void >foo2 : ([numberB]: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo3(robotA); >foo3(robotA) : void @@ -107,10 +107,10 @@ foo3(robotA); foo3([2, "trimmer", "trimming"]); >foo3([2, "trimmer", "trimming"]) : void >foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo4(robotA); >foo4(robotA) : void @@ -120,8 +120,8 @@ foo4(robotA); foo4([2, "trimmer", "trimming"]); >foo4([2, "trimmer", "trimming"]) : void >foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types index b3e09d962c3df..60038aaf6e806 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types @@ -12,11 +12,11 @@ type Robot = [string, [string, string]]; var robotA: Robot = ["trimmer", ["trimming", "edging"]]; >robotA : [string, [string, string]] >Robot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" function foo1([, skillA]: Robot) { >foo1 : ([, skillA]: [string, [string, string]]) => void @@ -81,11 +81,11 @@ foo1(robotA); foo1(["roomba", ["vaccum", "mopping"]]); >foo1(["roomba", ["vaccum", "mopping"]]) : void >foo1 : ([, skillA]: [string, [string, string]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" foo2(robotA); >foo2(robotA) : void @@ -95,11 +95,11 @@ foo2(robotA); foo2(["roomba", ["vaccum", "mopping"]]); >foo2(["roomba", ["vaccum", "mopping"]]) : void >foo2 : ([nameMB]: [string, [string, string]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" foo3(robotA); >foo3(robotA) : void @@ -109,11 +109,11 @@ foo3(robotA); foo3(["roomba", ["vaccum", "mopping"]]); >foo3(["roomba", ["vaccum", "mopping"]]) : void >foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" foo4(robotA); >foo4(robotA) : void @@ -123,9 +123,9 @@ foo4(robotA); foo4(["roomba", ["vaccum", "mopping"]]); >foo4(["roomba", ["vaccum", "mopping"]]) : void >foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types index 8e12e876b1d4d..552264de77873 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types @@ -12,22 +12,22 @@ type Robot = [number, string, string]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { >foo1 : ([, nameA = "noName"]?: [number, string, string]) => void > : undefined >nameA : string ->"noName" : string +>"noName" : "noName" >Robot : [number, string, string] ->[-1, "name", "skill"] : [number, string, string] +>[-1, "name", "skill"] : [number, "name", "skill"] >-1 : number >1 : number ->"name" : string ->"skill" : string +>"name" : "name" +>"skill" : "skill" console.log(nameA); >console.log(nameA) : void @@ -43,11 +43,11 @@ function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { >-1 : number >1 : number >Robot : [number, string, string] ->[-1, "name", "skill"] : [number, string, string] +>[-1, "name", "skill"] : [number, "name", "skill"] >-1 : number >1 : number ->"name" : string ->"skill" : string +>"name" : "name" +>"skill" : "skill" console.log(numberB); >console.log(numberB) : void @@ -63,15 +63,15 @@ function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, >-1 : number >1 : number >nameA2 : string ->"name" : string +>"name" : "name" >skillA2 : string ->"skill" : string +>"skill" : "skill" >Robot : [number, string, string] ->[-1, "name", "skill"] : [number, string, string] +>[-1, "name", "skill"] : [number, "name", "skill"] >-1 : number >1 : number ->"name" : string ->"skill" : string +>"name" : "name" +>"skill" : "skill" console.log(nameA2); >console.log(nameA2) : void @@ -88,11 +88,11 @@ function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { >1 : number >robotAInfo : (number | string)[] >Robot : [number, string, string] ->[-1, "name", "skill"] : [number, string, string] +>[-1, "name", "skill"] : [number, "name", "skill"] >-1 : number >1 : number ->"name" : string ->"skill" : string +>"name" : "name" +>"skill" : "skill" console.log(robotAInfo); >console.log(robotAInfo) : void @@ -110,10 +110,10 @@ foo1(robotA); foo1([2, "trimmer", "trimming"]); >foo1([2, "trimmer", "trimming"]) : void >foo1 : ([, nameA = "noName"]?: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo2(robotA); >foo2(robotA) : void @@ -123,10 +123,10 @@ foo2(robotA); foo2([2, "trimmer", "trimming"]); >foo2([2, "trimmer", "trimming"]) : void >foo2 : ([numberB = -1]?: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo3(robotA); >foo3(robotA) : void @@ -136,10 +136,10 @@ foo3(robotA); foo3([2, "trimmer", "trimming"]); >foo3([2, "trimmer", "trimming"]) : void >foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" foo4(robotA); >foo4(robotA) : void @@ -149,8 +149,8 @@ foo4(robotA); foo4([2, "trimmer", "trimming"]); >foo4([2, "trimmer", "trimming"]) : void >foo4 : ([numberA3 = -1, ...robotAInfo]?: [number, string, string]) => void ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types index 52423dfce2136..d58d2cecb4f13 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types @@ -12,25 +12,25 @@ type Robot = [string, string[]]; var robotA: Robot = ["trimmer", ["trimming", "edging"]]; >robotA : [string, string[]] >Robot : [string, string[]] ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { >foo1 : ([, skillA = ["noSkill", "noSkill"]]?: [string, string[]]) => void > : undefined >skillA : string[] ->["noSkill", "noSkill"] : string[] ->"noSkill" : string ->"noSkill" : string +>["noSkill", "noSkill"] : "noSkill"[] +>"noSkill" : "noSkill" +>"noSkill" : "noSkill" >Robot : [string, string[]] ->["name", ["skill1", "skill2"]] : [string, string[]] ->"name" : string ->["skill1", "skill2"] : string[] ->"skill1" : string ->"skill2" : string +>["name", ["skill1", "skill2"]] : ["name", ("skill1" | "skill2")[]] +>"name" : "name" +>["skill1", "skill2"] : ("skill1" | "skill2")[] +>"skill1" : "skill1" +>"skill2" : "skill2" console.log(skillA); >console.log(skillA) : void @@ -43,13 +43,13 @@ function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "s function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { >foo2 : ([nameMB = "noName"]?: [string, string[]]) => void >nameMB : string ->"noName" : string +>"noName" : "noName" >Robot : [string, string[]] ->["name", ["skill1", "skill2"]] : [string, string[]] ->"name" : string ->["skill1", "skill2"] : string[] ->"skill1" : string ->"skill2" : string +>["name", ["skill1", "skill2"]] : ["name", ("skill1" | "skill2")[]] +>"name" : "name" +>["skill1", "skill2"] : ("skill1" | "skill2")[] +>"skill1" : "skill1" +>"skill2" : "skill2" console.log(nameMB); >console.log(nameMB) : void @@ -65,20 +65,20 @@ function foo3([nameMA = "noName", [ secondarySkillA = "secondary" ] = ["noSkill", "noSkill"]]: [string, string[]]) => void >nameMA : string ->"noName" : string +>"noName" : "noName" primarySkillA = "primary", >primarySkillA : string ->"primary" : string +>"primary" : "primary" secondarySkillA = "secondary" >secondarySkillA : string ->"secondary" : string +>"secondary" : "secondary" ] = ["noSkill", "noSkill"]]: Robot) { ->["noSkill", "noSkill"] : [string, string] ->"noSkill" : string ->"noSkill" : string +>["noSkill", "noSkill"] : ["noSkill", "noSkill"] +>"noSkill" : "noSkill" +>"noSkill" : "noSkill" >Robot : [string, string[]] console.log(nameMA); @@ -97,11 +97,11 @@ foo1(robotA); foo1(["roomba", ["vaccum", "mopping"]]); >foo1(["roomba", ["vaccum", "mopping"]]) : void >foo1 : ([, skillA = ["noSkill", "noSkill"]]?: [string, string[]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" foo2(robotA); >foo2(robotA) : void @@ -111,11 +111,11 @@ foo2(robotA); foo2(["roomba", ["vaccum", "mopping"]]); >foo2(["roomba", ["vaccum", "mopping"]]) : void >foo2 : ([nameMB = "noName"]?: [string, string[]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" foo3(robotA); >foo3(robotA) : void @@ -131,9 +131,9 @@ foo3(["roomba", ["vaccum", "mopping"]]); primarySkillA = "primary", secondarySkillA = "secondary" ] = ["noSkill", "noSkill"]]: [string, string[]]) => void ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types index 82a2ffe88f63d..e4cbbb128107e 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types @@ -17,25 +17,25 @@ declare var console: { } var hello = "hello"; >hello : string ->"hello" : string +>"hello" : "hello" var robotA: Robot = { name: "mower", skill: "mowing" }; >robotA : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" var robotB: Robot = { name: "trimmer", skill: "trimming" }; >robotB : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" var { name: nameA } = robotA; >name : any @@ -54,11 +54,11 @@ var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; >nameC : string >skill : any >skillC : string ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" if (nameA == nameB) { >nameA == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types index 9d8023f5f740c..fffe6651e0027 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types @@ -17,25 +17,25 @@ declare var console: { } var hello = "hello"; >hello : string ->"hello" : string +>"hello" : "hello" var robotA: Robot = { name: "mower", skill: "mowing" }; >robotA : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" var robotB: Robot = { name: "trimmer", skill: "trimming" }; >robotB : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" var a: string, { name: nameA } = robotA; >a : string @@ -57,11 +57,11 @@ var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting >nameC : string >skill : any >skillC : string ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" var { name: nameA } = robotA, a = hello; >name : any @@ -77,18 +77,18 @@ var { name: nameB, skill: skillB } = robotB, b = " hello"; >skillB : string >robotB : Robot >b : string ->" hello" : string +>" hello" : " hello" var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; >name : any >nameC : string >skill : any >skillC : string ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" >c : string >hello : string @@ -99,7 +99,7 @@ var a = hello, { name: nameA } = robotA, a1= "hello"; >nameA : string >robotA : Robot >a1 : string ->"hello" : string +>"hello" : "hello" var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; >b : string @@ -110,7 +110,7 @@ var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; >skillB : string >robotB : Robot >b1 : string ->"hello" : string +>"hello" : "hello" var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; >c : string @@ -119,11 +119,11 @@ var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting >nameC : string >skill : any >skillC : string ->{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>{ name: "Edger", skill: "cutting edges" } : { name: "Edger"; skill: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" >c1 : string >hello : string diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types index 73006f4ec4544..105a55b88c95c 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types @@ -12,18 +12,18 @@ type Robot = [number, string, string]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let [, nameA] = robotA; @@ -43,19 +43,19 @@ let [numberA2, nameA2, skillA2] = robotA; let [numberC2] = [3, "edging", "Trimming edges"]; >numberC2 : number ->[3, "edging", "Trimming edges"] : [number, string, string] +>[3, "edging", "Trimming edges"] : [number, "edging", "Trimming edges"] >3 : number ->"edging" : string ->"Trimming edges" : string +>"edging" : "edging" +>"Trimming edges" : "Trimming edges" let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; >numberC : number >nameC : string >skillC : string ->[3, "edging", "Trimming edges"] : [number, string, string] +>[3, "edging", "Trimming edges"] : [number, "edging", "Trimming edges"] >3 : number ->"edging" : string ->"Trimming edges" : string +>"edging" : "edging" +>"Trimming edges" : "Trimming edges" let [numberA3, ...robotAInfo] = robotA; >numberA3 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types index 57d4b271c2fb4..44cdf660e8242 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types @@ -12,20 +12,20 @@ type MultiSkilledRobot = [string, [string, string]]; var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let [, skillA] = multiRobotA; > : undefined @@ -44,21 +44,21 @@ let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; let [nameMC] = ["roomba", ["vaccum", "mopping"]]; >nameMC : string ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; >nameMC2 : string >primarySkillC : string >secondarySkillC : string ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" let [...multiRobotAInfo] = multiRobotA; >multiRobotAInfo : (string | [string, string])[] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types index 5ca93029977d1..14cf5f4a5138d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types @@ -15,36 +15,36 @@ type MultiSkilledRobot = [string, [string, string]]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["mower", ["mowing", ""]] : [string, [string, string]] ->"mower" : string ->["mowing", ""] : [string, string] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ["mowing", ""]] +>"mower" : "mower" +>["mowing", ""] : ["mowing", ""] +>"mowing" : "mowing" +>"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, [string, string]] >MultiSkilledRobot : [string, [string, string]] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" let nameA: string, numberB: number, nameB: string, skillB: string; >nameA : string @@ -80,14 +80,14 @@ let multiRobotAInfo: (string | [string, string])[]; >getRobotB : () => [number, string, string] [, nameB] = [2, "trimmer", "trimming"]; ->[, nameB] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameB] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[, nameB] : [undefined, string] > : undefined >nameB : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [, multiSkillB] = multiRobotB; >[, multiSkillB] = multiRobotB : [string, [string, string]] @@ -105,15 +105,15 @@ let multiRobotAInfo: (string | [string, string])[]; >getMultiRobotB : () => [string, [string, string]] [, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; ->[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] >[, multiSkillB] : [undefined, [string, string]] > : undefined >multiSkillB : [string, string] ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" [numberB] = robotB; >[numberB] = robotB : [number, string, string] @@ -129,13 +129,13 @@ let multiRobotAInfo: (string | [string, string])[]; >getRobotB : () => [number, string, string] [numberB] = [2, "trimmer", "trimming"]; ->[numberB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberB] : [number] >numberB : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [nameMB] = multiRobotB; >[nameMB] = multiRobotB : [string, [string, string]] @@ -151,14 +151,14 @@ let multiRobotAInfo: (string | [string, string])[]; >getMultiRobotB : () => [string, [string, string]] [nameMB] = ["trimmer", ["trimming", "edging"]]; ->[nameMB] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameMB] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] >[nameMB] : [string] >nameMB : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" [numberB, nameB, skillB] = robotB; >[numberB, nameB, skillB] = robotB : [number, string, string] @@ -178,15 +178,15 @@ let multiRobotAInfo: (string | [string, string])[]; >getRobotB : () => [number, string, string] [numberB, nameB, skillB] = [2, "trimmer", "trimming"]; ->[numberB, nameB, skillB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB, nameB, skillB] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberB, nameB, skillB] : [number, string, string] >numberB : number >nameB : string >skillB : string ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB : [string, [string, string]] @@ -208,17 +208,17 @@ let multiRobotAInfo: (string | [string, string])[]; >getMultiRobotB : () => [string, [string, string]] [nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; ->[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] >[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] >nameMB : string >[primarySkillB, secondarySkillB] : [string, string] >primarySkillB : string >secondarySkillB : string ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" [numberB, ...robotAInfo] = robotB; >[numberB, ...robotAInfo] = robotB : [number, string, string] @@ -245,10 +245,10 @@ let multiRobotAInfo: (string | [string, string])[]; >robotAInfo : (number | string)[] >[2, "trimmer", "trimming"] : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [...multiRobotAInfo] = multiRobotA; >[...multiRobotAInfo] = multiRobotA : [string, [string, string]] @@ -266,15 +266,15 @@ let multiRobotAInfo: (string | [string, string])[]; >getMultiRobotB : () => [string, [string, string]] [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; ->[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : (string | [string, string])[] +>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : ("trimmer" | ["trimming", "edging"])[] >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->["trimmer", ["trimming", "edging"]] : (string | [string, string])[] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ("trimmer" | ["trimming", "edging"])[] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" if (nameA == nameB) { >nameA == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types index 2dad459725eaf..0cf00e1373707 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types @@ -12,23 +12,23 @@ type Robot = [number, string, string]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" let [, nameA = "noName"] = robotA; > : undefined >nameA : string ->"noName" : string +>"noName" : "noName" >robotA : [number, string, string] let [numberB = -1] = robotB; @@ -42,32 +42,32 @@ let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; >-1 : number >1 : number >nameA2 : string ->"noName" : string +>"noName" : "noName" >skillA2 : string ->"noSkill" : string +>"noSkill" : "noSkill" >robotA : [number, string, string] let [numberC2 = -1] = [3, "edging", "Trimming edges"]; >numberC2 : number >-1 : number >1 : number ->[3, "edging", "Trimming edges"] : [number, string, string] +>[3, "edging", "Trimming edges"] : [number, "edging", "Trimming edges"] >3 : number ->"edging" : string ->"Trimming edges" : string +>"edging" : "edging" +>"Trimming edges" : "Trimming edges" let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; >numberC : number >-1 : number >1 : number >nameC : string ->"noName" : string +>"noName" : "noName" >skillC : string ->"noSkill" : string ->[3, "edging", "Trimming edges"] : [number, string, string] +>"noSkill" : "noSkill" +>[3, "edging", "Trimming edges"] : [number, "edging", "Trimming edges"] >3 : number ->"edging" : string ->"Trimming edges" : string +>"edging" : "edging" +>"Trimming edges" : "Trimming edges" let [numberA3 = -1, ...robotAInfo] = robotA; >numberA3 : number diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types index 12215507d4adf..20ffdc41addb9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types @@ -12,70 +12,70 @@ type MultiSkilledRobot = [string, string[]]; var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["mower", ["mowing", ""]] : [string, string[]] ->"mower" : string ->["mowing", ""] : string[] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ("mowing" | "")[]] +>"mower" : "mower" +>["mowing", ""] : ("mowing" | "")[] +>"mowing" : "mowing" +>"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; > : undefined >skillA : string[] ->["noSkill", "noSkill"] : string[] ->"noSkill" : string ->"noSkill" : string +>["noSkill", "noSkill"] : "noSkill"[] +>"noSkill" : "noSkill" +>"noSkill" : "noSkill" >multiRobotA : [string, string[]] let [nameMB = "noName" ] = multiRobotB; >nameMB : string ->"noName" : string +>"noName" : "noName" >multiRobotB : [string, string[]] let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; >nameMA : string ->"noName" : string +>"noName" : "noName" >primarySkillA : string ->"noSkill" : string +>"noSkill" : "noSkill" >secondarySkillA : string ->"noSkill" : string ->["noSkill", "noSkill"] : [string, string] ->"noSkill" : string ->"noSkill" : string +>"noSkill" : "noSkill" +>["noSkill", "noSkill"] : ["noSkill", "noSkill"] +>"noSkill" : "noSkill" +>"noSkill" : "noSkill" >multiRobotA : [string, string[]] let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; >nameMC : string ->"noName" : string ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>"noName" : "noName" +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; >nameMC2 : string ->"noName" : string +>"noName" : "noName" >primarySkillC : string ->"noSkill" : string +>"noSkill" : "noSkill" >secondarySkillC : string ->"noSkill" : string ->["noSkill", "noSkill"] : [string, string] ->"noSkill" : string ->"noSkill" : string ->["roomba", ["vaccum", "mopping"]] : [string, [string, string]] ->"roomba" : string ->["vaccum", "mopping"] : [string, string] ->"vaccum" : string ->"mopping" : string +>"noSkill" : "noSkill" +>["noSkill", "noSkill"] : ["noSkill", "noSkill"] +>"noSkill" : "noSkill" +>"noSkill" : "noSkill" +>["roomba", ["vaccum", "mopping"]] : ["roomba", ["vaccum", "mopping"]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ["vaccum", "mopping"] +>"vaccum" : "vaccum" +>"mopping" : "mopping" if (nameMB == nameMA) { >nameMB == nameMA : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types index 7edf6c63e4aed..acbdcc60896e2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types @@ -15,36 +15,36 @@ type MultiSkilledRobot = [string, string[]]; var robotA: Robot = [1, "mower", "mowing"]; >robotA : [number, string, string] >Robot : [number, string, string] ->[1, "mower", "mowing"] : [number, string, string] +>[1, "mower", "mowing"] : [number, "mower", "mowing"] >1 : number ->"mower" : string ->"mowing" : string +>"mower" : "mower" +>"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; >robotB : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >multiRobotA : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["mower", ["mowing", ""]] : [string, string[]] ->"mower" : string ->["mowing", ""] : string[] ->"mowing" : string ->"" : string +>["mower", ["mowing", ""]] : ["mower", ("mowing" | "")[]] +>"mower" : "mower" +>["mowing", ""] : ("mowing" | "")[] +>"mowing" : "mowing" +>"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >multiRobotB : [string, string[]] >MultiSkilledRobot : [string, string[]] ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" let nameA: string, numberB: number, nameB: string, skillB: string; >nameA : string @@ -66,34 +66,34 @@ let multiRobotAInfo: (string | string[])[]; [, nameA = "helloNoName"] = robotA; >[, nameA = "helloNoName"] = robotA : [number, string, string] ->[, nameA = "helloNoName"] : [undefined, string] +>[, nameA = "helloNoName"] : [undefined, "helloNoName"] > : undefined ->nameA = "helloNoName" : string +>nameA = "helloNoName" : "helloNoName" >nameA : string ->"helloNoName" : string +>"helloNoName" : "helloNoName" >robotA : [number, string, string] [, nameB = "helloNoName"] = getRobotB(); >[, nameB = "helloNoName"] = getRobotB() : [number, string, string] ->[, nameB = "helloNoName"] : [undefined, string] +>[, nameB = "helloNoName"] : [undefined, "helloNoName"] > : undefined ->nameB = "helloNoName" : string +>nameB = "helloNoName" : "helloNoName" >nameB : string ->"helloNoName" : string +>"helloNoName" : "helloNoName" >getRobotB() : [number, string, string] >getRobotB : () => [number, string, string] [, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; ->[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] : [number, string, string] ->[, nameB = "helloNoName"] : [undefined, string] +>[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] +>[, nameB = "helloNoName"] : [undefined, "helloNoName"] > : undefined ->nameB = "helloNoName" : string +>nameB = "helloNoName" : "helloNoName" >nameB : string ->"helloNoName" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"helloNoName" : "helloNoName" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [, multiSkillB = []] = multiRobotB; >[, multiSkillB = []] = multiRobotB : [string, string[]] @@ -115,17 +115,17 @@ let multiRobotAInfo: (string | string[])[]; >getMultiRobotB : () => [string, string[]] [, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; ->[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] : [string, string[]] +>[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] >[, multiSkillB = []] : [undefined, undefined[]] > : undefined >multiSkillB = [] : undefined[] >multiSkillB : string[] >[] : undefined[] ->["roomba", ["vaccum", "mopping"]] : [string, string[]] ->"roomba" : string ->["vaccum", "mopping"] : string[] ->"vaccum" : string ->"mopping" : string +>["roomba", ["vaccum", "mopping"]] : ["roomba", ("vaccum" | "mopping")[]] +>"roomba" : "roomba" +>["vaccum", "mopping"] : ("vaccum" | "mopping")[] +>"vaccum" : "vaccum" +>"mopping" : "mopping" [numberB = -1] = robotB; >[numberB = -1] = robotB : [number, string, string] @@ -147,152 +147,152 @@ let multiRobotAInfo: (string | string[])[]; >getRobotB : () => [number, string, string] [numberB = -1] = [2, "trimmer", "trimming"]; ->[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >[numberB = -1] : [number] >numberB = -1 : number >numberB : number >-1 : number >1 : number ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [nameMB = "helloNoName"] = multiRobotB; >[nameMB = "helloNoName"] = multiRobotB : [string, string[]] ->[nameMB = "helloNoName"] : [string] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName"] : ["helloNoName"] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string +>"helloNoName" : "helloNoName" >multiRobotB : [string, string[]] [nameMB = "helloNoName"] = getMultiRobotB(); >[nameMB = "helloNoName"] = getMultiRobotB() : [string, string[]] ->[nameMB = "helloNoName"] : [string] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName"] : ["helloNoName"] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string +>"helloNoName" : "helloNoName" >getMultiRobotB() : [string, string[]] >getMultiRobotB : () => [string, string[]] [nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; ->[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] ->[nameMB = "helloNoName"] : [string] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>[nameMB = "helloNoName"] : ["helloNoName"] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string ->["trimmer", ["trimming", "edging"]] : [string, string[]] ->"trimmer" : string ->["trimming", "edging"] : string[] ->"trimming" : string ->"edging" : string +>"helloNoName" : "helloNoName" +>["trimmer", ["trimming", "edging"]] : ["trimmer", ("trimming" | "edging")[]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ("trimming" | "edging")[] +>"trimming" : "trimming" +>"edging" : "edging" [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB : [number, string, string] ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, "helloNoName", "noSkill"] >numberB = -1 : number >numberB : number >-1 : number >1 : number ->nameB = "helloNoName" : string +>nameB = "helloNoName" : "helloNoName" >nameB : string ->"helloNoName" : string ->skillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>skillB = "noSkill" : "noSkill" >skillB : string ->"noSkill" : string +>"noSkill" : "noSkill" >robotB : [number, string, string] [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() : [number, string, string] ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, "helloNoName", "noSkill"] >numberB = -1 : number >numberB : number >-1 : number >1 : number ->nameB = "helloNoName" : string +>nameB = "helloNoName" : "helloNoName" >nameB : string ->"helloNoName" : string ->skillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>skillB = "noSkill" : "noSkill" >skillB : string ->"noSkill" : string +>"noSkill" : "noSkill" >getRobotB() : [number, string, string] >getRobotB : () => [number, string, string] [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] : [number, string, string] ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, "helloNoName", "noSkill"] >numberB = -1 : number >numberB : number >-1 : number >1 : number ->nameB = "helloNoName" : string +>nameB = "helloNoName" : "helloNoName" >nameB : string ->"helloNoName" : string ->skillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>skillB = "noSkill" : "noSkill" >skillB : string ->"noSkill" : string ->[2, "trimmer", "trimming"] : [number, string, string] +>"noSkill" : "noSkill" +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]] ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : ["helloNoName", ["noSkill", "noSkill"]] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] ->primarySkillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : ["noSkill", "noSkill"] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : ["noSkill", "noSkill"] +>primarySkillB = "noSkill" : "noSkill" >primarySkillB : string ->"noSkill" : string ->secondarySkillB = "noSkill" : string +>"noSkill" : "noSkill" +>secondarySkillB = "noSkill" : "noSkill" >secondarySkillB : string ->"noSkill" : string ->[] : [string, string] +>"noSkill" : "noSkill" +>[] : ["noSkill", "noSkill"] >multiRobotB : [string, string[]] [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]] ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : ["helloNoName", ["noSkill", "noSkill"]] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] ->primarySkillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : ["noSkill", "noSkill"] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : ["noSkill", "noSkill"] +>primarySkillB = "noSkill" : "noSkill" >primarySkillB : string ->"noSkill" : string ->secondarySkillB = "noSkill" : string +>"noSkill" : "noSkill" +>secondarySkillB = "noSkill" : "noSkill" >secondarySkillB : string ->"noSkill" : string ->[] : [string, string] +>"noSkill" : "noSkill" +>[] : ["noSkill", "noSkill"] >getMultiRobotB() : [string, string[]] >getMultiRobotB : () => [string, string[]] [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] ->nameMB = "helloNoName" : string +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : ["helloNoName", ["noSkill", "noSkill"]] +>nameMB = "helloNoName" : "helloNoName" >nameMB : string ->"helloNoName" : string ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] ->[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] ->primarySkillB = "noSkill" : string +>"helloNoName" : "helloNoName" +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : ["noSkill", "noSkill"] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : ["noSkill", "noSkill"] +>primarySkillB = "noSkill" : "noSkill" >primarySkillB : string ->"noSkill" : string ->secondarySkillB = "noSkill" : string +>"noSkill" : "noSkill" +>secondarySkillB = "noSkill" : "noSkill" >secondarySkillB : string ->"noSkill" : string ->[] : [string, string] +>"noSkill" : "noSkill" +>[] : ["noSkill", "noSkill"] ["trimmer", ["trimming", "edging"]]; ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] ->"trimmer" : string ->["trimming", "edging"] : [string, string] ->"trimming" : string ->"edging" : string +>["trimmer", ["trimming", "edging"]] : ["trimmer", ["trimming", "edging"]] +>"trimmer" : "trimmer" +>["trimming", "edging"] : ["trimming", "edging"] +>"trimming" : "trimming" +>"edging" : "edging" [numberB = -1, ...robotAInfo] = robotB; >[numberB = -1, ...robotAInfo] = robotB : [number, string, string] @@ -328,10 +328,10 @@ let multiRobotAInfo: (string | string[])[]; >robotAInfo : (number | string)[] >[2, "trimmer", "trimming"] : [number, string, string] >Robot : [number, string, string] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : [number, "trimmer", "trimming"] >2 : number ->"trimmer" : string ->"trimming" : string +>"trimmer" : "trimmer" +>"trimming" : "trimming" if (nameA == nameB) { >nameA == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types index 0ad3330e867c4..2195c1b386c5d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types @@ -17,53 +17,53 @@ declare var console: { } var hello = "hello"; >hello : string ->"hello" : string +>"hello" : "hello" var robotA: Robot = { name: "mower", skill: "mowing" }; >robotA : Robot >Robot : Robot ->{ name: "mower", skill: "mowing" } : { name: string; skill: string; } ->name : string ->"mower" : string ->skill : string ->"mowing" : string +>{ name: "mower", skill: "mowing" } : { name: "mower"; skill: "mowing"; } +>name : "mower" +>"mower" : "mower" +>skill : "mowing" +>"mowing" : "mowing" var robotB: Robot = { name: "trimmer", skill: "trimming" }; >robotB : Robot >Robot : Robot ->{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } ->name : string ->"trimmer" : string ->skill : string ->"trimming" : string +>{ name: "trimmer", skill: "trimming" } : { name: "trimmer"; skill: "trimming"; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skill : "trimming" +>"trimming" : "trimming" var { name: nameA = "" } = robotA; >name : any >nameA : string ->"" : string +>"" : "" >robotA : Robot var { name: nameB = "", skill: skillB = "" } = robotB; >name : any >nameB : string ->"" : string +>"" : "" >skill : any >skillB : string ->"" : string +>"" : "" >robotB : Robot var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; >name : any >nameC : string ->"" : string +>"" : "" >skill : any >skillC : string ->"" : string ->{ name: "Edger", skill: "cutting edges" } : { name?: string; skill?: string; } ->name : string ->"Edger" : string ->skill : string ->"cutting edges" : string +>"" : "" +>{ name: "Edger", skill: "cutting edges" } : { name?: "Edger"; skill?: "cutting edges"; } +>name : "Edger" +>"Edger" : "Edger" +>skill : "cutting edges" +>"cutting edges" : "cutting edges" if (nameA == nameB) { >nameA == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types index 1101b01b1a720..79b2cce5f692f 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types @@ -26,28 +26,28 @@ interface Robot { var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >robotA : Robot >Robot : Robot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; >robotB : Robot >Robot : Robot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; >skills : any @@ -75,15 +75,15 @@ var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { na >primaryB : string >secondary : any >secondaryB : string ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" if (nameB == nameB) { >nameB == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types index e3fdec193390d..254f385e8442d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types @@ -26,28 +26,28 @@ interface Robot { var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; >robotA : Robot >Robot : Robot ->{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"mower" : string ->skills : { primary: string; secondary: string; } ->{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } ->primary : string ->"mowing" : string ->secondary : string ->"none" : string +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: "mower"; skills: { primary: "mowing"; secondary: "none"; }; } +>name : "mower" +>"mower" : "mower" +>skills : { primary: "mowing"; secondary: "none"; } +>{ primary: "mowing", secondary: "none" } : { primary: "mowing"; secondary: "none"; } +>primary : "mowing" +>"mowing" : "mowing" +>secondary : "none" +>"none" : "none" var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; >robotB : Robot >Robot : Robot ->{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"trimmer" : string ->skills : { primary: string; secondary: string; } ->{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } ->primary : string ->"trimming" : string ->secondary : string ->"edging" : string +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: "trimmer"; skills: { primary: "trimming"; secondary: "edging"; }; } +>name : "trimmer" +>"trimmer" : "trimmer" +>skills : { primary: "trimming"; secondary: "edging"; } +>{ primary: "trimming", secondary: "edging" } : { primary: "trimming"; secondary: "edging"; } +>primary : "trimming" +>"trimming" : "trimming" +>secondary : "edging" +>"edging" : "edging" var { skills: { @@ -56,19 +56,19 @@ var { primary: primaryA = "noSkill", >primary : any >primaryA : string ->"noSkill" : string +>"noSkill" : "noSkill" secondary: secondaryA = "noSkill" >secondary : any >secondaryA : string ->"noSkill" : string +>"noSkill" : "noSkill" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } = robotA; >robotA : Robot @@ -77,7 +77,7 @@ var { name: nameB = "noNameSpecified", >name : any >nameB : string ->"noNameSpecified" : string +>"noNameSpecified" : "noNameSpecified" skills: { >skills : any @@ -85,19 +85,19 @@ var { primary: primaryB = "noSkill", >primary : any >primaryB : string ->"noSkill" : string +>"noSkill" : "noSkill" secondary: secondaryB = "noSkill" >secondary : any >secondaryB : string ->"noSkill" : string +>"noSkill" : "noSkill" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } = robotB; >robotB : Robot @@ -106,7 +106,7 @@ var { name: nameC = "noNameSpecified", >name : any >nameC : string ->"noNameSpecified" : string +>"noNameSpecified" : "noNameSpecified" skills: { >skills : any @@ -114,32 +114,32 @@ var { primary: primaryB = "noSkill", >primary : any >primaryB : string ->"noSkill" : string +>"noSkill" : "noSkill" secondary: secondaryB = "noSkill" >secondary : any >secondaryB : string ->"noSkill" : string +>"noSkill" : "noSkill" } = { primary: "noSkill", secondary: "noSkill" } ->{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } ->primary : string ->"noSkill" : string ->secondary : string ->"noSkill" : string +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: "noSkill"; secondary?: "noSkill"; } +>primary : "noSkill" +>"noSkill" : "noSkill" +>secondary : "noSkill" +>"noSkill" : "noSkill" } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : Robot >Robot : Robot ->{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } ->name : string ->"Edger" : string ->skills : { primary: string; secondary: string; } ->{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } ->primary : string ->"edging" : string ->secondary : string ->"branch trimming" : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: "Edger"; skills: { primary: "edging"; secondary: "branch trimming"; }; } +>name : "Edger" +>"Edger" : "Edger" +>skills : { primary: "edging"; secondary: "branch trimming"; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: "edging"; secondary: "branch trimming"; } +>primary : "edging" +>"edging" : "edging" +>secondary : "branch trimming" +>"branch trimming" : "branch trimming" if (nameB == nameB) { >nameB == nameB : boolean diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.types b/tests/baselines/reference/sourceMapValidationFunctionExpressions.types index 9ddfd93b89dfa..1b0470c0e01fa 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.types +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.types @@ -18,7 +18,7 @@ var greet = (greeting: string): number => { greet("Hello"); >greet("Hello") : number >greet : (greeting: string) => number ->"Hello" : string +>"Hello" : "Hello" var incrGreetings = () => greetings++; >incrGreetings : () => number diff --git a/tests/baselines/reference/specializeVarArgs1.types b/tests/baselines/reference/specializeVarArgs1.types index 97b46876e6687..68e1be49d5e63 100644 --- a/tests/baselines/reference/specializeVarArgs1.types +++ b/tests/baselines/reference/specializeVarArgs1.types @@ -41,5 +41,5 @@ a.push('Some Value'); >a.push : (...values: string[]) => any >a : ObservableArray >push : (...values: string[]) => any ->'Some Value' : string +>'Some Value' : "Some Value" diff --git a/tests/baselines/reference/staticInstanceResolution2.types b/tests/baselines/reference/staticInstanceResolution2.types index 200e3336a28a9..68abb3a08ce46 100644 --- a/tests/baselines/reference/staticInstanceResolution2.types +++ b/tests/baselines/reference/staticInstanceResolution2.types @@ -7,7 +7,7 @@ A.hasOwnProperty('foo'); >A.hasOwnProperty : (v: string) => boolean >A : typeof A >hasOwnProperty : (v: string) => boolean ->'foo' : string +>'foo' : "foo" class B { >B : B @@ -19,7 +19,7 @@ B.hasOwnProperty('foo'); >B.hasOwnProperty : (v: string) => boolean >B : typeof B >hasOwnProperty : (v: string) => boolean ->'foo' : string +>'foo' : "foo" diff --git a/tests/baselines/reference/staticMemberWithStringAndNumberNames.types b/tests/baselines/reference/staticMemberWithStringAndNumberNames.types index e23ac90d59a26..64754eaf092ff 100644 --- a/tests/baselines/reference/staticMemberWithStringAndNumberNames.types +++ b/tests/baselines/reference/staticMemberWithStringAndNumberNames.types @@ -12,13 +12,13 @@ class C { >x : number >C['foo'] : number >C : typeof C ->'foo' : string +>'foo' : "foo" x2 = C['0']; >x2 : number >C['0'] : number >C : typeof C ->'0' : string +>'0' : "0" x3 = C[0]; >x3 : number @@ -30,13 +30,13 @@ class C { >s : number >C['foo'] : number >C : typeof C ->'foo' : string +>'foo' : "foo" static s2 = C['0']; >s2 : number >C['0'] : number >C : typeof C ->'0' : string +>'0' : "0" static s3 = C[0]; >s3 : number diff --git a/tests/baselines/reference/strictModeUseContextualKeyword.types b/tests/baselines/reference/strictModeUseContextualKeyword.types index a13e3d16ef85e..fb6a11f1a9281 100644 --- a/tests/baselines/reference/strictModeUseContextualKeyword.types +++ b/tests/baselines/reference/strictModeUseContextualKeyword.types @@ -1,6 +1,6 @@ === tests/cases/compiler/strictModeUseContextualKeyword.ts === "use strict" ->"use strict" : string +>"use strict" : "use strict" var as = 0; >as : number diff --git a/tests/baselines/reference/strictModeWordInExportDeclaration.types b/tests/baselines/reference/strictModeWordInExportDeclaration.types index aa5f8e84f8248..2995e3bfab504 100644 --- a/tests/baselines/reference/strictModeWordInExportDeclaration.types +++ b/tests/baselines/reference/strictModeWordInExportDeclaration.types @@ -1,6 +1,6 @@ === tests/cases/compiler/strictModeWordInExportDeclaration.ts === "use strict" ->"use strict" : string +>"use strict" : "use strict" var x = 1; >x : number diff --git a/tests/baselines/reference/stringHasStringValuedNumericIndexer.types b/tests/baselines/reference/stringHasStringValuedNumericIndexer.types index ce9504358eb0d..43a3fe238ca7b 100644 --- a/tests/baselines/reference/stringHasStringValuedNumericIndexer.types +++ b/tests/baselines/reference/stringHasStringValuedNumericIndexer.types @@ -2,6 +2,6 @@ var str: string = ""[0]; >str : string >""[0] : string ->"" : string +>"" : "" >0 : number diff --git a/tests/baselines/reference/stringIncludes.types b/tests/baselines/reference/stringIncludes.types index 0d1e5ffea4df6..36837e0bc5905 100644 --- a/tests/baselines/reference/stringIncludes.types +++ b/tests/baselines/reference/stringIncludes.types @@ -8,17 +8,17 @@ includes = "abcde".includes("cd"); >includes : boolean >"abcde".includes("cd") : boolean >"abcde".includes : (searchString: string, position?: number) => boolean ->"abcde" : string +>"abcde" : "abcde" >includes : (searchString: string, position?: number) => boolean ->"cd" : string +>"cd" : "cd" includes = "abcde".includes("cd", 2); >includes = "abcde".includes("cd", 2) : boolean >includes : boolean >"abcde".includes("cd", 2) : boolean >"abcde".includes : (searchString: string, position?: number) => boolean ->"abcde" : string +>"abcde" : "abcde" >includes : (searchString: string, position?: number) => boolean ->"cd" : string +>"cd" : "cd" >2 : number diff --git a/tests/baselines/reference/stringIndexingResults.types b/tests/baselines/reference/stringIndexingResults.types index 9f613312e5a7c..5bc43187ff2f9 100644 --- a/tests/baselines/reference/stringIndexingResults.types +++ b/tests/baselines/reference/stringIndexingResults.types @@ -7,7 +7,7 @@ class C { y = ''; >y : string ->'' : string +>'' : "" } var c: C; @@ -18,13 +18,13 @@ var r1 = c['y']; >r1 : string >c['y'] : string >c : C ->'y' : string +>'y' : "y" var r2 = c['a']; >r2 : string >c['a'] : string >c : C ->'a' : string +>'a' : "a" var r3 = c[1]; >r3 : string @@ -50,13 +50,13 @@ var r4 = i['y']; >r4 : string >i['y'] : string >i : I ->'y' : string +>'y' : "y" var r5 = i['a']; >r5 : string >i['a'] : string >i : I ->'a' : string +>'a' : "a" var r6 = i[1]; >r6 : string @@ -78,13 +78,13 @@ var r7 = a['y']; >r7 : string >a['y'] : string >a : { [x: string]: string; y: string; } ->'y' : string +>'y' : "y" var r8 = a['a']; >r8 : string >a['a'] : string >a : { [x: string]: string; y: string; } ->'a' : string +>'a' : "a" var r9 = a[1]; >r9 : string @@ -95,21 +95,21 @@ var r9 = a[1]; var b: { [x: string]: string } = { y: '' } >b : { [x: string]: string; } >x : string ->{ y: '' } : { [x: string]: string; y: string; } ->y : string ->'' : string +>{ y: '' } : { [x: string]: ""; y: ""; } +>y : "" +>'' : "" var r10 = b['y']; >r10 : string >b['y'] : string >b : { [x: string]: string; } ->'y' : string +>'y' : "y" var r11 = b['a']; >r11 : string >b['a'] : string >b : { [x: string]: string; } ->'a' : string +>'a' : "a" var r12 = b[1]; >r12 : string diff --git a/tests/baselines/reference/stringLiteralCheckedInIf01.types b/tests/baselines/reference/stringLiteralCheckedInIf01.types index 75b7eadbc19b4..be25df63f209b 100644 --- a/tests/baselines/reference/stringLiteralCheckedInIf01.types +++ b/tests/baselines/reference/stringLiteralCheckedInIf01.types @@ -16,7 +16,7 @@ function f(foo: T) { if (foo === "a") { >foo === "a" : boolean >foo : ("a" | "b")[] | "a" | "b" ->"a" : string +>"a" : "a" return foo; >foo : ("a" | "b")[] | "a" | "b" @@ -24,7 +24,7 @@ function f(foo: T) { else if (foo === "b") { >foo === "b" : boolean >foo : ("a" | "b")[] | "a" | "b" ->"b" : string +>"b" : "b" return foo; >foo : ("a" | "b")[] | "a" | "b" diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.types b/tests/baselines/reference/stringLiteralCheckedInIf02.types index f91eea030976d..9c58c0819ab9d 100644 --- a/tests/baselines/reference/stringLiteralCheckedInIf02.types +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.types @@ -19,10 +19,10 @@ function isS(t: T): t is S { >t === "a" || t === "b" : boolean >t === "a" : boolean >t : ("a" | "b")[] | "a" | "b" ->"a" : string +>"a" : "a" >t === "b" : boolean >t : ("a" | "b")[] | "a" | "b" ->"b" : string +>"b" : "b" } function f(foo: T) { diff --git a/tests/baselines/reference/stringLiteralMatchedInSwitch01.types b/tests/baselines/reference/stringLiteralMatchedInSwitch01.types index cfbb77e07e0a3..ded50d120fd74 100644 --- a/tests/baselines/reference/stringLiteralMatchedInSwitch01.types +++ b/tests/baselines/reference/stringLiteralMatchedInSwitch01.types @@ -16,10 +16,10 @@ switch (foo) { >foo : ("a" | "b")[] | "a" | "b" case "a": ->"a" : string +>"a" : "a" case "b": ->"b" : string +>"b" : "b" break; default: diff --git a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.types b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.types index ee5b5b27b54bc..79398ee0466ef 100644 --- a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.types +++ b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.types @@ -3,16 +3,16 @@ var x = {'text\ >x : { 'text\ ': string; } >{'text\':'hello'} : { 'text\ -': string; } +': "hello"; } ':'hello'} ->'hello' : string +>'hello' : "hello" x.text = "bar" ->x.text = "bar" : string +>x.text = "bar" : "bar" >x.text : string >x : { 'text\ ': string; } >text : string ->"bar" : string +>"bar" : "bar" diff --git a/tests/baselines/reference/stringLiteralTypeAssertion01.types b/tests/baselines/reference/stringLiteralTypeAssertion01.types deleted file mode 100644 index f70313f834700..0000000000000 --- a/tests/baselines/reference/stringLiteralTypeAssertion01.types +++ /dev/null @@ -1,107 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts === - -type S = "a" | "b"; ->S : "a" | "b" - -type T = S[] | S; ->T : ("a" | "b")[] | "a" | "b" ->S : "a" | "b" ->S : "a" | "b" - -var s: S; ->s : "a" | "b" ->S : "a" | "b" - -var t: T; ->t : ("a" | "b")[] | "a" | "b" ->T : ("a" | "b")[] | "a" | "b" - -var str: string; ->str : string - -//////////////// - -s = t; ->s = t : "a" | "b" ->s : "a" | "b" ->t : "a" | "b" ->S : "a" | "b" ->t : ("a" | "b")[] | "a" | "b" - -s = t as S; ->s = t as S : "a" | "b" ->s : "a" | "b" ->t as S : "a" | "b" ->t : ("a" | "b")[] | "a" | "b" ->S : "a" | "b" - -s = str; ->s = str : "a" | "b" ->s : "a" | "b" ->str : "a" | "b" ->S : "a" | "b" ->str : string - -s = str as S; ->s = str as S : "a" | "b" ->s : "a" | "b" ->str as S : "a" | "b" ->str : string ->S : "a" | "b" - -//////////////// - -t = s; ->t = s : ("a" | "b")[] | "a" | "b" ->t : ("a" | "b")[] | "a" | "b" ->s : ("a" | "b")[] | "a" | "b" ->T : ("a" | "b")[] | "a" | "b" ->s : "a" | "b" - -t = s as T; ->t = s as T : ("a" | "b")[] | "a" | "b" ->t : ("a" | "b")[] | "a" | "b" ->s as T : ("a" | "b")[] | "a" | "b" ->s : "a" | "b" ->T : ("a" | "b")[] | "a" | "b" - -t = str; ->t = str : ("a" | "b")[] | "a" | "b" ->t : ("a" | "b")[] | "a" | "b" ->str : ("a" | "b")[] | "a" | "b" ->T : ("a" | "b")[] | "a" | "b" ->str : string - -t = str as T; ->t = str as T : ("a" | "b")[] | "a" | "b" ->t : ("a" | "b")[] | "a" | "b" ->str as T : ("a" | "b")[] | "a" | "b" ->str : string ->T : ("a" | "b")[] | "a" | "b" - -//////////////// - -str = s; ->str = s : string ->str : string ->s : string ->s : "a" | "b" - -str = s as string; ->str = s as string : string ->str : string ->s as string : string ->s : "a" | "b" - -str = t; ->str = t : string ->str : string ->t : string ->t : ("a" | "b")[] | "a" | "b" - -str = t as string; ->str = t as string : string ->str : string ->t as string : string ->t : ("a" | "b")[] | "a" | "b" - diff --git a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types deleted file mode 100644 index ddc79b818579e..0000000000000 --- a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts === - -declare function myRandBool(): boolean; ->myRandBool : () => boolean - -let a: "foo" = "foo"; ->a : "foo" ->"foo" : "foo" - -let b = a || "foo"; ->b : "foo" ->a || "foo" : "foo" ->a : "foo" ->"foo" : "foo" - -let c: "foo" = b; ->c : "foo" ->b : "foo" - -let d = b || "bar"; ->d : "foo" | "bar" ->b || "bar" : "foo" | "bar" ->b : "foo" ->"bar" : "bar" - -let e: "foo" | "bar" = d; ->e : "foo" | "bar" ->d : "foo" | "bar" - diff --git a/tests/baselines/reference/stringLiteralTypesAndTuples01.types b/tests/baselines/reference/stringLiteralTypesAndTuples01.types index c874973e3e590..055ce765cbf1b 100644 --- a/tests/baselines/reference/stringLiteralTypesAndTuples01.types +++ b/tests/baselines/reference/stringLiteralTypesAndTuples01.types @@ -6,11 +6,11 @@ let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; >brave : string >newish : string >world : string ->["Hello", "Brave", "New", "World"] : [string, string, string, string] ->"Hello" : string ->"Brave" : string ->"New" : string ->"World" : string +>["Hello", "Brave", "New", "World"] : ["Hello", "Brave", "New", "World"] +>"Hello" : "Hello" +>"Brave" : "Brave" +>"New" : "New" +>"World" : "World" type RexOrRaptor = "t-rex" | "raptor" >RexOrRaptor : "t-rex" | "raptor" @@ -38,22 +38,22 @@ function rawr(dino: RexOrRaptor) { if (dino === "t-rex") { >dino === "t-rex" : boolean >dino : "t-rex" | "raptor" ->"t-rex" : string +>"t-rex" : "t-rex" return "ROAAAAR!"; ->"ROAAAAR!" : string +>"ROAAAAR!" : "ROAAAAR!" } if (dino === "raptor") { >dino === "raptor" : boolean >dino : "t-rex" | "raptor" ->"raptor" : string +>"raptor" : "raptor" return "yip yip!"; ->"yip yip!" : string +>"yip yip!" : "yip yip!" } throw "Unexpected " + dino; >"Unexpected " + dino : string ->"Unexpected " : string +>"Unexpected " : "Unexpected " >dino : "t-rex" | "raptor" } diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types index fe9163fc81911..77276396623bc 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types @@ -33,7 +33,7 @@ let f = foo(x => x); >x : "foo" let fResult = f("foo"); ->fResult : "foo" +>fResult : string >f("foo") : "foo" >f : (x: "foo") => "foo" >"foo" : "foo" @@ -48,7 +48,7 @@ let g = foo((x => x)); >x : "foo" let gResult = g("foo"); ->gResult : "foo" +>gResult : string >g("foo") : "foo" >g : (x: "foo") => "foo" >"foo" : "foo" diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types index e5ff509822b99..5787c39f8d466 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types @@ -15,7 +15,7 @@ var y: T = "bar"; if (x === "foo") { >x === "foo" : boolean >x : "foo" | "bar" | "baz" ->"foo" : string +>"foo" : "foo" let a = x; >a : "foo" | "bar" | "baz" @@ -24,7 +24,7 @@ if (x === "foo") { else if (x !== "bar") { >x !== "bar" : boolean >x : "foo" | "bar" | "baz" ->"bar" : string +>"bar" : "bar" let b = x || y; >b : "foo" | "bar" | "baz" diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types index b468c620376ba..540007f9927b8 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types @@ -15,7 +15,7 @@ var y: T = "bar"; if (x === "foo") { >x === "foo" : boolean >x : "foo" | "bar" | "baz" | string ->"foo" : string +>"foo" : "foo" let a = x; >a : "foo" | "bar" | "baz" | string @@ -24,7 +24,7 @@ if (x === "foo") { else if (x !== "bar") { >x !== "bar" : boolean >x : "foo" | "bar" | "baz" | string ->"bar" : string +>"bar" : "bar" let b = x || y; >b : string diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types index 5fca6e69be996..6529c555a9e3c 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types @@ -14,7 +14,7 @@ var y: T = "bar"; if (x === "foo") { >x === "foo" : boolean >x : "foo" | "bar" | number ->"foo" : string +>"foo" : "foo" let a = x; >a : "foo" | "bar" | number @@ -23,7 +23,7 @@ if (x === "foo") { else if (x !== "bar") { >x !== "bar" : boolean >x : "foo" | "bar" | number ->"bar" : string +>"bar" : "bar" let b = x || y; >b : "foo" | "bar" | number diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types index ad92dc360d0a9..e1180603ccff0 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types @@ -16,7 +16,7 @@ let y: T = "foo"; if (x === "") { >x === "" : boolean >x : "" | "foo" ->"" : string +>"" : "" let a = x; >a : "" | "foo" @@ -26,7 +26,7 @@ if (x === "") { if (x !== "") { >x !== "" : boolean >x : "" | "foo" ->"" : string +>"" : "" let b = x; >b : "" | "foo" @@ -36,7 +36,7 @@ if (x !== "") { if (x == "") { >x == "" : boolean >x : "" | "foo" ->"" : string +>"" : "" let c = x; >c : "" | "foo" @@ -46,7 +46,7 @@ if (x == "") { if (x != "") { >x != "" : boolean >x : "" | "foo" ->"" : string +>"" : "" let d = x; >d : "" | "foo" diff --git a/tests/baselines/reference/stringLiteralTypesOverloads01.types b/tests/baselines/reference/stringLiteralTypesOverloads01.types index 6ba8d482117c6..dfa50728fdee2 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads01.types +++ b/tests/baselines/reference/stringLiteralTypesOverloads01.types @@ -39,15 +39,15 @@ function getFalsyPrimitive(x: PrimitiveName): number | string | boolean { if (x === "string") { >x === "string" : boolean >x : "string" | "number" | "boolean" ->"string" : string +>"string" : "string" return ""; ->"" : string +>"" : "" } if (x === "number") { >x === "number" : boolean >x : "string" | "number" | "boolean" ->"number" : string +>"number" : "number" return 0; >0 : number @@ -55,7 +55,7 @@ function getFalsyPrimitive(x: PrimitiveName): number | string | boolean { if (x === "boolean") { >x === "boolean" : boolean >x : "string" | "number" | "boolean" ->"boolean" : string +>"boolean" : "boolean" return false; >false : boolean @@ -63,7 +63,7 @@ function getFalsyPrimitive(x: PrimitiveName): number | string | boolean { // Should be unreachable. throw "Invalid value"; ->"Invalid value" : string +>"Invalid value" : "Invalid value" } namespace Consts1 { diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.types b/tests/baselines/reference/stringLiteralTypesOverloads04.types deleted file mode 100644 index 32d316494ca5e..0000000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.types +++ /dev/null @@ -1,23 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts === - -declare function f(x: (p: "foo" | "bar") => "foo"); ->f : (x: (p: "foo" | "bar") => "foo") => any ->x : (p: "foo" | "bar") => "foo" ->p : "foo" | "bar" - -f(y => { ->f(y => { let z = y = "foo"; return z;}) : any ->f : (x: (p: "foo" | "bar") => "foo") => any ->y => { let z = y = "foo"; return z;} : (y: "foo" | "bar") => "foo" ->y : "foo" | "bar" - - let z = y = "foo"; ->z : "foo" ->y = "foo" : "foo" ->y : "foo" | "bar" ->"foo" : "foo" - - return z; ->z : "foo" - -}) diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types index 90cb538b800d1..11e222083fe3d 100644 --- a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types @@ -23,14 +23,14 @@ let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; let a = "" + abc; >a : string >"" + abc : string ->"" : string +>"" : "" >abc : "ABC" let b = abc + ""; >b : string >abc + "" : string >abc : "ABC" ->"" : string +>"" : "" let c = 10 + abc; >c : string @@ -96,12 +96,12 @@ let m = abcOrXyzOrNumber + ""; >m : string >abcOrXyzOrNumber + "" : string >abcOrXyzOrNumber : "ABC" | "XYZ" | number ->"" : string +>"" : "" let n = "" + abcOrXyzOrNumber; >n : string >"" + abcOrXyzOrNumber : string ->"" : string +>"" : "" >abcOrXyzOrNumber : "ABC" | "XYZ" | number let o = abcOrXyzOrNumber + abcOrXyz; diff --git a/tests/baselines/reference/stringNamedPropertyAccess.types b/tests/baselines/reference/stringNamedPropertyAccess.types index 2d0b585f82870..d353c9157714d 100644 --- a/tests/baselines/reference/stringNamedPropertyAccess.types +++ b/tests/baselines/reference/stringNamedPropertyAccess.types @@ -13,13 +13,13 @@ var r1 = c["a b"]; >r1 : number >c["a b"] : number >c : C ->"a b" : string +>"a b" : "a b" var r1b = C['c d']; >r1b : number >C['c d'] : number >C : typeof C ->'c d' : string +>'c d' : "c d" interface I { >I : I @@ -34,7 +34,7 @@ var r2 = i["a b"]; >r2 : number >i["a b"] : number >i : I ->"a b" : string +>"a b" : "a b" var a: { >a : { "a b": number; } @@ -45,7 +45,7 @@ var r3 = a["a b"]; >r3 : number >a["a b"] : number >a : { "a b": number; } ->"a b" : string +>"a b" : "a b" var b = { >b : { "a b": number; } @@ -58,5 +58,5 @@ var r4 = b["a b"]; >r4 : number >b["a b"] : number >b : { "a b": number; } ->"a b" : string +>"a b" : "a b" diff --git a/tests/baselines/reference/stringPropertyAccess.types b/tests/baselines/reference/stringPropertyAccess.types index 0540914035366..653dd80b21bb8 100644 --- a/tests/baselines/reference/stringPropertyAccess.types +++ b/tests/baselines/reference/stringPropertyAccess.types @@ -1,7 +1,7 @@ === tests/cases/conformance/types/primitives/string/stringPropertyAccess.ts === var x = ''; >x : string ->'' : string +>'' : "" var a = x.charAt(0); >a : string @@ -17,14 +17,14 @@ var b = x.hasOwnProperty('charAt'); >x.hasOwnProperty : (v: string) => boolean >x : string >hasOwnProperty : (v: string) => boolean ->'charAt' : string +>'charAt' : "charAt" var c = x['charAt'](0); >c : string >x['charAt'](0) : string >x['charAt'] : (pos: number) => string >x : string ->'charAt' : string +>'charAt' : "charAt" >0 : number var e = x['hasOwnProperty']('toFixed'); @@ -32,6 +32,6 @@ var e = x['hasOwnProperty']('toFixed'); >x['hasOwnProperty']('toFixed') : boolean >x['hasOwnProperty'] : (v: string) => boolean >x : string ->'hasOwnProperty' : string ->'toFixed' : string +>'hasOwnProperty' : "hasOwnProperty" +>'toFixed' : "toFixed" diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types index 39c50bde35569..9362ff4be3fc0 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types @@ -259,17 +259,17 @@ function f6(x: T) { var r2 = true ? '' : x; // ok >r2 : string | T ->true ? '' : x : string | T +>true ? '' : x : "" | T >true : boolean ->'' : string +>'' : "" >x : T var r2 = true ? x : ''; // ok >r2 : string | T ->true ? x : '' : T | string +>true ? x : '' : T | "" >true : boolean >x : T ->'' : string +>'' : "" } function f7(x: T) { diff --git a/tests/baselines/reference/subtypingTransitivity.types b/tests/baselines/reference/subtypingTransitivity.types index 0a41e045d98c3..52d35319f28f6 100644 --- a/tests/baselines/reference/subtypingTransitivity.types +++ b/tests/baselines/reference/subtypingTransitivity.types @@ -35,11 +35,11 @@ var d2: D2; >D2 : D2 d.x = ''; ->d.x = '' : string +>d.x = '' : "" >d.x : string >d : D >x : string ->'' : string +>'' : "" b = d; >b = d : D diff --git a/tests/baselines/reference/subtypingWithCallSignatures.types b/tests/baselines/reference/subtypingWithCallSignatures.types index 50e773882d01e..9c9a44005ae2f 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures.types +++ b/tests/baselines/reference/subtypingWithCallSignatures.types @@ -28,7 +28,7 @@ module CallSignature { >T : T >x : T >T : T ->'' : string +>'' : "" declare function foo2(cb: (x: number, y: number) => void): typeof cb; >foo2 : { (cb: (x: number, y: number) => void): (x: number, y: number) => void; (cb: any): any; } @@ -58,5 +58,5 @@ module CallSignature { >T : T >x : T >T : T ->'' : string +>'' : "" } diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types index b72993e7bea1c..a4afe0dba16dd 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.types +++ b/tests/baselines/reference/subtypingWithCallSignatures2.types @@ -348,15 +348,15 @@ var r2arg1 = (x: T) => ['']; >T : T >x : T >T : T ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2arg2 = (x: number) => ['']; >r2arg2 : (x: number) => string[] >(x: number) => [''] : (x: number) => string[] >x : number ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2 = foo2(r2arg1); >r2 : (x: number) => string[] @@ -423,7 +423,7 @@ var r4arg2 = (x: string, y: number) => ''; >(x: string, y: number) => '' : (x: string, y: number) => string >x : string >y : number ->'' : string +>'' : "" var r4 = foo4(r4arg1); // any >r4 : any @@ -461,7 +461,7 @@ var r5arg2 = (x: (arg: string) => number) => ''; >(x: (arg: string) => number) => '' : (x: (arg: string) => number) => string >x : (arg: string) => number >arg : string ->'' : string +>'' : "" var r5 = foo5(r5arg1); // any >r5 : any diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index 2d4c6e9fda572..f05f21947a8b8 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -223,8 +223,8 @@ module Errors { >[(x: number) => [''], (x: T) => null] : ((x: T) => U[])[] >(x: number) => [''] : (x: number) => string[] >x : number ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" >(x: T) => null : (x: T) => U[] >T : T >U : U @@ -247,8 +247,8 @@ module Errors { >null : null >(x: number) => [''] : (x: number) => string[] >x : number ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2arg = (x: (arg: T) => U) => (r: T) => null; >r2arg : (x: (arg: T) => U) => (r: T) => V @@ -616,8 +616,8 @@ module WithGenericSignaturesInBaseType { >T : T >x : T >T : T ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now >r2 : (x: T) => T[] diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.types b/tests/baselines/reference/subtypingWithCallSignatures4.types index f490f78787823..08a43c5fa680c 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.types +++ b/tests/baselines/reference/subtypingWithCallSignatures4.types @@ -263,8 +263,8 @@ var r2arg = (x: T) => ['']; >T : T >x : T >T : T ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2arg2 = (x: T) => ['']; >r2arg2 : (x: T) => string[] @@ -272,8 +272,8 @@ var r2arg2 = (x: T) => ['']; >T : T >x : T >T : T ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" var r2 = foo2(r2arg); >r2 : any @@ -337,7 +337,7 @@ var r4arg = (x: T, y: U) => ''; >T : T >y : U >U : U ->'' : string +>'' : "" var r4arg2 = (x: T, y: U) => ''; >r4arg2 : (x: T, y: U) => string @@ -348,7 +348,7 @@ var r4arg2 = (x: T, y: U) => ''; >T : T >y : U >U : U ->'' : string +>'' : "" var r4 = foo4(r4arg); >r4 : any diff --git a/tests/baselines/reference/super2.types b/tests/baselines/reference/super2.types index a3807f03099df..2ff73710080b6 100644 --- a/tests/baselines/reference/super2.types +++ b/tests/baselines/reference/super2.types @@ -7,14 +7,14 @@ class Base5 { >x : () => string return "BaseX"; ->"BaseX" : string +>"BaseX" : "BaseX" } public y() { >y : () => string return "BaseY"; ->"BaseY" : string +>"BaseY" : "BaseY" } } @@ -26,7 +26,7 @@ class Sub5 extends Base5 { >x : () => string return "SubX"; ->"SubX" : string +>"SubX" : "SubX" } } @@ -62,7 +62,7 @@ class Base6 { >x : () => string return "BaseX"; ->"BaseX" : string +>"BaseX" : "BaseX" } } @@ -74,7 +74,7 @@ class Sub6 extends Base6 { >y : () => string return "SubY"; ->"SubY" : string +>"SubY" : "SubY" } } diff --git a/tests/baselines/reference/superCalls.types b/tests/baselines/reference/superCalls.types index ce5353df329b0..3570c36a048ed 100644 --- a/tests/baselines/reference/superCalls.types +++ b/tests/baselines/reference/superCalls.types @@ -26,14 +26,14 @@ class Derived extends Base { super(''); >super('') : void >super : typeof Base ->'' : string +>'' : "" //type of super call expression is void var p = super(''); >p : void >super('') : void >super : typeof Base ->'' : string +>'' : "" var p = v(); >p : void @@ -54,7 +54,7 @@ class OtherDerived extends OtherBase { constructor() { var p = ''; >p : string ->'' : string +>'' : "" super(); >super() : void diff --git a/tests/baselines/reference/superPropertyAccess_ES6.types b/tests/baselines/reference/superPropertyAccess_ES6.types index b10b1944a44ee..446e5458511bf 100644 --- a/tests/baselines/reference/superPropertyAccess_ES6.types +++ b/tests/baselines/reference/superPropertyAccess_ES6.types @@ -84,6 +84,6 @@ class B extends A { >property : string >value + " addition" : string >value : string ->" addition" : string +>" addition" : " addition" } } diff --git a/tests/baselines/reference/superSymbolIndexedAccess1.types b/tests/baselines/reference/superSymbolIndexedAccess1.types index af2c6cab156be..afee2803ed3d8 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess1.types +++ b/tests/baselines/reference/superSymbolIndexedAccess1.types @@ -5,7 +5,7 @@ var symbol = Symbol.for('myThing'); >Symbol.for : (key: string) => symbol >Symbol : SymbolConstructor >for : (key: string) => symbol ->'myThing' : string +>'myThing' : "myThing" class Foo { >Foo : Foo diff --git a/tests/baselines/reference/switchBreakStatements.types b/tests/baselines/reference/switchBreakStatements.types deleted file mode 100644 index 0364d878d5ab4..0000000000000 --- a/tests/baselines/reference/switchBreakStatements.types +++ /dev/null @@ -1,127 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts === - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break; -} - -ONE: ->ONE : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - FIVE: ->FIVE : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break FOUR; ->FOUR : any - } -} - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - SIX: ->SIX : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break SIX; ->SIX : any - } -} - -SEVEN: ->SEVEN : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break SEVEN; ->SEVEN : any - - EIGHT: ->EIGHT : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any - } - } - } -} - diff --git a/tests/baselines/reference/switchFallThroughs.types b/tests/baselines/reference/switchFallThroughs.types index 7a88985741c9c..3a849ccb3ac67 100644 --- a/tests/baselines/reference/switchFallThroughs.types +++ b/tests/baselines/reference/switchFallThroughs.types @@ -17,7 +17,7 @@ function R1(index: number) { var a = 'a'; >a : string ->'a' : string +>'a' : "a" return a; >a : string @@ -29,14 +29,14 @@ function R1(index: number) { >4 : number return 'b'; ->'b' : string +>'b' : "b" } case 5: >5 : number default: return 'c'; ->'c' : string +>'c' : "c" } } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.types b/tests/baselines/reference/symbolDeclarationEmit10.types index 0d8d54c28de55..d7f5c861e8940 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.types +++ b/tests/baselines/reference/symbolDeclarationEmit10.types @@ -7,7 +7,7 @@ var obj = { >Symbol.isConcatSpreadable : symbol >Symbol : SymbolConstructor >isConcatSpreadable : symbol ->'' : string +>'' : "" set [Symbol.isConcatSpreadable](x) { } >Symbol.isConcatSpreadable : symbol diff --git a/tests/baselines/reference/symbolDeclarationEmit11.types b/tests/baselines/reference/symbolDeclarationEmit11.types index 30f92266eb28f..a55248e157e9b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.types +++ b/tests/baselines/reference/symbolDeclarationEmit11.types @@ -17,7 +17,7 @@ class C { >Symbol.toPrimitive : symbol >Symbol : SymbolConstructor >toPrimitive : symbol ->"" : string +>"" : "" static set [Symbol.toPrimitive](x) { } >Symbol.toPrimitive : symbol diff --git a/tests/baselines/reference/symbolDeclarationEmit13.types b/tests/baselines/reference/symbolDeclarationEmit13.types index ce77ec9b38b4c..9fa17acdc106f 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.types +++ b/tests/baselines/reference/symbolDeclarationEmit13.types @@ -6,7 +6,7 @@ class C { >Symbol.toPrimitive : symbol >Symbol : SymbolConstructor >toPrimitive : symbol ->"" : string +>"" : "" set [Symbol.toStringTag](x) { } >Symbol.toStringTag : symbol diff --git a/tests/baselines/reference/symbolDeclarationEmit14.types b/tests/baselines/reference/symbolDeclarationEmit14.types index 5e975a6eae40f..daf7b6d5731a0 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.types +++ b/tests/baselines/reference/symbolDeclarationEmit14.types @@ -6,11 +6,11 @@ class C { >Symbol.toPrimitive : symbol >Symbol : SymbolConstructor >toPrimitive : symbol ->"" : string +>"" : "" get [Symbol.toStringTag]() { return ""; } >Symbol.toStringTag : symbol >Symbol : SymbolConstructor >toStringTag : symbol ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/symbolDeclarationEmit2.types b/tests/baselines/reference/symbolDeclarationEmit2.types index 1072783671258..23d2fac2de871 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.types +++ b/tests/baselines/reference/symbolDeclarationEmit2.types @@ -6,5 +6,5 @@ class C { >Symbol.toPrimitive : symbol >Symbol : SymbolConstructor >toPrimitive : symbol ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.types b/tests/baselines/reference/symbolDeclarationEmit4.types index 51e4135b4987c..f9fa6dc581c96 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.types +++ b/tests/baselines/reference/symbolDeclarationEmit4.types @@ -6,7 +6,7 @@ class C { >Symbol.toPrimitive : symbol >Symbol : SymbolConstructor >toPrimitive : symbol ->"" : string +>"" : "" set [Symbol.toPrimitive](x) { } >Symbol.toPrimitive : symbol diff --git a/tests/baselines/reference/symbolProperty18.types b/tests/baselines/reference/symbolProperty18.types index 772e6aff2f7b0..e7065280208e2 100644 --- a/tests/baselines/reference/symbolProperty18.types +++ b/tests/baselines/reference/symbolProperty18.types @@ -13,7 +13,7 @@ var i = { >Symbol.toStringTag : symbol >Symbol : SymbolConstructor >toStringTag : symbol ->"" : string +>"" : "" set [Symbol.toPrimitive](p: boolean) { } >Symbol.toPrimitive : symbol diff --git a/tests/baselines/reference/symbolProperty22.types b/tests/baselines/reference/symbolProperty22.types index 29d16b1553ea1..628164f39299f 100644 --- a/tests/baselines/reference/symbolProperty22.types +++ b/tests/baselines/reference/symbolProperty22.types @@ -28,7 +28,7 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); >foo("", { [Symbol.unscopables]: s => s.length }) : number >foo : (p1: T, p2: I) => U ->"" : string +>"" : "" >{ [Symbol.unscopables]: s => s.length } : { [Symbol.unscopables]: (s: string) => number; } >Symbol.unscopables : symbol >Symbol : SymbolConstructor diff --git a/tests/baselines/reference/symbolProperty26.types b/tests/baselines/reference/symbolProperty26.types index 386761c98f91e..cde412000db1e 100644 --- a/tests/baselines/reference/symbolProperty26.types +++ b/tests/baselines/reference/symbolProperty26.types @@ -8,7 +8,7 @@ class C1 { >toStringTag : symbol return ""; ->"" : string +>"" : "" } } @@ -22,6 +22,6 @@ class C2 extends C1 { >toStringTag : symbol return ""; ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/symbolProperty27.types b/tests/baselines/reference/symbolProperty27.types index d8ff2f2f11629..2c138b5a9d0de 100644 --- a/tests/baselines/reference/symbolProperty27.types +++ b/tests/baselines/reference/symbolProperty27.types @@ -22,6 +22,6 @@ class C2 extends C1 { >toStringTag : symbol return ""; ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/symbolProperty28.types b/tests/baselines/reference/symbolProperty28.types index 6eddebf44d858..87916b1f841b1 100644 --- a/tests/baselines/reference/symbolProperty28.types +++ b/tests/baselines/reference/symbolProperty28.types @@ -8,9 +8,9 @@ class C1 { >toStringTag : symbol return { x: "" }; ->{ x: "" } : { x: string; } ->x : string ->"" : string +>{ x: "" } : { x: ""; } +>x : "" +>"" : "" } } diff --git a/tests/baselines/reference/symbolProperty40.types b/tests/baselines/reference/symbolProperty40.types index c349a705a290a..fe0f1bbb620f3 100644 --- a/tests/baselines/reference/symbolProperty40.types +++ b/tests/baselines/reference/symbolProperty40.types @@ -37,7 +37,7 @@ c[Symbol.iterator](""); >Symbol.iterator : symbol >Symbol : SymbolConstructor >iterator : symbol ->"" : string +>"" : "" c[Symbol.iterator](0); >c[Symbol.iterator](0) : number diff --git a/tests/baselines/reference/symbolProperty41.types b/tests/baselines/reference/symbolProperty41.types index f312481ac0403..5eebd1076599a 100644 --- a/tests/baselines/reference/symbolProperty41.types +++ b/tests/baselines/reference/symbolProperty41.types @@ -40,7 +40,7 @@ c[Symbol.iterator](""); >Symbol.iterator : symbol >Symbol : SymbolConstructor >iterator : symbol ->"" : string +>"" : "" c[Symbol.iterator]("hello"); >c[Symbol.iterator]("hello") : { x: string; hello: string; } diff --git a/tests/baselines/reference/symbolProperty45.types b/tests/baselines/reference/symbolProperty45.types index 946ceeb9ea1fc..cb0fbdffc5315 100644 --- a/tests/baselines/reference/symbolProperty45.types +++ b/tests/baselines/reference/symbolProperty45.types @@ -8,7 +8,7 @@ class C { >hasInstance : symbol return ""; ->"" : string +>"" : "" } get [Symbol.toPrimitive]() { >Symbol.toPrimitive : symbol @@ -16,6 +16,6 @@ class C { >toPrimitive : symbol return ""; ->"" : string +>"" : "" } } diff --git a/tests/baselines/reference/symbolProperty56.types b/tests/baselines/reference/symbolProperty56.types index 8799890874525..594924135eeb1 100644 --- a/tests/baselines/reference/symbolProperty56.types +++ b/tests/baselines/reference/symbolProperty56.types @@ -24,5 +24,5 @@ module M { >obj : { [Symbol.iterator]: number; } >Symbol["iterator"] : any >Symbol : {} ->"iterator" : string +>"iterator" : "iterator" } diff --git a/tests/baselines/reference/symbolProperty57.types b/tests/baselines/reference/symbolProperty57.types index b0c02052e58b9..fe6973f7390ea 100644 --- a/tests/baselines/reference/symbolProperty57.types +++ b/tests/baselines/reference/symbolProperty57.types @@ -17,5 +17,5 @@ obj[Symbol["nonsense"]]; >obj : { [Symbol.iterator]: number; } >Symbol["nonsense"] : any >Symbol : SymbolConstructor ->"nonsense" : string +>"nonsense" : "nonsense" diff --git a/tests/baselines/reference/symbolType11.types b/tests/baselines/reference/symbolType11.types index b251db4330106..4f56b0e776e9a 100644 --- a/tests/baselines/reference/symbolType11.types +++ b/tests/baselines/reference/symbolType11.types @@ -5,7 +5,7 @@ var s = Symbol.for("logical"); >Symbol.for : (key: string) => symbol >Symbol : SymbolConstructor >for : (key: string) => symbol ->"logical" : string +>"logical" : "logical" s && s; >s && s : symbol diff --git a/tests/baselines/reference/symbolType17.types b/tests/baselines/reference/symbolType17.types index a6174f7a3aeb2..c186f915cd0ac 100644 --- a/tests/baselines/reference/symbolType17.types +++ b/tests/baselines/reference/symbolType17.types @@ -14,7 +14,7 @@ if (typeof x === "symbol") { >typeof x === "symbol" : boolean >typeof x : string >x : symbol | Foo ->"symbol" : string +>"symbol" : "symbol" x; >x : symbol diff --git a/tests/baselines/reference/symbolType18.types b/tests/baselines/reference/symbolType18.types index 68c43215136fa..8f0012f4f118b 100644 --- a/tests/baselines/reference/symbolType18.types +++ b/tests/baselines/reference/symbolType18.types @@ -14,7 +14,7 @@ if (typeof x === "object") { >typeof x === "object" : boolean >typeof x : string >x : symbol | Foo ->"object" : string +>"object" : "object" x; >x : Foo diff --git a/tests/baselines/reference/symbolType19.types b/tests/baselines/reference/symbolType19.types index 33c4f5ac07c65..18daa27fd00d7 100644 --- a/tests/baselines/reference/symbolType19.types +++ b/tests/baselines/reference/symbolType19.types @@ -13,7 +13,7 @@ if (typeof x === "number") { >typeof x === "number" : boolean >typeof x : string >x : symbol | E ->"number" : string +>"number" : "number" x; >x : E diff --git a/tests/baselines/reference/systemModule13.types b/tests/baselines/reference/systemModule13.types index 35f22be98b8ea..113929abd5bd5 100644 --- a/tests/baselines/reference/systemModule13.types +++ b/tests/baselines/reference/systemModule13.types @@ -15,13 +15,13 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; >b : any >c : any >z1 : string ->{a: true, b: {c: "123"}} : { a: boolean; b: { c: string; }; } +>{a: true, b: {c: "123"}} : { a: boolean; b: { c: "123"; }; } >a : boolean >true : boolean ->b : { c: string; } ->{c: "123"} : { c: string; } ->c : string ->"123" : string +>b : { c: "123"; } +>{c: "123"} : { c: "123"; } +>c : "123" +>"123" : "123" for ([x] of [[1]]) {} >[x] : number[] diff --git a/tests/baselines/reference/systemModule15.types b/tests/baselines/reference/systemModule15.types index 502638dab93bf..b3f5c0434044f 100644 --- a/tests/baselines/reference/systemModule15.types +++ b/tests/baselines/reference/systemModule15.types @@ -58,7 +58,7 @@ export { export var value = "youpi"; >value : string ->"youpi" : string +>"youpi" : "youpi" export default value; >value : string @@ -67,5 +67,5 @@ export default value; export var value2 = "v"; >value2 : string ->"v" : string +>"v" : "v" diff --git a/tests/baselines/reference/systemModule8.types b/tests/baselines/reference/systemModule8.types index 2c3dd1e48bb04..e019a257a561a 100644 --- a/tests/baselines/reference/systemModule8.types +++ b/tests/baselines/reference/systemModule8.types @@ -126,13 +126,13 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; >b : any >c : any >z1 : string ->{a: true, b: {c: "123"}} : { a: boolean; b: { c: string; }; } +>{a: true, b: {c: "123"}} : { a: boolean; b: { c: "123"; }; } >a : boolean >true : boolean ->b : { c: string; } ->{c: "123"} : { c: string; } ->c : string ->"123" : string +>b : { c: "123"; } +>{c: "123"} : { c: "123"; } +>c : "123" +>"123" : "123" for ([x] of [[1]]) {} >[x] : any[] diff --git a/tests/baselines/reference/taggedTemplateContextualTyping2.types b/tests/baselines/reference/taggedTemplateContextualTyping2.types index 8fcfc02c62b69..b52c44d6fcaea 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping2.types +++ b/tests/baselines/reference/taggedTemplateContextualTyping2.types @@ -77,7 +77,7 @@ tempTag2 `${ x => { x(undefined); return x; } }${ y => { yy : (p: T) => T >null : null >y : (p: T) => T ->"hello" : string +>"hello" : "hello" tempTag2 `${ x => { x(undefined); return x; } }${ undefined }${ "hello" }`; >tempTag2 `${ x => { x(undefined); return x; } }${ undefined }${ "hello" }` : string @@ -90,5 +90,5 @@ tempTag2 `${ x => { x(undefined); return x; } }${ undefined }${ >undefined : undefined >x : (p: T) => T >undefined : undefined ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types index 329ce9c3b21eb..e42bf52c005d4 100644 --- a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types +++ b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types @@ -8,5 +8,5 @@ f `\x0D${ "Interrupted CRLF" }\x0A`; >f `\x0D${ "Interrupted CRLF" }\x0A` : void >f : (...args: any[]) => void >`\x0D${ "Interrupted CRLF" }\x0A` : string ->"Interrupted CRLF" : string +>"Interrupted CRLF" : "Interrupted CRLF" diff --git a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types index f350b6137a7fd..1b5fefe9c9ee0 100644 --- a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types +++ b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types @@ -8,5 +8,5 @@ f `\x0D${ "Interrupted CRLF" }\x0A`; >f `\x0D${ "Interrupted CRLF" }\x0A` : void >f : (...args: any[]) => void >`\x0D${ "Interrupted CRLF" }\x0A` : string ->"Interrupted CRLF" : string +>"Interrupted CRLF" : "Interrupted CRLF" diff --git a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types index 9b02e0d3fb3e0..6619696bb3900 100644 --- a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types +++ b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types @@ -3,33 +3,33 @@ `0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` >`0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " diff --git a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types index ed2291262839f..2fae6446989cf 100644 --- a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types @@ -10,33 +10,33 @@ f `0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " >f `0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` : void >f : (...x: any[]) => void >`0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types index 83a0f2cf9f417..9ae2003fa6f5e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types @@ -37,7 +37,7 @@ var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >`abc${ 0 }def` : string >0 : number >member : new (s: string) => new (n: number) => new () => boolean ->"hello" : string +>"hello" : "hello" >42 : number >true : boolean diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types index c240b7ced11f6..224a7455d1459 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types @@ -37,7 +37,7 @@ var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >`abc${ 0 }def` : string >0 : number >member : new (s: string) => new (n: number) => new () => boolean ->"hello" : string +>"hello" : "hello" >42 : number >true : boolean diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types index 0db2a3bb96392..55106d78e670d 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types @@ -55,7 +55,7 @@ f `abc`["member"]; >f `abc` : any >f : any >`abc` : string ->"member" : string +>"member" : "member" f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : any @@ -64,7 +64,7 @@ f `abc${1}def${2}ghi`["member"]; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc`["member"].someOtherTag `abc${1}def${2}ghi` : any @@ -73,7 +73,7 @@ f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc` : any >f : any >`abc` : string ->"member" : string +>"member" : "member" >someOtherTag : any >`abc${1}def${2}ghi` : string >1 : number @@ -88,7 +88,7 @@ f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" >someOtherTag : any >`abc${1}def${2}ghi` : string >1 : number diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types index 1a6ffb5eba06d..ae0b791c90c7e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types @@ -55,7 +55,7 @@ f `abc`["member"]; >f `abc` : any >f : any >`abc` : string ->"member" : string +>"member" : "member" f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : any @@ -64,7 +64,7 @@ f `abc${1}def${2}ghi`["member"]; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc`["member"].someOtherTag `abc${1}def${2}ghi` : any @@ -73,7 +73,7 @@ f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc` : any >f : any >`abc` : string ->"member" : string +>"member" : "member" >someOtherTag : any >`abc${1}def${2}ghi` : string >1 : number @@ -88,7 +88,7 @@ f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" >someOtherTag : any >`abc${1}def${2}ghi` : string >1 : number diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types index 2c992a2d233ff..7ebda1b3efc87 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types @@ -65,7 +65,7 @@ f `abc`["member"]; >f `abc` : I >f : I >`abc` : string ->"member" : string +>"member" : "member" f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I @@ -74,7 +74,7 @@ f `abc${1}def${2}ghi`["member"]; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" f `abc`[0].member `abc${1}def${2}ghi`; >f `abc`[0].member `abc${1}def${2}ghi` : I @@ -98,7 +98,7 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" >member : I >`abc${1}def${2}ghi` : string >1 : number diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types index 4bda0f3fbb0ae..35e5ac091922c 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types @@ -65,7 +65,7 @@ f `abc`["member"]; >f `abc` : I >f : I >`abc` : string ->"member" : string +>"member" : "member" f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I @@ -74,7 +74,7 @@ f `abc${1}def${2}ghi`["member"]; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" f `abc`[0].member `abc${1}def${2}ghi`; >f `abc`[0].member `abc${1}def${2}ghi` : I @@ -98,7 +98,7 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >`abc${1}def${2}ghi` : string >1 : number >2 : number ->"member" : string +>"member" : "member" >member : I >`abc${1}def${2}ghi` : string >1 : number diff --git a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types index 7b09b5c574673..4b9b447d32a32 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types +++ b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types @@ -8,5 +8,5 @@ f `'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'`; >f `'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : void >f : (...args: any[]) => void >`'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : string ->" should be converted to " : string +>" should be converted to " : " should be converted to " diff --git a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types index ad4c5cc67a9b2..36a298c5a38e9 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types @@ -8,5 +8,5 @@ f `'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'`; >f `'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : void >f : (...args: any[]) => void >`'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : string ->" should be converted to " : string +>" should be converted to " : " should be converted to " diff --git a/tests/baselines/reference/targetTypeArgs.types b/tests/baselines/reference/targetTypeArgs.types index cda814d52c52f..8cbdbddc10fb9 100644 --- a/tests/baselines/reference/targetTypeArgs.types +++ b/tests/baselines/reference/targetTypeArgs.types @@ -7,7 +7,7 @@ function foo(callback: (x: string) => void) { callback("hello"); >callback("hello") : void >callback : (x: string) => void ->"hello" : string +>"hello" : "hello" } foo(function(x) { x }); @@ -32,8 +32,8 @@ foo(function(x) { x }); ["hello"].every(function(v,i,a) {return true;}); >["hello"].every(function(v,i,a) {return true;}) : boolean >["hello"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean ->["hello"] : string[] ->"hello" : string +>["hello"] : "hello"[] +>"hello" : "hello" >every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => boolean >v : string @@ -68,8 +68,8 @@ foo(function(x) { x }); ["s"].every(function(v,i,a) {return true;}); >["s"].every(function(v,i,a) {return true;}) : boolean >["s"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean ->["s"] : string[] ->"s" : string +>["s"] : "s"[] +>"s" : "s" >every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => boolean >v : string @@ -80,8 +80,8 @@ foo(function(x) { x }); ["s"].forEach(function(v,i,a) { v }); >["s"].forEach(function(v,i,a) { v }) : void >["s"].forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void ->["s"] : string[] ->"s" : string +>["s"] : "s"[] +>"s" : "s" >forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function(v,i,a) { v } : (v: string, i: number, a: string[]) => void >v : string diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.types b/tests/baselines/reference/targetTypeObjectLiteralToAny.types index b6bd1e910514b..a6a17bf42529c 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.types +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.types @@ -21,11 +21,11 @@ function suggest(){ >result.push : any >result : any >push : any ->{text:keyword, type:"keyword"} : { text: string; type: string; } +>{text:keyword, type:"keyword"} : { text: string; type: "keyword"; } >text : string >keyword : string ->type : string ->"keyword" : string +>type : "keyword" +>"keyword" : "keyword" }); } diff --git a/tests/baselines/reference/targetTypeTest2.types b/tests/baselines/reference/targetTypeTest2.types index 53381b9de43e8..10d9af536b19f 100644 --- a/tests/baselines/reference/targetTypeTest2.types +++ b/tests/baselines/reference/targetTypeTest2.types @@ -4,10 +4,10 @@ var a : any[] = [1,2,"3"]; >a : any[] ->[1,2,"3"] : (number | string)[] +>[1,2,"3"] : (number | "3")[] >1 : number >2 : number ->"3" : string +>"3" : "3" function func1(stuff:any[]) { return stuff; } diff --git a/tests/baselines/reference/templateStringInConditional.types b/tests/baselines/reference/templateStringInConditional.types index bb5de339533b5..a375d572a5df1 100644 --- a/tests/baselines/reference/templateStringInConditional.types +++ b/tests/baselines/reference/templateStringInConditional.types @@ -3,9 +3,9 @@ var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; >x : string >`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string >`abc${ " " }def` : string ->" " : string +>" " : " " >`abc${ " " }def` : string ->" " : string +>" " : " " >`abc${ " " }def` : string ->" " : string +>" " : " " diff --git a/tests/baselines/reference/templateStringInConditionalES6.types b/tests/baselines/reference/templateStringInConditionalES6.types index 060b81b2ab7ee..0f65ab2297743 100644 --- a/tests/baselines/reference/templateStringInConditionalES6.types +++ b/tests/baselines/reference/templateStringInConditionalES6.types @@ -3,9 +3,9 @@ var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; >x : string >`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string >`abc${ " " }def` : string ->" " : string +>" " : " " >`abc${ " " }def` : string ->" " : string +>" " : " " >`abc${ " " }def` : string ->" " : string +>" " : " " diff --git a/tests/baselines/reference/templateStringInEqualityChecks.types b/tests/baselines/reference/templateStringInEqualityChecks.types index 51a450e5245fa..2f1b2cf987b00 100644 --- a/tests/baselines/reference/templateStringInEqualityChecks.types +++ b/tests/baselines/reference/templateStringInEqualityChecks.types @@ -19,11 +19,11 @@ var x = `abc${0}abc` === `abc` || >`abc${0}abc` == "abc0abc" : boolean >`abc${0}abc` : string >0 : number ->"abc0abc" : string +>"abc0abc" : "abc0abc" "abc0abc" !== `abc${0}abc`; >"abc0abc" !== `abc${0}abc` : boolean ->"abc0abc" : string +>"abc0abc" : "abc0abc" >`abc${0}abc` : string >0 : number diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.types b/tests/baselines/reference/templateStringInEqualityChecksES6.types index 37e5e4a8c283a..ce552da09eaa9 100644 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.types +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.types @@ -19,11 +19,11 @@ var x = `abc${0}abc` === `abc` || >`abc${0}abc` == "abc0abc" : boolean >`abc${0}abc` : string >0 : number ->"abc0abc" : string +>"abc0abc" : "abc0abc" "abc0abc" !== `abc${0}abc`; >"abc0abc" !== `abc${0}abc` : boolean ->"abc0abc" : string +>"abc0abc" : "abc0abc" >`abc${0}abc` : string >0 : number diff --git a/tests/baselines/reference/templateStringInInOperator.types b/tests/baselines/reference/templateStringInInOperator.types index 881f37221feaf..6121f18dc6bef 100644 --- a/tests/baselines/reference/templateStringInInOperator.types +++ b/tests/baselines/reference/templateStringInInOperator.types @@ -3,7 +3,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; >x : boolean >`${ "hi" }` in { hi: 10, hello: 20} : boolean >`${ "hi" }` : string ->"hi" : string +>"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number >10 : number diff --git a/tests/baselines/reference/templateStringInInOperatorES6.types b/tests/baselines/reference/templateStringInInOperatorES6.types index 4297338ba56b2..475ea4cb293d4 100644 --- a/tests/baselines/reference/templateStringInInOperatorES6.types +++ b/tests/baselines/reference/templateStringInInOperatorES6.types @@ -3,7 +3,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; >x : boolean >`${ "hi" }` in { hi: 10, hello: 20} : boolean >`${ "hi" }` : string ->"hi" : string +>"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number >10 : number diff --git a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types index e7cc81af06c7d..62d0190586a2b 100644 --- a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types +++ b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types @@ -3,33 +3,33 @@ `0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` >`0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " diff --git a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types index 9b91b5db72c41..cf07cae5b93fa 100644 --- a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types +++ b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types @@ -2,33 +2,33 @@ `0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` >`0${ " " }1${ " " }2${ " " }3${ " " }4${ " " }5${ " " }6${ " " }7${ " " }8${ " " }9${ " " }10${ " " }11${ " " }12${ " " }13${ " " }14${ " " }15${ " " }16${ " " }17${ " " }18${ " " }19${ " " }20${ " " }2028${ " " }2029${ " " }0085${ " " }t${ " " }v${ " " }f${ " " }b${ " " }r${ " " }n` : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string ->" " : string +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " +>" " : " " diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditional.types b/tests/baselines/reference/templateStringWithEmbeddedConditional.types index 2a741dc271b10..f825213317533 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedConditional.types +++ b/tests/baselines/reference/templateStringWithEmbeddedConditional.types @@ -2,8 +2,8 @@ var x = `abc${ true ? false : " " }def`; >x : string >`abc${ true ? false : " " }def` : string ->true ? false : " " : boolean | string +>true ? false : " " : boolean | " " >true : boolean >false : boolean ->" " : string +>" " : " " diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types index d0a228ee6735f..9327c4d552692 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types @@ -2,8 +2,8 @@ var x = `abc${ true ? false : " " }def`; >x : string >`abc${ true ? false : " " }def` : string ->true ? false : " " : boolean | string +>true ? false : " " : boolean | " " >true : boolean >false : boolean ->" " : string +>" " : " " diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.types b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types index d693dd276d1b0..c9b879f8e5781 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types @@ -3,7 +3,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; >x : string >`abc${ "hi" in { hi: 10, hello: 20} }def` : string >"hi" in { hi: 10, hello: 20} : boolean ->"hi" : string +>"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number >10 : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types index ff5be5f4d82ba..c5c7380b879bd 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types @@ -3,7 +3,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; >x : string >`abc${ "hi" in { hi: 10, hello: 20} }def` : string >"hi" in { hi: 10, hello: 20} : boolean ->"hi" : string +>"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number >10 : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types index bcc90c42c7456..1e358a571b3ac 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types @@ -4,5 +4,5 @@ var x = `abc${ new String("Hi") }def`; >`abc${ new String("Hi") }def` : string >new String("Hi") : String >String : StringConstructor ->"Hi" : string +>"Hi" : "Hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types index be58edbe4d877..4939c6f867f3a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types @@ -4,5 +4,5 @@ var x = `abc${ new String("Hi") }def`; >`abc${ new String("Hi") }def` : string >new String("Hi") : String >String : StringConstructor ->"Hi" : string +>"Hi" : "Hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types index acda0c7a7ec6a..cef4f69c0a959 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types @@ -3,7 +3,7 @@ var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; >x : string >`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : string >`456 ${ " | " } 654` : string ->" | " : string +>" | " : " | " >`456 ${ " | " } 654` : string ->" | " : string +>" | " : " | " diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types index 252765cb7c019..12532c8402e48 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types @@ -3,7 +3,7 @@ var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; >x : string >`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : string >`456 ${ " | " } 654` : string ->" | " : string +>" | " : " | " >`456 ${ " | " } 654` : string ->" | " : string +>" | " : " | " diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types index e63ea3aac6983..48330140ad347 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types @@ -3,5 +3,5 @@ var x = `abc${ typeof "hi" }def`; >x : string >`abc${ typeof "hi" }def` : string >typeof "hi" : string ->"hi" : string +>"hi" : "hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types index 0692eaccb5e4b..3d7eba45c1912 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types @@ -3,5 +3,5 @@ var x = `abc${ typeof "hi" }def`; >x : string >`abc${ typeof "hi" }def` : string >typeof "hi" : string ->"hi" : string +>"hi" : "hi" diff --git a/tests/baselines/reference/thisBinding2.types b/tests/baselines/reference/thisBinding2.types index 99668ca4901cb..ca4c1eb23aa09 100644 --- a/tests/baselines/reference/thisBinding2.types +++ b/tests/baselines/reference/thisBinding2.types @@ -53,11 +53,11 @@ declare function setTimeout(expression: any, msec?: number, language?: any): num var messenger = { >messenger : { message: string; start: () => number; } ->{ message: "Hello World", start: function () { return setTimeout(() => { var x = this.message; }, 3000); }} : { message: string; start: () => number; } +>{ message: "Hello World", start: function () { return setTimeout(() => { var x = this.message; }, 3000); }} : { message: "Hello World"; start: () => number; } message: "Hello World", ->message : string ->"Hello World" : string +>message : "Hello World" +>"Hello World" : "Hello World" start: function () { >start : () => number diff --git a/tests/baselines/reference/thisInInnerFunctions.types b/tests/baselines/reference/thisInInnerFunctions.types index 2d0c3363b1866..e6c6d2b834c5c 100644 --- a/tests/baselines/reference/thisInInnerFunctions.types +++ b/tests/baselines/reference/thisInInnerFunctions.types @@ -4,7 +4,7 @@ class Foo { x = "hello"; >x : string ->"hello" : string +>"hello" : "hello" bar() { >bar : () => void @@ -13,11 +13,11 @@ class Foo { >inner : () => void this.y = "hi"; // 'this' should be not type to 'Foo' either ->this.y = "hi" : string +>this.y = "hi" : "hi" >this.y : any >this : any >y : any ->"hi" : string +>"hi" : "hi" var f = () => this.y; // 'this' should be not type to 'Foo' either >f : () => any diff --git a/tests/baselines/reference/thisInLambda.types b/tests/baselines/reference/thisInLambda.types index aea7fb08bd66f..a9d5b695750e5 100644 --- a/tests/baselines/reference/thisInLambda.types +++ b/tests/baselines/reference/thisInLambda.types @@ -4,7 +4,7 @@ class Foo { x = "hello"; >x : string ->"hello" : string +>"hello" : "hello" bar() { >bar : () => void diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.types b/tests/baselines/reference/thisInPropertyBoundDeclarations.types index f871e78d2196d..b783c5c1b5fee 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.types +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.types @@ -131,14 +131,14 @@ class B { >' ' + function() { } + ' ' + (() => () => () => this) : string >' ' + function() { } + ' ' : string >' ' + function() { } : string ->' ' : string +>' ' : " " function() { >function() { } : () => void } + ' ' + ->' ' : string +>' ' : " " (() => () => () => this); >(() => () => () => this) : () => () => () => this diff --git a/tests/baselines/reference/thisTypeInTuples.types b/tests/baselines/reference/thisTypeInTuples.types index e0268840317b9..2da02d299b2a7 100644 --- a/tests/baselines/reference/thisTypeInTuples.types +++ b/tests/baselines/reference/thisTypeInTuples.types @@ -9,9 +9,9 @@ interface Array { let t: [number, string] = [42, "hello"]; >t : [number, string] ->[42, "hello"] : [number, string] +>[42, "hello"] : [number, "hello"] >42 : number ->"hello" : string +>"hello" : "hello" let a = t.slice(); >a : [number, string] diff --git a/tests/baselines/reference/throwInEnclosingStatements.types b/tests/baselines/reference/throwInEnclosingStatements.types index 32f0fb093bcd9..c1f1e542289f5 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.types +++ b/tests/baselines/reference/throwInEnclosingStatements.types @@ -22,7 +22,7 @@ switch (y) { >y : string case 'a': ->'a' : string +>'a' : "a" throw y; >y : string diff --git a/tests/baselines/reference/throwStatements.types b/tests/baselines/reference/throwStatements.types index 5023513ee5372..fe4e9adc13231 100644 --- a/tests/baselines/reference/throwStatements.types +++ b/tests/baselines/reference/throwStatements.types @@ -70,7 +70,7 @@ throw aNumber; var aString = 'this is a string'; >aString : string ->'this is a string' : string +>'this is a string' : "this is a string" throw aString; >aString : string @@ -150,7 +150,7 @@ throw aFunction; throw aFunction(''); >aFunction('') : number >aFunction : (x: string) => number ->'' : string +>'' : "" var aLambda = (x) => 2; >aLambda : (x: any) => number @@ -217,11 +217,11 @@ throw undefined; >undefined : undefined throw 'a string'; ->'a string' : string +>'a string' : "a string" throw function () { return 'a string' }; >function () { return 'a string' } : () => string ->'a string' : string +>'a string' : "a string" throw (x:T) => 42; >(x:T) => 42 : (x: T) => number @@ -241,10 +241,10 @@ throw []; >[] : undefined[] throw ['a', ['b']]; ->['a', ['b']] : (string | string[])[] ->'a' : string ->['b'] : string[] ->'b' : string +>['a', ['b']] : ("a" | "b"[])[] +>'a' : "a" +>['b'] : "b"[] +>'b' : "b" throw /[a-z]/; >/[a-z]/ : RegExp diff --git a/tests/baselines/reference/topLevel.types b/tests/baselines/reference/topLevel.types index ac1dd1182b93f..95db3b1497302 100644 --- a/tests/baselines/reference/topLevel.types +++ b/tests/baselines/reference/topLevel.types @@ -48,21 +48,21 @@ class Point implements IPoint { >"("+this.x+","+this.y : string >"("+this.x+"," : string >"("+this.x : string ->"(" : string +>"(" : "(" >this.x : any >this : this >x : any ->"," : string +>"," : "," >this.y : any >this : this >y : any ->")" : string +>")" : ")" } } var result=""; >result : string ->"" : string +>"" : "" result+=(new Point(3,4).move(2,2)); >result+=(new Point(3,4).move(2,2)) : string diff --git a/tests/baselines/reference/tsxEmit1.types b/tests/baselines/reference/tsxEmit1.types index e6f92bebd1edf..07a54916d40bf 100644 --- a/tests/baselines/reference/tsxEmit1.types +++ b/tests/baselines/reference/tsxEmit1.types @@ -53,7 +53,7 @@ var selfClosed6 =
; >
: JSX.Element >div : any >x : any ->"1" : string +>"1" : "1" >y : any var selfClosed7 =
; diff --git a/tests/baselines/reference/tsxReactEmit1.types b/tests/baselines/reference/tsxReactEmit1.types index d837eb007bfa7..9e4fa8dfda362 100644 --- a/tests/baselines/reference/tsxReactEmit1.types +++ b/tests/baselines/reference/tsxReactEmit1.types @@ -55,7 +55,7 @@ var selfClosed6 =
; >
: JSX.Element >div : any >x : any ->"1" : string +>"1" : "1" >y : any var selfClosed7 =
; diff --git a/tests/baselines/reference/tsxTypeErrors.types b/tests/baselines/reference/tsxTypeErrors.types index 303c7695dbfc3..5fae356846097 100644 --- a/tests/baselines/reference/tsxTypeErrors.types +++ b/tests/baselines/reference/tsxTypeErrors.types @@ -73,10 +73,10 @@ var b2 = ; > : any >MyClass : typeof MyClass >pt : any ->{x: 4, y: 'oops'} : { x: number; y: string; } +>{x: 4, y: 'oops'} : { x: number; y: "oops"; } >x : number >4 : number ->y : string ->'oops' : string +>y : "oops" +>'oops' : "oops" diff --git a/tests/baselines/reference/typeAliases.types b/tests/baselines/reference/typeAliases.types index c762a568b3228..d0de1ed6c6c7b 100644 --- a/tests/baselines/reference/typeAliases.types +++ b/tests/baselines/reference/typeAliases.types @@ -231,8 +231,8 @@ f16(x); var y: StringAndBoolean = ["1", false]; >y : [string, boolean] >StringAndBoolean : [string, boolean] ->["1", false] : [string, boolean] ->"1" : string +>["1", false] : ["1", boolean] +>"1" : "1" >false : boolean y[0].toLowerCase(); diff --git a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.types b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.types index d0c881c1c5d77..18e16604d2ffc 100644 --- a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.types +++ b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.types @@ -23,36 +23,36 @@ interface IMenuItem { var menuData: IMenuItem[] = [ >menuData : IMenuItem[] >IMenuItem : IMenuItem ->[ { "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" }, { "id": "productName", "type": "default", "link": "", "text": "Product Name" }] : ({ "id": string; "type": string; "link": string; "icon": string; } | { "id": string; "type": string; "link": string; "text": string; })[] +>[ { "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" }, { "id": "productName", "type": "default", "link": "", "text": "Product Name" }] : ({ "id": "ourLogo"; "type": "image"; "link": ""; "icon": "modules/menu/logo.svg"; } | { "id": "productName"; "type": "default"; "link": ""; "text": "Product Name"; })[] { ->{ "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" } : { "id": string; "type": string; "link": string; "icon": string; } +>{ "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" } : { "id": "ourLogo"; "type": "image"; "link": ""; "icon": "modules/menu/logo.svg"; } "id": "ourLogo", ->"ourLogo" : string +>"ourLogo" : "ourLogo" "type": "image", ->"image" : string +>"image" : "image" "link": "", ->"" : string +>"" : "" "icon": "modules/menu/logo.svg" ->"modules/menu/logo.svg" : string +>"modules/menu/logo.svg" : "modules/menu/logo.svg" }, { ->{ "id": "productName", "type": "default", "link": "", "text": "Product Name" } : { "id": string; "type": string; "link": string; "text": string; } +>{ "id": "productName", "type": "default", "link": "", "text": "Product Name" } : { "id": "productName"; "type": "default"; "link": ""; "text": "Product Name"; } "id": "productName", ->"productName" : string +>"productName" : "productName" "type": "default", ->"default" : string +>"default" : "default" "link": "", ->"" : string +>"" : "" "text": "Product Name" ->"Product Name" : string +>"Product Name" : "Product Name" } ]; diff --git a/tests/baselines/reference/typeArgInference.types b/tests/baselines/reference/typeArgInference.types index d553e0fe8d42f..3b1685023d970 100644 --- a/tests/baselines/reference/typeArgInference.types +++ b/tests/baselines/reference/typeArgInference.types @@ -37,11 +37,11 @@ interface I { } var o = { a: 3, b: "test" }; >o : { a: number; b: string; } ->{ a: 3, b: "test" } : { a: number; b: string; } +>{ a: 3, b: "test" } : { a: number; b: "test"; } >a : number >3 : number ->b : string ->"test" : string +>b : "test" +>"test" : "test" var x: I; >x : I diff --git a/tests/baselines/reference/typeArgInferenceWithNull.types b/tests/baselines/reference/typeArgInferenceWithNull.types index 93ded4267eb02..69dfacff6964d 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.types +++ b/tests/baselines/reference/typeArgInferenceWithNull.types @@ -46,7 +46,7 @@ fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally wou >null : null >y => { } : (y: { x: string; }) => void >y : { x: string; } ->{ x: "" } : { x: string; } ->x : string ->"" : string +>{ x: "" } : { x: ""; } +>x : "" +>"" : "" diff --git a/tests/baselines/reference/typeArgumentInferenceApparentType1.types b/tests/baselines/reference/typeArgumentInferenceApparentType1.types index 29fd1aeca1885..1b25f79d4fcdb 100644 --- a/tests/baselines/reference/typeArgumentInferenceApparentType1.types +++ b/tests/baselines/reference/typeArgumentInferenceApparentType1.types @@ -14,5 +14,5 @@ var res: string = method("test"); >res : string >method("test") : string >method : (iterable: Iterable) => T ->"test" : string +>"test" : "test" diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.types b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.types index 63ee130938323..dd434e8bb5ddf 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.types +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.types @@ -18,6 +18,6 @@ foo(class { static prop = "hello" }).length; >foo : (x?: typeof (Anonymous class)) => T >class { static prop = "hello" } : typeof (Anonymous class) >prop : string ->"hello" : string +>"hello" : "hello" >length : number diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.types b/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.types index 9a2bddd92963c..82764584abd3b 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.types +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.types @@ -18,6 +18,6 @@ foo(class { prop = "hello" }).length; >foo : (x?: typeof (Anonymous class)) => T >class { prop = "hello" } : typeof (Anonymous class) >prop : string ->"hello" : string +>"hello" : "hello" >length : number diff --git a/tests/baselines/reference/typeGuardEnums.types b/tests/baselines/reference/typeGuardEnums.types index 1d39a81d78acd..196322b13f00a 100644 --- a/tests/baselines/reference/typeGuardEnums.types +++ b/tests/baselines/reference/typeGuardEnums.types @@ -14,7 +14,7 @@ if (typeof x === "number") { >typeof x === "number" : boolean >typeof x : string >x : number | string | E | V ->"number" : string +>"number" : "number" x; // number|E|V >x : number | E | V @@ -28,7 +28,7 @@ if (typeof x !== "number") { >typeof x !== "number" : boolean >typeof x : string >x : number | string | E | V ->"number" : string +>"number" : "number" x; // string >x : string diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.types b/tests/baselines/reference/typeGuardFunctionOfFormThis.types index e91c77dd07aaa..9dad59f783c18 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.types @@ -137,7 +137,7 @@ if (((a["isLeader"])())) { >(a["isLeader"]) : () => this is LeadGuard >a["isLeader"] : () => this is LeadGuard >a : RoyalGuard ->"isLeader" : string +>"isLeader" : "isLeader" a.lead(); >a.lead() : void @@ -151,7 +151,7 @@ else if (((a)["isFollower"]())) { >(a)["isFollower"] : () => this is FollowerGuard >(a) : RoyalGuard >a : RoyalGuard ->"isFollower" : string +>"isFollower" : "isFollower" a.follow(); >a.follow() : void diff --git a/tests/baselines/reference/typeGuardInClass.types b/tests/baselines/reference/typeGuardInClass.types index 93fe9f28c5e9e..6a32583dafb4b 100644 --- a/tests/baselines/reference/typeGuardInClass.types +++ b/tests/baselines/reference/typeGuardInClass.types @@ -6,7 +6,7 @@ if (typeof x === "string") { >typeof x === "string" : boolean >typeof x : string >x : string | number ->"string" : string +>"string" : "string" let n = class { >n : typeof (Anonymous class) diff --git a/tests/baselines/reference/typeGuardNesting.types b/tests/baselines/reference/typeGuardNesting.types index 255e96da89eb8..2760a2c1d448e 100644 --- a/tests/baselines/reference/typeGuardNesting.types +++ b/tests/baselines/reference/typeGuardNesting.types @@ -9,13 +9,13 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri >typeof strOrBool === 'boolean' : boolean >typeof strOrBool : string >strOrBool : string | boolean ->'boolean' : string +>'boolean' : "boolean" >!strOrBool : boolean >strOrBool : boolean >typeof strOrBool === 'string' : boolean >typeof strOrBool : string >strOrBool : string | boolean ->'string' : string +>'string' : "string" let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; >label : string @@ -24,9 +24,9 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri >typeof strOrBool === 'string' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'string' : string +>'string' : "string" >strOrBool : string ->"string" : string +>"string" : "string" let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; >bool : boolean @@ -35,7 +35,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri >typeof strOrBool === 'boolean' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'boolean' : string +>'boolean' : "boolean" >strOrBool : boolean >false : boolean @@ -46,9 +46,9 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri >typeof strOrBool !== 'boolean' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'boolean' : string +>'boolean' : "boolean" >strOrBool : string ->"string" : string +>"string" : "string" let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; >bool2 : boolean @@ -57,7 +57,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri >typeof strOrBool !== 'string' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'string' : string +>'string' : "string" >strOrBool : boolean >false : boolean } @@ -69,13 +69,13 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole >typeof strOrBool !== 'string' : boolean >typeof strOrBool : string >strOrBool : string | boolean ->'string' : string +>'string' : "string" >!strOrBool : boolean >strOrBool : boolean >typeof strOrBool !== 'boolean' : boolean >typeof strOrBool : string >strOrBool : string | boolean ->'boolean' : string +>'boolean' : "boolean" let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; >label : string @@ -84,9 +84,9 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole >typeof strOrBool === 'string' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'string' : string +>'string' : "string" >strOrBool : string ->"string" : string +>"string" : "string" let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; >bool : boolean @@ -95,7 +95,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole >typeof strOrBool === 'boolean' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'boolean' : string +>'boolean' : "boolean" >strOrBool : boolean >false : boolean @@ -106,9 +106,9 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole >typeof strOrBool !== 'boolean' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'boolean' : string +>'boolean' : "boolean" >strOrBool : string ->"string" : string +>"string" : "string" let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; >bool2 : boolean @@ -117,7 +117,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole >typeof strOrBool !== 'string' : boolean >typeof strOrBool : string >strOrBool : boolean | string ->'string' : string +>'string' : "string" >strOrBool : boolean >false : boolean } diff --git a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types index 10f50bed52e94..ddfa4f826d0aa 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types +++ b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types @@ -44,11 +44,11 @@ if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") { >typeof strOrNumOrBool !== "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >typeof strOrNumOrBool !== "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" bool = strOrNumOrBool; // boolean >bool = strOrNumOrBool : boolean @@ -68,15 +68,15 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe >typeof strOrNumOrBoolOrC !== "string" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : string | number | boolean | C ->"string" : string +>"string" : "string" >typeof strOrNumOrBoolOrC !== "number" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : number | boolean | C ->"number" : string +>"number" : "number" >typeof strOrNumOrBoolOrC !== "boolean" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : boolean | C ->"boolean" : string +>"boolean" : "boolean" c = strOrNumOrBoolOrC; // C >c = strOrNumOrBoolOrC : C @@ -96,15 +96,15 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe >typeof strOrNumOrBoolOrC !== "string" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : string | number | boolean | C ->"string" : string +>"string" : "string" >typeof strOrNumOrBoolOrC !== "number" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : number | boolean | C ->"number" : string +>"number" : "number" >typeof strOrNumOrBool === "boolean" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"boolean" : string +>"boolean" : "boolean" cOrBool = strOrNumOrBoolOrC; // C | boolean >cOrBool = strOrNumOrBoolOrC : boolean | C @@ -132,7 +132,7 @@ if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) { >typeof strOrNumOrBool !== "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >numOrBool !== strOrNumOrBool : boolean >numOrBool : number | boolean >strOrNumOrBool : number | boolean diff --git a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types index acd929a7ca118..b576630c1cf16 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types +++ b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types @@ -44,11 +44,11 @@ if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") { >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >typeof strOrNumOrBool === "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" strOrNum = strOrNumOrBool; // string | number >strOrNum = strOrNumOrBool : string | number @@ -68,15 +68,15 @@ if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "numbe >typeof strOrNumOrBoolOrC === "string" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : string | number | boolean | C ->"string" : string +>"string" : "string" >typeof strOrNumOrBoolOrC === "number" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : number | boolean | C ->"number" : string +>"number" : "number" >typeof strOrNumOrBoolOrC === "boolean" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : boolean | C ->"boolean" : string +>"boolean" : "boolean" strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean >strOrNumOrBool = strOrNumOrBoolOrC : string | number | boolean @@ -96,15 +96,15 @@ if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "numbe >typeof strOrNumOrBoolOrC === "string" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : string | number | boolean | C ->"string" : string +>"string" : "string" >typeof strOrNumOrBoolOrC === "number" : boolean >typeof strOrNumOrBoolOrC : string >strOrNumOrBoolOrC : number | boolean | C ->"number" : string +>"number" : "number" >typeof strOrNumOrBool !== "boolean" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"boolean" : string +>"boolean" : "boolean" var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C >r1 : string | number | boolean | C @@ -132,7 +132,7 @@ if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) { >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >numOrBool !== strOrNumOrBool : boolean >numOrBool : number | boolean >strOrNumOrBool : number | boolean diff --git a/tests/baselines/reference/typeGuardOfFormNotExpr.types b/tests/baselines/reference/typeGuardOfFormNotExpr.types index a99db08efab5b..e4490d42dae3c 100644 --- a/tests/baselines/reference/typeGuardOfFormNotExpr.types +++ b/tests/baselines/reference/typeGuardOfFormNotExpr.types @@ -28,7 +28,7 @@ if (!(typeof strOrNum === "string")) { >typeof strOrNum === "string" : boolean >typeof strOrNum : string >strOrNum : string | number ->"string" : string +>"string" : "string" num === strOrNum; // number >num === strOrNum : boolean @@ -49,11 +49,11 @@ if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number")) >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >typeof strOrNumOrBool === "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" bool = strOrNumOrBool; // boolean >bool = strOrNumOrBool : boolean @@ -74,13 +74,13 @@ if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number >typeof strOrNumOrBool !== "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >!(typeof strOrNumOrBool !== "number") : boolean >(typeof strOrNumOrBool !== "number") : boolean >typeof strOrNumOrBool !== "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" strOrNum = strOrNumOrBool; // string | number >strOrNum = strOrNumOrBool : string | number @@ -101,11 +101,11 @@ if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number")) >typeof strOrNumOrBool !== "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >typeof strOrNumOrBool !== "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" strOrNum = strOrNumOrBool; // string | number >strOrNum = strOrNumOrBool : string | number @@ -126,13 +126,13 @@ if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >!(typeof strOrNumOrBool === "number") : boolean >(typeof strOrNumOrBool === "number") : boolean >typeof strOrNumOrBool === "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : number | boolean ->"number" : string +>"number" : "number" bool = strOrNumOrBool; // boolean >bool = strOrNumOrBool : boolean @@ -153,7 +153,7 @@ if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) { >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" >numOrBool !== strOrNumOrBool : boolean >numOrBool : number | boolean >strOrNumOrBool : number | boolean diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.types b/tests/baselines/reference/typeGuardOfFormThisMember.types index 68343947fb49a..9b06bef9f2864 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.types +++ b/tests/baselines/reference/typeGuardOfFormThisMember.types @@ -73,8 +73,8 @@ namespace Test { >FileSystemObject : FileSystemObject >new File("foo/bar.txt", "foo") : File >File : typeof File ->"foo/bar.txt" : string ->"foo" : string +>"foo/bar.txt" : "foo/bar.txt" +>"foo" : "foo" file.isNetworked = false; >file.isNetworked = false : boolean diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types index 9d9f28548be75..68df1ac3d93fb 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types @@ -48,7 +48,7 @@ if (typeof strOrBool === "boolean") { >typeof strOrBool === "boolean" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"boolean" : string +>"boolean" : "boolean" bool = strOrBool; // boolean >bool = strOrBool : boolean @@ -65,7 +65,7 @@ if (typeof numOrBool === "boolean") { >typeof numOrBool === "boolean" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"boolean" : string +>"boolean" : "boolean" bool = numOrBool; // boolean >bool = numOrBool : boolean @@ -82,7 +82,7 @@ if (typeof strOrNumOrBool === "boolean") { >typeof strOrNumOrBool === "boolean" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"boolean" : string +>"boolean" : "boolean" bool = strOrNumOrBool; // boolean >bool = strOrNumOrBool : boolean @@ -99,7 +99,7 @@ if (typeof boolOrC === "boolean") { >typeof boolOrC === "boolean" : boolean >typeof boolOrC : string >boolOrC : boolean | C ->"boolean" : string +>"boolean" : "boolean" bool = boolOrC; // boolean >bool = boolOrC : boolean @@ -118,7 +118,7 @@ if (typeof strOrNum === "boolean") { >typeof strOrNum === "boolean" : boolean >typeof strOrNum : string >strOrNum : string | number ->"boolean" : string +>"boolean" : "boolean" var z1: string | number = strOrNum; // string | number >z1 : string | number @@ -138,7 +138,7 @@ if (typeof strOrBool !== "boolean") { >typeof strOrBool !== "boolean" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"boolean" : string +>"boolean" : "boolean" str = strOrBool; // string >str = strOrBool : string @@ -155,7 +155,7 @@ if (typeof numOrBool !== "boolean") { >typeof numOrBool !== "boolean" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"boolean" : string +>"boolean" : "boolean" num = numOrBool; // number >num = numOrBool : number @@ -172,7 +172,7 @@ if (typeof strOrNumOrBool !== "boolean") { >typeof strOrNumOrBool !== "boolean" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"boolean" : string +>"boolean" : "boolean" strOrNum = strOrNumOrBool; // string | number >strOrNum = strOrNumOrBool : string | number @@ -189,7 +189,7 @@ if (typeof boolOrC !== "boolean") { >typeof boolOrC !== "boolean" : boolean >typeof boolOrC : string >boolOrC : boolean | C ->"boolean" : string +>"boolean" : "boolean" c = boolOrC; // C >c = boolOrC : C @@ -208,7 +208,7 @@ if (typeof strOrNum !== "boolean") { >typeof strOrNum !== "boolean" : boolean >typeof strOrNum : string >strOrNum : string | number ->"boolean" : string +>"boolean" : "boolean" var z1: string | number = strOrNum; // string | number >z1 : string | number diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types index 4bfc8fe6bf1c4..0c9b2a140bc09 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types @@ -21,7 +21,7 @@ if (typeof strOrNum == "string") { >typeof strOrNum == "string" : boolean >typeof strOrNum : string >strOrNum : string | number ->"string" : string +>"string" : "string" var r1 = strOrNum; // string | number >r1 : string | number @@ -37,7 +37,7 @@ if (typeof strOrBool == "boolean") { >typeof strOrBool == "boolean" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"boolean" : string +>"boolean" : "boolean" var r2 = strOrBool; // string | boolean >r2 : string | boolean @@ -53,7 +53,7 @@ if (typeof numOrBool == "number") { >typeof numOrBool == "number" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"number" : string +>"number" : "number" var r3 = numOrBool; // number | boolean >r3 : number | boolean @@ -69,7 +69,7 @@ if (typeof strOrC == "Object") { >typeof strOrC == "Object" : boolean >typeof strOrC : string >strOrC : string | C ->"Object" : string +>"Object" : "Object" var r4 = strOrC; // string | C >r4 : string | C diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types index 6eabeb25ede19..c8b7766fc5d49 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types @@ -21,7 +21,7 @@ if (typeof strOrNum != "string") { >typeof strOrNum != "string" : boolean >typeof strOrNum : string >strOrNum : string | number ->"string" : string +>"string" : "string" var r1 = strOrNum; // string | number >r1 : string | number @@ -37,7 +37,7 @@ if (typeof strOrBool != "boolean") { >typeof strOrBool != "boolean" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"boolean" : string +>"boolean" : "boolean" var r2 = strOrBool; // string | boolean >r2 : string | boolean @@ -53,7 +53,7 @@ if (typeof numOrBool != "number") { >typeof numOrBool != "number" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"number" : string +>"number" : "number" var r3 = numOrBool; // number | boolean >r3 : number | boolean @@ -69,7 +69,7 @@ if (typeof strOrC != "Object") { >typeof strOrC != "Object" : boolean >typeof strOrC : string >strOrC : string | C ->"Object" : string +>"Object" : "Object" var r4 = strOrC; // string | C >r4 : string | C diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types index d3caef24efded..52efab2848554 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types @@ -48,7 +48,7 @@ if (typeof strOrNum === "number") { >typeof strOrNum === "number" : boolean >typeof strOrNum : string >strOrNum : string | number ->"number" : string +>"number" : "number" num = strOrNum; // number >num = strOrNum : number @@ -65,7 +65,7 @@ if (typeof numOrBool === "number") { >typeof numOrBool === "number" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"number" : string +>"number" : "number" num = numOrBool; // number >num = numOrBool : number @@ -81,7 +81,7 @@ if (typeof strOrNumOrBool === "number") { >typeof strOrNumOrBool === "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"number" : string +>"number" : "number" num = strOrNumOrBool; // number >num = strOrNumOrBool : number @@ -98,7 +98,7 @@ if (typeof numOrC === "number") { >typeof numOrC === "number" : boolean >typeof numOrC : string >numOrC : number | C ->"number" : string +>"number" : "number" num = numOrC; // number >num = numOrC : number @@ -117,7 +117,7 @@ if (typeof strOrBool === "number") { >typeof strOrBool === "number" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"number" : string +>"number" : "number" var y1: string | boolean = strOrBool; // string | boolean >y1 : string | boolean @@ -136,7 +136,7 @@ if (typeof strOrNum !== "number") { >typeof strOrNum !== "number" : boolean >typeof strOrNum : string >strOrNum : string | number ->"number" : string +>"number" : "number" str === strOrNum; // string >str === strOrNum : boolean @@ -153,7 +153,7 @@ if (typeof numOrBool !== "number") { >typeof numOrBool !== "number" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"number" : string +>"number" : "number" var x: number | boolean = numOrBool; // number | boolean >x : number | boolean @@ -169,7 +169,7 @@ if (typeof strOrNumOrBool !== "number") { >typeof strOrNumOrBool !== "number" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"number" : string +>"number" : "number" strOrBool = strOrNumOrBool; // string | boolean >strOrBool = strOrNumOrBool : string | boolean @@ -186,7 +186,7 @@ if (typeof numOrC !== "number") { >typeof numOrC !== "number" : boolean >typeof numOrC : string >numOrC : number | C ->"number" : string +>"number" : "number" c = numOrC; // C >c = numOrC : C @@ -205,7 +205,7 @@ if (typeof strOrBool !== "number") { >typeof strOrBool !== "number" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"number" : string +>"number" : "number" var y1: string | boolean = strOrBool; // string | boolean >y1 : string | boolean diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types index 5cec356719493..e68281e979213 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types @@ -52,7 +52,7 @@ if (typeof strOrC === "Object") { >typeof strOrC === "Object" : boolean >typeof strOrC : string >strOrC : string | C ->"Object" : string +>"Object" : "Object" c = strOrC; // C >c = strOrC : C @@ -68,7 +68,7 @@ if (typeof numOrC === "Object") { >typeof numOrC === "Object" : boolean >typeof numOrC : string >numOrC : number | C ->"Object" : string +>"Object" : "Object" c = numOrC; // C >c = numOrC : C @@ -84,7 +84,7 @@ if (typeof boolOrC === "Object") { >typeof boolOrC === "Object" : boolean >typeof boolOrC : string >boolOrC : boolean | C ->"Object" : string +>"Object" : "Object" c = boolOrC; // C >c = boolOrC : C @@ -102,7 +102,7 @@ if (typeof strOrNumOrBool === "Object") { >typeof strOrNumOrBool === "Object" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"Object" : string +>"Object" : "Object" var q1: string | number | boolean = strOrNumOrBool; // string | number | boolean >q1 : string | number | boolean @@ -121,7 +121,7 @@ if (typeof strOrC !== "Object") { >typeof strOrC !== "Object" : boolean >typeof strOrC : string >strOrC : string | C ->"Object" : string +>"Object" : "Object" var r2: string = strOrC; // string >r2 : string @@ -137,7 +137,7 @@ if (typeof numOrC !== "Object") { >typeof numOrC !== "Object" : boolean >typeof numOrC : string >numOrC : number | C ->"Object" : string +>"Object" : "Object" var r3: number = numOrC; // number >r3 : number @@ -153,7 +153,7 @@ if (typeof boolOrC !== "Object") { >typeof boolOrC !== "Object" : boolean >typeof boolOrC : string >boolOrC : boolean | C ->"Object" : string +>"Object" : "Object" var r4: boolean = boolOrC; // boolean >r4 : boolean @@ -171,7 +171,7 @@ if (typeof strOrNumOrBool !== "Object") { >typeof strOrNumOrBool !== "Object" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"Object" : string +>"Object" : "Object" var q1: string | number | boolean = strOrNumOrBool; // string | number | boolean >q1 : string | number | boolean diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types index 7e88ca5cb94e5..6302ef58005c9 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types @@ -10,7 +10,7 @@ if (typeof a === "number") { >typeof a === "number" : boolean >typeof a : string >a : {} ->"number" : string +>"number" : "number" let c: number = a; >c : number @@ -20,7 +20,7 @@ if (typeof a === "string") { >typeof a === "string" : boolean >typeof a : string >a : {} ->"string" : string +>"string" : "string" let c: string = a; >c : string @@ -30,7 +30,7 @@ if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : {} ->"boolean" : string +>"boolean" : "boolean" let c: boolean = a; >c : boolean @@ -41,7 +41,7 @@ if (typeof b === "number") { >typeof b === "number" : boolean >typeof b : string >b : { toString(): string; } ->"number" : string +>"number" : "number" let c: number = b; >c : number @@ -51,7 +51,7 @@ if (typeof b === "string") { >typeof b === "string" : boolean >typeof b : string >b : { toString(): string; } ->"string" : string +>"string" : "string" let c: string = b; >c : string @@ -61,7 +61,7 @@ if (typeof b === "boolean") { >typeof b === "boolean" : boolean >typeof b : string >b : { toString(): string; } ->"boolean" : string +>"boolean" : "boolean" let c: boolean = b; >c : boolean diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfString.types b/tests/baselines/reference/typeGuardOfFormTypeOfString.types index d6a382261ac55..89160112b346f 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfString.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfString.types @@ -48,7 +48,7 @@ if (typeof strOrNum === "string") { >typeof strOrNum === "string" : boolean >typeof strOrNum : string >strOrNum : string | number ->"string" : string +>"string" : "string" str = strOrNum; // string >str = strOrNum : string @@ -65,7 +65,7 @@ if (typeof strOrBool === "string") { >typeof strOrBool === "string" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"string" : string +>"string" : "string" str = strOrBool; // string >str = strOrBool : string @@ -82,7 +82,7 @@ if (typeof strOrNumOrBool === "string") { >typeof strOrNumOrBool === "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" str = strOrNumOrBool; // string >str = strOrNumOrBool : string @@ -99,7 +99,7 @@ if (typeof strOrC === "string") { >typeof strOrC === "string" : boolean >typeof strOrC : string >strOrC : string | C ->"string" : string +>"string" : "string" str = strOrC; // string >str = strOrC : string @@ -118,7 +118,7 @@ if (typeof numOrBool === "string") { >typeof numOrBool === "string" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"string" : string +>"string" : "string" var x1: number | boolean = numOrBool; // number | boolean >x1 : number | boolean @@ -137,7 +137,7 @@ if (typeof strOrNum !== "string") { >typeof strOrNum !== "string" : boolean >typeof strOrNum : string >strOrNum : string | number ->"string" : string +>"string" : "string" num === strOrNum; // number >num === strOrNum : boolean @@ -154,7 +154,7 @@ if (typeof strOrBool !== "string") { >typeof strOrBool !== "string" : boolean >typeof strOrBool : string >strOrBool : string | boolean ->"string" : string +>"string" : "string" bool = strOrBool; // boolean >bool = strOrBool : boolean @@ -171,7 +171,7 @@ if (typeof strOrNumOrBool !== "string") { >typeof strOrNumOrBool !== "string" : boolean >typeof strOrNumOrBool : string >strOrNumOrBool : string | number | boolean ->"string" : string +>"string" : "string" numOrBool = strOrNumOrBool; // number | boolean >numOrBool = strOrNumOrBool : number | boolean @@ -188,7 +188,7 @@ if (typeof strOrC !== "string") { >typeof strOrC !== "string" : boolean >typeof strOrC : string >strOrC : string | C ->"string" : string +>"string" : "string" c = strOrC; // C >c = strOrC : C @@ -207,7 +207,7 @@ if (typeof numOrBool !== "string") { >typeof numOrBool !== "string" : boolean >typeof numOrBool : string >numOrBool : number | boolean ->"string" : string +>"string" : "string" var x1: number | boolean = numOrBool; // number | boolean >x1 : number | boolean diff --git a/tests/baselines/reference/typeGuardRedundancy.types b/tests/baselines/reference/typeGuardRedundancy.types index 1507ceb850ef3..a3ea012a9b4fa 100644 --- a/tests/baselines/reference/typeGuardRedundancy.types +++ b/tests/baselines/reference/typeGuardRedundancy.types @@ -9,11 +9,11 @@ var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; >typeof x === "string" : boolean >typeof x : string >x : string | number ->"string" : string +>"string" : "string" >typeof x === "string" : boolean >typeof x : string >x : string ->"string" : string +>"string" : "string" >x.substr : (from: number, length?: number) => string >x : string >substr : (from: number, length?: number) => string @@ -30,11 +30,11 @@ var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.subst >typeof x === "string" : boolean >typeof x : string >x : string | number ->"string" : string +>"string" : "string" >typeof x === "string" : boolean >typeof x : string >x : string ->"string" : string +>"string" : "string" >x.toFixed : (fractionDigits?: number) => string >x : number >toFixed : (fractionDigits?: number) => string @@ -49,11 +49,11 @@ var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; >typeof x === "string" : boolean >typeof x : string >x : string | number ->"string" : string +>"string" : "string" >typeof x === "string" : boolean >typeof x : string >x : number ->"string" : string +>"string" : "string" >x.substr : (from: number, length?: number) => string >x : string >substr : (from: number, length?: number) => string @@ -70,11 +70,11 @@ var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.subst >typeof x === "string" : boolean >typeof x : string >x : string | number ->"string" : string +>"string" : "string" >typeof x === "string" : boolean >typeof x : string >x : number ->"string" : string +>"string" : "string" >x.toFixed : (fractionDigits?: number) => string >x : number >toFixed : (fractionDigits?: number) => string diff --git a/tests/baselines/reference/typeGuardTautologicalConsistiency.types b/tests/baselines/reference/typeGuardTautologicalConsistiency.types index d758dcde22bc8..9d112e294dba6 100644 --- a/tests/baselines/reference/typeGuardTautologicalConsistiency.types +++ b/tests/baselines/reference/typeGuardTautologicalConsistiency.types @@ -6,13 +6,13 @@ if (typeof stringOrNumber === "number") { >typeof stringOrNumber === "number" : boolean >typeof stringOrNumber : string >stringOrNumber : string | number ->"number" : string +>"number" : "number" if (typeof stringOrNumber !== "number") { >typeof stringOrNumber !== "number" : boolean >typeof stringOrNumber : string >stringOrNumber : number ->"number" : string +>"number" : "number" stringOrNumber; >stringOrNumber : string | number @@ -24,11 +24,11 @@ if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { >typeof stringOrNumber === "number" : boolean >typeof stringOrNumber : string >stringOrNumber : string | number ->"number" : string +>"number" : "number" >typeof stringOrNumber !== "number" : boolean >typeof stringOrNumber : string >stringOrNumber : number ->"number" : string +>"number" : "number" stringOrNumber; >stringOrNumber : string | number diff --git a/tests/baselines/reference/typeGuardTypeOfUndefined.types b/tests/baselines/reference/typeGuardTypeOfUndefined.types index 6cf57e1a1ddce..636740127d17b 100644 --- a/tests/baselines/reference/typeGuardTypeOfUndefined.types +++ b/tests/baselines/reference/typeGuardTypeOfUndefined.types @@ -8,13 +8,13 @@ function test1(a: any) { >typeof a !== "undefined" : boolean >typeof a : string >a : any ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : any ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -38,13 +38,13 @@ function test2(a: any) { >typeof a === "undefined" : boolean >typeof a : string >a : any ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : any ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -69,11 +69,11 @@ function test3(a: any) { >typeof a === "undefined" : boolean >typeof a : string >a : any ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : any ->"boolean" : string +>"boolean" : "boolean" a; >a : any @@ -93,11 +93,11 @@ function test4(a: any) { >typeof a !== "undefined" : boolean >typeof a : string >a : any ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : any ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -116,13 +116,13 @@ function test5(a: boolean | void) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | void ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -146,13 +146,13 @@ function test6(a: boolean | void) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | void ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -177,11 +177,11 @@ function test7(a: boolean | void) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | void ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean | void @@ -201,11 +201,11 @@ function test8(a: boolean | void) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | void ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -224,13 +224,13 @@ function test9(a: boolean | number) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | number ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -254,13 +254,13 @@ function test10(a: boolean | number) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | number ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -285,11 +285,11 @@ function test11(a: boolean | number) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | number ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean | number @@ -309,11 +309,11 @@ function test12(a: boolean | number) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | number ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -332,13 +332,13 @@ function test13(a: boolean | number | void) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | number | void ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -362,13 +362,13 @@ function test14(a: boolean | number | void) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | number | void ->"undefined" : string +>"undefined" : "undefined" if (typeof a === "boolean") { >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean @@ -393,11 +393,11 @@ function test15(a: boolean | number | void) { >typeof a === "undefined" : boolean >typeof a : string >a : boolean | number | void ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean | number | void @@ -417,11 +417,11 @@ function test16(a: boolean | number | void) { >typeof a !== "undefined" : boolean >typeof a : string >a : boolean | number | void ->"undefined" : string +>"undefined" : "undefined" >typeof a === "boolean" : boolean >typeof a : string >a : boolean | number | void ->"boolean" : string +>"boolean" : "boolean" a; >a : boolean diff --git a/tests/baselines/reference/typeGuardsDefeat.types b/tests/baselines/reference/typeGuardsDefeat.types index cc655d3ce0f36..e3c1e2d31b669 100644 --- a/tests/baselines/reference/typeGuardsDefeat.types +++ b/tests/baselines/reference/typeGuardsDefeat.types @@ -17,7 +17,7 @@ function foo(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" f(); >f() : void @@ -42,7 +42,7 @@ function foo2(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" return x.length; // string >x.length : number @@ -62,9 +62,9 @@ function foo2(x: number | string) { }; } x = "hello"; ->x = "hello" : string +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" f(); >f() : number @@ -78,7 +78,7 @@ function foo3(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" return x.length; // string >x.length : number @@ -94,9 +94,9 @@ function foo3(x: number | string) { >x : number } x = "hello"; ->x = "hello" : string +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" f(); >f() : number diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.types b/tests/baselines/reference/typeGuardsInClassAccessors.types index bdba5e9c116a3..2250657e453a9 100644 --- a/tests/baselines/reference/typeGuardsInClassAccessors.types +++ b/tests/baselines/reference/typeGuardsInClassAccessors.types @@ -28,7 +28,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -44,7 +44,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -65,7 +65,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -78,7 +78,7 @@ class ClassWithAccessors { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -94,7 +94,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -111,7 +111,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -127,7 +127,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -148,7 +148,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -161,7 +161,7 @@ class ClassWithAccessors { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -177,7 +177,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -194,7 +194,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -210,7 +210,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -231,7 +231,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -244,7 +244,7 @@ class ClassWithAccessors { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -260,7 +260,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -277,7 +277,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -293,7 +293,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -314,7 +314,7 @@ class ClassWithAccessors { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -327,7 +327,7 @@ class ClassWithAccessors { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -343,7 +343,7 @@ class ClassWithAccessors { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number diff --git a/tests/baselines/reference/typeGuardsInClassMethods.types b/tests/baselines/reference/typeGuardsInClassMethods.types index b3e20c88ed381..600e3e36ab0f2 100644 --- a/tests/baselines/reference/typeGuardsInClassMethods.types +++ b/tests/baselines/reference/typeGuardsInClassMethods.types @@ -23,7 +23,7 @@ class C1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -39,7 +39,7 @@ class C1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -52,7 +52,7 @@ class C1 { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -70,7 +70,7 @@ class C1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -86,7 +86,7 @@ class C1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -99,7 +99,7 @@ class C1 { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -117,7 +117,7 @@ class C1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -133,7 +133,7 @@ class C1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -146,7 +146,7 @@ class C1 { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -164,7 +164,7 @@ class C1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -180,7 +180,7 @@ class C1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -193,7 +193,7 @@ class C1 { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -211,7 +211,7 @@ class C1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -227,7 +227,7 @@ class C1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -240,7 +240,7 @@ class C1 { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.types b/tests/baselines/reference/typeGuardsInConditionalExpression.types index 493a8c0a31afd..34c07a8c8119a 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.types +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.types @@ -15,7 +15,7 @@ function foo(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? x.length // string >x.length : number @@ -36,7 +36,7 @@ function foo2(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? (x = 10 && x)// string | number >(x = 10 && x) : number | string @@ -60,14 +60,14 @@ function foo3(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? (x = "Hello" && x) // string | number >(x = "Hello" && x) : number | string >x = "Hello" && x : number | string >x : number | string >"Hello" && x : number | string ->"Hello" : string +>"Hello" : "Hello" >x : number | string : x; // string | number @@ -84,7 +84,7 @@ function foo4(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? x // string | number >x : number | string @@ -107,7 +107,7 @@ function foo5(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? x // string | number >x : number | string @@ -117,7 +117,7 @@ function foo5(x: number | string) { >x = "hello" && x : number | string >x : number | string >"hello" && x : number | string ->"hello" : string +>"hello" : "hello" >x : number | string } function foo6(x: number | string) { @@ -130,7 +130,7 @@ function foo6(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? (x = 10 && x) // string | number >(x = 10 && x) : number | string @@ -145,7 +145,7 @@ function foo6(x: number | string) { >x = "hello" && x : number | string >x : number | string >"hello" && x : number | string ->"hello" : string +>"hello" : "hello" >x : number | string } function foo7(x: number | string | boolean) { @@ -157,19 +157,19 @@ function foo7(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x === "hello" // string >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" : typeof x === "boolean" >typeof x === "boolean" ? x // boolean : x == 10 : boolean >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x // boolean >x : boolean @@ -191,12 +191,12 @@ function foo8(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x === "hello" >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" : ((b = x) && // number | boolean >((b = x) && // number | boolean (typeof x === "boolean" ? x // boolean : x == 10)) : boolean @@ -212,7 +212,7 @@ function foo8(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x // boolean >x : boolean @@ -236,7 +236,7 @@ function foo9(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" ? ((y = x.length) && x === "hello") // string >((y = x.length) && x === "hello") : boolean @@ -249,7 +249,7 @@ function foo9(x: number | string) { >length : number >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" : x === 10; // number >x === 10 : boolean @@ -269,7 +269,7 @@ function foo10(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x // string >x : string @@ -287,7 +287,7 @@ function foo10(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" && x.toString()); // x is number >x.toString() : string @@ -309,7 +309,7 @@ function foo11(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x // number | boolean | string - changed in the false branch >x : number | string | boolean @@ -328,7 +328,7 @@ function foo11(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" && (x = 10) // assignment to x >(x = 10) : number @@ -353,7 +353,7 @@ function foo12(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? (x = 10 && x.toString().length) // number | boolean | string - changed here >(x = 10 && x.toString().length) : number @@ -381,7 +381,7 @@ function foo12(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" && x); // x is number >x : number diff --git a/tests/baselines/reference/typeGuardsInExternalModule.types b/tests/baselines/reference/typeGuardsInExternalModule.types index e20063719f5b6..cf1b6e7c42f32 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.types +++ b/tests/baselines/reference/typeGuardsInExternalModule.types @@ -13,7 +13,7 @@ if (typeof var1 === "string") { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" num = var1.length; // string >num = var1.length : number @@ -40,7 +40,7 @@ if (typeof var2 === "string") { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" // export makes the var property and not variable strOrNum = var2; // string | number diff --git a/tests/baselines/reference/typeGuardsInFunction.types b/tests/baselines/reference/typeGuardsInFunction.types index 5ae489ce48a8e..6a007dd7c955e 100644 --- a/tests/baselines/reference/typeGuardsInFunction.types +++ b/tests/baselines/reference/typeGuardsInFunction.types @@ -22,7 +22,7 @@ function f(param: string | number) { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -38,7 +38,7 @@ function f(param: string | number) { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -51,7 +51,7 @@ function f(param: string | number) { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -76,7 +76,7 @@ function f1(param: string | number) { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -89,7 +89,7 @@ function f1(param: string | number) { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -102,7 +102,7 @@ function f1(param: string | number) { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -118,7 +118,7 @@ function f1(param: string | number) { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" >var3.length : number >var3 : string >length : number @@ -130,7 +130,7 @@ function f1(param: string | number) { >typeof param1 === "string" : boolean >typeof param1 : string >param1 : string | number ->"string" : string +>"string" : "string" >param1.length : number >param1 : string >length : number @@ -160,7 +160,7 @@ function f2(param: string | number) { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -173,7 +173,7 @@ function f2(param: string | number) { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -186,7 +186,7 @@ function f2(param: string | number) { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -202,7 +202,7 @@ function f2(param: string | number) { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" >var3.length : number >var3 : string >length : number @@ -214,7 +214,7 @@ function f2(param: string | number) { >typeof param1 === "string" : boolean >typeof param1 : string >param1 : string | number ->"string" : string +>"string" : "string" >param1.length : number >param1 : string >length : number @@ -247,7 +247,7 @@ function f3(param: string | number) { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -260,7 +260,7 @@ function f3(param: string | number) { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -273,7 +273,7 @@ function f3(param: string | number) { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -289,7 +289,7 @@ function f3(param: string | number) { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" >var3.length : number >var3 : string >length : number @@ -301,7 +301,7 @@ function f3(param: string | number) { >typeof param1 === "string" : boolean >typeof param1 : string >param1 : string | number ->"string" : string +>"string" : "string" >param1.length : number >param1 : string >length : number @@ -332,7 +332,7 @@ strOrNum = typeof f4() === "string" && f4(); // string | number >typeof f4() : string >f4() : string | number >f4 : () => string | number ->"string" : string +>"string" : "string" >f4() : string | number >f4 : () => string | number diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types index f7d56ed17d1a6..2d95d92a9be50 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types @@ -10,7 +10,7 @@ function foo(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x >x : string @@ -29,7 +29,7 @@ function foo(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string @@ -54,7 +54,7 @@ function foo2(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x >x : string @@ -74,7 +74,7 @@ function foo2(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string @@ -100,7 +100,7 @@ function foo3(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x >x : string @@ -119,7 +119,7 @@ function foo3(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string @@ -144,7 +144,7 @@ function foo4(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" ? x >x : string @@ -164,7 +164,7 @@ function foo4(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string @@ -190,7 +190,7 @@ function foo5(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" var y = x; // string; >y : string @@ -225,7 +225,7 @@ module m { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" y = x // string; >y = x : string @@ -240,7 +240,7 @@ module m { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string @@ -277,7 +277,7 @@ module m1 { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" y = x // string; >y = x : string @@ -292,7 +292,7 @@ module m1 { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" ? x.toString() // boolean >x.toString() : string diff --git a/tests/baselines/reference/typeGuardsInGlobal.types b/tests/baselines/reference/typeGuardsInGlobal.types index b64c1edcc1341..7935c05411e2e 100644 --- a/tests/baselines/reference/typeGuardsInGlobal.types +++ b/tests/baselines/reference/typeGuardsInGlobal.types @@ -13,7 +13,7 @@ if (typeof var1 === "string") { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" num = var1.length; // string >num = var1.length : number diff --git a/tests/baselines/reference/typeGuardsInIfStatement.types b/tests/baselines/reference/typeGuardsInIfStatement.types index 0095a7cc768ea..e50554ddeb146 100644 --- a/tests/baselines/reference/typeGuardsInIfStatement.types +++ b/tests/baselines/reference/typeGuardsInIfStatement.types @@ -13,7 +13,7 @@ function foo(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" return x.length; // string >x.length : number @@ -35,7 +35,7 @@ function foo2(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" x = 10; >x = 10 : number @@ -59,12 +59,12 @@ function foo3(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" x = "Hello"; // even though assigned using same type as narrowed expression ->x = "Hello" : string +>x = "Hello" : "Hello" >x : number | string ->"Hello" : string +>"Hello" : "Hello" return x; // string | number >x : number | string @@ -83,7 +83,7 @@ function foo4(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" return x; // string | number >x : number | string @@ -107,16 +107,16 @@ function foo5(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" return x; // string | number >x : number | string } else { x = "hello"; ->x = "hello" : string +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" return x; // string | number >x : number | string @@ -131,7 +131,7 @@ function foo6(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" x = 10; >x = 10 : number @@ -143,9 +143,9 @@ function foo6(x: number | string) { } else { x = "hello"; ->x = "hello" : string +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" return x; // string | number >x : number | string @@ -159,18 +159,18 @@ function foo7(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" return x === "hello"; // string >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" } else if (typeof x === "boolean") { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" return x; // boolean >x : boolean @@ -190,12 +190,12 @@ function foo8(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" return x === "hello"; // string >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" } else { var b: number | boolean = x; // number | boolean @@ -206,7 +206,7 @@ function foo8(x: number | string | boolean) { >typeof x === "boolean" : boolean >typeof x : string >x : number | boolean ->"boolean" : string +>"boolean" : "boolean" return x; // boolean >x : boolean @@ -231,7 +231,7 @@ function foo9(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop y = x.length; @@ -244,7 +244,7 @@ function foo9(x: number | string) { return x === "hello"; // string >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" } else { return x == 10; // number @@ -262,12 +262,12 @@ function foo10(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" return x === "hello"; // string >x === "hello" : boolean >x : string ->"hello" : string +>"hello" : "hello" } else { var y: boolean | string; @@ -282,7 +282,7 @@ function foo10(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" ? x === 10 // number >x === 10 : boolean @@ -303,7 +303,7 @@ function foo11(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" return x; // string | number | boolean - x changed in else branch >x : number | string | boolean @@ -321,7 +321,7 @@ function foo11(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" ? ( >( // change value of x x = 10 && x.toString() // number | boolean | string ) : string @@ -365,7 +365,7 @@ function foo12(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" return x.toString(); // string | number | boolean - x changed in else branch >x.toString() : string @@ -388,7 +388,7 @@ function foo12(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" ? x.toString() // number >x.toString() : string diff --git a/tests/baselines/reference/typeGuardsInModule.types b/tests/baselines/reference/typeGuardsInModule.types index 6b6c552f0cced..a15055ebee11e 100644 --- a/tests/baselines/reference/typeGuardsInModule.types +++ b/tests/baselines/reference/typeGuardsInModule.types @@ -24,7 +24,7 @@ module m1 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -37,7 +37,7 @@ module m1 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" num = var2.length; // string >num = var2.length : number @@ -61,7 +61,7 @@ module m1 { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" strOrNum = var3; // string | number >strOrNum = var3 : string | number @@ -96,7 +96,7 @@ module m2 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -109,7 +109,7 @@ module m2 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -122,7 +122,7 @@ module m2 { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" >var3 : string | number // variables in module declaration @@ -133,7 +133,7 @@ module m2 { >typeof var4 === "string" : boolean >typeof var4 : string >var4 : string | number ->"string" : string +>"string" : "string" num = var4.length; // string >num = var4.length : number @@ -157,7 +157,7 @@ module m2 { >typeof var5 === "string" : boolean >typeof var5 : string >var5 : string | number ->"string" : string +>"string" : "string" strOrNum = var5; // string | number >strOrNum = var5 : string | number @@ -185,7 +185,7 @@ module m3.m4 { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -198,7 +198,7 @@ module m3.m4 { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" num = var2.length; // string >num = var2.length : number @@ -222,7 +222,7 @@ module m3.m4 { >typeof var3 === "string" : boolean >typeof var3 : string >var3 : string | number ->"string" : string +>"string" : "string" strOrNum = var3; // string | number >strOrNum = var3 : string | number diff --git a/tests/baselines/reference/typeGuardsInProperties.types b/tests/baselines/reference/typeGuardsInProperties.types index ca4d8b9452786..618ee41fb7998 100644 --- a/tests/baselines/reference/typeGuardsInProperties.types +++ b/tests/baselines/reference/typeGuardsInProperties.types @@ -37,7 +37,7 @@ class C1 { >this.pp1 : string | number >this : this >pp1 : string | number ->"string" : string +>"string" : "string" >this.pp1 : string | number >this : this >pp1 : string | number @@ -51,7 +51,7 @@ class C1 { >this.pp2 : string | number >this : this >pp2 : string | number ->"string" : string +>"string" : "string" >this.pp2 : string | number >this : this >pp2 : string | number @@ -65,7 +65,7 @@ class C1 { >this.pp3 : string | number >this : this >pp3 : string | number ->"string" : string +>"string" : "string" >this.pp3 : string | number >this : this >pp3 : string | number @@ -84,7 +84,7 @@ strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number >c1.pp2 : string | number >c1 : C1 >pp2 : string | number ->"string" : string +>"string" : "string" >c1.pp2 : string | number >c1 : C1 >pp2 : string | number @@ -98,7 +98,7 @@ strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number >c1.pp3 : string | number >c1 : C1 >pp3 : string | number ->"string" : string +>"string" : "string" >c1.pp3 : string | number >c1 : C1 >pp3 : string | number @@ -119,7 +119,7 @@ strOrNum = typeof obj1.x === "string" && obj1.x; // string | number >obj1.x : string | number >obj1 : { x: string | number; } >x : string | number ->"string" : string +>"string" : "string" >obj1.x : string | number >obj1 : { x: string | number; } >x : string | number diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types index 22d390618c165..2168cc907fad3 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types @@ -11,7 +11,7 @@ function foo(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" >x.length === 10 : boolean >x.length : number >x : string @@ -28,7 +28,7 @@ function foo2(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" >((x = 10) && x) : number | string >(x = 10) && x : number | string >(x = 10) : number @@ -47,13 +47,13 @@ function foo3(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" >((x = "hello") && x) : number | string >(x = "hello") && x : number | string ->(x = "hello") : string ->x = "hello" : string +>(x = "hello") : "hello" +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" >x : number | string } function foo4(x: number | string | boolean) { @@ -66,13 +66,13 @@ function foo4(x: number | string | boolean) { >typeof x !== "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" && typeof x !== "number" // number | boolean >typeof x !== "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" && x; // boolean >x : boolean @@ -90,7 +90,7 @@ function foo5(x: number | string | boolean) { >typeof x !== "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" && ((b = x) && (typeof x !== "number" // number | boolean >((b = x) && (typeof x !== "number" // number | boolean && x)) : boolean @@ -104,7 +104,7 @@ function foo5(x: number | string | boolean) { >typeof x !== "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" && x)); // boolean >x : boolean @@ -119,7 +119,7 @@ function foo6(x: number | string | boolean) { >typeof x !== "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" && (typeof x !== "number" // number | boolean >(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean @@ -127,7 +127,7 @@ function foo6(x: number | string | boolean) { >typeof x !== "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" ? x // boolean >x : boolean @@ -154,7 +154,7 @@ function foo7(x: number | string | boolean) { >typeof x !== "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" && ((z = x) // string | number | boolean - x changed deeper in conditional expression >((z = x) // string | number | boolean - x changed deeper in conditional expression && (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : string @@ -170,7 +170,7 @@ function foo7(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string @@ -208,7 +208,7 @@ function foo8(x: number | string) { >typeof x !== "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" && (x = 10) // change x - number| string >(x = 10) : number @@ -222,7 +222,7 @@ function foo8(x: number | string) { >typeof x === "number" : boolean >typeof x : string >x : number | string ->"number" : string +>"number" : "number" ? x // number >x : number diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types index 38d9a723d3a86..7829a9cca28ed 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types @@ -11,7 +11,7 @@ function foo(x: number | string) { >typeof x !== "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" >x.length === 10 : boolean >x.length : number >x : string @@ -28,7 +28,7 @@ function foo2(x: number | string) { >typeof x !== "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" >((x = 10) || x) : number | string >(x = 10) || x : number | string >(x = 10) : number @@ -38,22 +38,22 @@ function foo2(x: number | string) { >x : number | string } function foo3(x: number | string) { ->foo3 : (x: number | string) => boolean | string | number +>foo3 : (x: number | string) => boolean | number | string >x : number | string // modify x in right hand operand with string type itself return typeof x !== "string" || ((x = "hello") || x); // string | number ->typeof x !== "string" || ((x = "hello") || x) : boolean | string | number +>typeof x !== "string" || ((x = "hello") || x) : boolean | number | string >typeof x !== "string" : boolean >typeof x : string >x : number | string ->"string" : string ->((x = "hello") || x) : string | number ->(x = "hello") || x : string | number ->(x = "hello") : string ->x = "hello" : string +>"string" : "string" +>((x = "hello") || x) : number | string +>(x = "hello") || x : number | string +>(x = "hello") : "hello" +>x = "hello" : "hello" >x : number | string ->"hello" : string +>"hello" : "hello" >x : number | string } function foo4(x: number | string | boolean) { @@ -66,13 +66,13 @@ function foo4(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" || typeof x === "number" // number | boolean >typeof x === "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" || x; // boolean >x : boolean @@ -90,7 +90,7 @@ function foo5(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" || ((b = x) || (typeof x === "number" // number | boolean >((b = x) || (typeof x === "number" // number | boolean || x)) : number | boolean @@ -104,7 +104,7 @@ function foo5(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" || x)); // boolean >x : boolean @@ -119,7 +119,7 @@ function foo6(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" || (typeof x !== "number" // number | boolean >(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean @@ -127,7 +127,7 @@ function foo6(x: number | string | boolean) { >typeof x !== "number" : boolean >typeof x : string >x : number | boolean ->"number" : string +>"number" : "number" ? x // boolean >x : boolean @@ -154,7 +154,7 @@ function foo7(x: number | string | boolean) { >typeof x === "string" : boolean >typeof x : string >x : number | string | boolean ->"string" : string +>"string" : "string" || ((z = x) // string | number | boolean - x changed deeper in conditional expression >((z = x) // string | number | boolean - x changed deeper in conditional expression || (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : number | string | boolean @@ -170,7 +170,7 @@ function foo7(x: number | string | boolean) { >typeof x === "number" : boolean >typeof x : string >x : number | string | boolean ->"number" : string +>"number" : "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string @@ -208,7 +208,7 @@ function foo8(x: number | string) { >typeof x === "string" : boolean >typeof x : string >x : number | string ->"string" : string +>"string" : "string" || (x = 10) // change x - number| string >(x = 10) : number @@ -222,7 +222,7 @@ function foo8(x: number | string) { >typeof x === "number" : boolean >typeof x : string >x : number | string ->"number" : string +>"number" : "number" ? x // number >x : number diff --git a/tests/baselines/reference/typeGuardsObjectMethods.types b/tests/baselines/reference/typeGuardsObjectMethods.types index 4ca691bc02061..725a3eb574aa2 100644 --- a/tests/baselines/reference/typeGuardsObjectMethods.types +++ b/tests/baselines/reference/typeGuardsObjectMethods.types @@ -30,7 +30,7 @@ var obj1 = { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -46,7 +46,7 @@ var obj1 = { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -59,7 +59,7 @@ var obj1 = { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -79,7 +79,7 @@ var obj1 = { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -95,7 +95,7 @@ var obj1 = { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -116,7 +116,7 @@ var obj1 = { >typeof var1 === "string" : boolean >typeof var1 : string >var1 : string | number ->"string" : string +>"string" : "string" >var1.length : number >var1 : string >length : number @@ -132,7 +132,7 @@ var obj1 = { >typeof var2 === "string" : boolean >typeof var2 : string >var2 : string | number ->"string" : string +>"string" : "string" >var2.length : number >var2 : string >length : number @@ -145,7 +145,7 @@ var obj1 = { >typeof param === "string" : boolean >typeof param : string >param : string | number ->"string" : string +>"string" : "string" >param.length : number >param : string >length : number @@ -163,7 +163,7 @@ strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); >obj1 : { method(param: string | number): string | number; prop: string | number; } >method : (param: string | number) => string | number >strOrNum : string | number ->"string" : string +>"string" : "string" >obj1.method(strOrNum) : string | number >obj1.method : (param: string | number) => string | number >obj1 : { method(param: string | number): string | number; prop: string | number; } @@ -180,7 +180,7 @@ strOrNum = typeof obj1.prop === "string" && obj1.prop; >obj1.prop : string | number >obj1 : { method(param: string | number): string | number; prop: string | number; } >prop : string | number ->"string" : string +>"string" : "string" >obj1.prop : string | number >obj1 : { method(param: string | number): string | number; prop: string | number; } >prop : string | number diff --git a/tests/baselines/reference/typeInferenceFBoundedTypeParams.types b/tests/baselines/reference/typeInferenceFBoundedTypeParams.types index 0ce04aabddff6..bce57f81fc5b8 100644 --- a/tests/baselines/reference/typeInferenceFBoundedTypeParams.types +++ b/tests/baselines/reference/typeInferenceFBoundedTypeParams.types @@ -80,9 +80,9 @@ fold( >result : [string, string][] ["", ""] ->["", ""] : [string, string] ->"" : string ->"" : string +>["", ""] : ["", ""] +>"" : "" +>"" : "" ) ); diff --git a/tests/baselines/reference/typeInferenceWithTupleType.types b/tests/baselines/reference/typeInferenceWithTupleType.types index a45e72518e844..45b5d36b60daa 100644 --- a/tests/baselines/reference/typeInferenceWithTupleType.types +++ b/tests/baselines/reference/typeInferenceWithTupleType.types @@ -20,7 +20,7 @@ var combineResult = combine("string", 10); >combineResult : [string, number] >combine("string", 10) : [string, number] >combine : (x: T, y: U) => [T, U] ->"string" : string +>"string" : "string" >10 : number var combineEle1 = combineResult[0]; // string @@ -102,9 +102,9 @@ var zipResult = zip(["foo", "bar"], [5, 6]); >zipResult : [[string, number]] >zip(["foo", "bar"], [5, 6]) : [[string, number]] >zip : (array1: T[], array2: U[]) => [[T, U]] ->["foo", "bar"] : string[] ->"foo" : string ->"bar" : string +>["foo", "bar"] : ("foo" | "bar")[] +>"foo" : "foo" +>"bar" : "bar" >[5, 6] : number[] >5 : number >6 : number diff --git a/tests/baselines/reference/typeOfPrototype.types b/tests/baselines/reference/typeOfPrototype.types index 904667870809b..3eda479985c56 100644 --- a/tests/baselines/reference/typeOfPrototype.types +++ b/tests/baselines/reference/typeOfPrototype.types @@ -8,7 +8,7 @@ class Foo { static bar = ''; >bar : string ->'' : string +>'' : "" } Foo.prototype.bar = undefined; // Should be OK >Foo.prototype.bar = undefined : undefined diff --git a/tests/baselines/reference/typeOfThisInStaticMembers.types b/tests/baselines/reference/typeOfThisInStaticMembers.types index 72caa4a95a99d..922e2730f34a6 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers.types +++ b/tests/baselines/reference/typeOfThisInStaticMembers.types @@ -103,6 +103,6 @@ var r7 = new t2(''); >r7 : C2<{}> >new t2('') : C2<{}> >t2 : typeof C2 ->'' : string +>'' : "" diff --git a/tests/baselines/reference/typeParameterAsElementType.types b/tests/baselines/reference/typeParameterAsElementType.types index 3b145b7f3cf33..1cf9d17c409a5 100644 --- a/tests/baselines/reference/typeParameterAsElementType.types +++ b/tests/baselines/reference/typeParameterAsElementType.types @@ -9,7 +9,7 @@ function fee() { var arr = [t, ""]; >arr : (T | string)[] ->[t, ""] : (T | string)[] +>[t, ""] : (T | "")[] >t : T ->"" : string +>"" : "" } diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.types index c5f15f1ba5596..ff23f44c7cc21 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.types @@ -85,7 +85,7 @@ foo2(1, ''); >foo2(1, '') : string >foo2 : (x: T, y: U) => U >1 : number ->'' : string +>'' : "" foo2({}, { length: 2 }); >foo2({}, { length: 2 }) : { length: number; } @@ -115,6 +115,6 @@ foo2(1, ['']); >foo2(1, ['']) : string[] >foo2 : (x: T, y: U) => U >1 : number ->[''] : string[] ->'' : string +>[''] : ""[] +>'' : "" diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types index e2d41c5c136c6..6d251fd1db234 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types @@ -57,16 +57,16 @@ foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); >{ x: 1 } : { x: number; } >x : number >1 : number ->{ x: 1, y: '' } : { x: number; y: string; } +>{ x: 1, y: '' } : { x: number; y: ""; } >x : number >1 : number ->y : string ->'' : string ->{ x: 2, y: '', z: true } : { x: number; y: string; z: boolean; } +>y : "" +>'' : "" +>{ x: 2, y: '', z: true } : { x: number; y: ""; z: boolean; } >x : number >2 : number ->y : string ->'' : string +>y : "" +>'' : "" >z : boolean >true : boolean @@ -82,11 +82,11 @@ foo(a, b, { foo: 1, bar: '', hm: true }); >foo : (x: T, y: U, z: V) => V >a : A >b : B ->{ foo: 1, bar: '', hm: true } : { foo: number; bar: string; hm: boolean; } +>{ foo: 1, bar: '', hm: true } : { foo: number; bar: ""; hm: boolean; } >foo : number >1 : number ->bar : string ->'' : string +>bar : "" +>'' : "" >hm : boolean >true : boolean @@ -135,11 +135,11 @@ foo(b, b, { foo: 1, bar: '', hm: '' }); >foo : (x: T, y: U, z: V) => V >b : B >b : B ->{ foo: 1, bar: '', hm: '' } : { foo: number; bar: string; hm: string; } +>{ foo: 1, bar: '', hm: '' } : { foo: number; bar: ""; hm: ""; } >foo : number >1 : number ->bar : string ->'' : string ->hm : string ->'' : string +>bar : "" +>'' : "" +>hm : "" +>'' : "" diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types index 3d51ad80832cf..fbe634de26fa6 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types @@ -49,7 +49,7 @@ foo(1, 2, ''); >foo : (x: T, y: U, z: V) => V >1 : number >2 : number ->'' : string +>'' : "" foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); >foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }) : { x: number; y: number; z: boolean; } @@ -57,11 +57,11 @@ foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); >{ x: 1 } : { x: number; } >x : number >1 : number ->{ x: 1, y: '' } : { x: number; y: string; } +>{ x: 1, y: '' } : { x: number; y: ""; } >x : number >1 : number ->y : string ->'' : string +>y : "" +>'' : "" >{ x: 2, y: 2, z: true } : { x: number; y: number; z: boolean; } >x : number >2 : number @@ -81,11 +81,11 @@ foo(a, { foo: 1, bar: '', hm: true }, b); >foo(a, { foo: 1, bar: '', hm: true }, b) : B >foo : (x: T, y: U, z: V) => V >a : A ->{ foo: 1, bar: '', hm: true } : { foo: number; bar: string; hm: boolean; } +>{ foo: 1, bar: '', hm: true } : { foo: number; bar: ""; hm: boolean; } >foo : number >1 : number ->bar : string ->'' : string +>bar : "" +>'' : "" >hm : boolean >true : boolean >b : B diff --git a/tests/baselines/reference/typedGenericPrototypeMember.types b/tests/baselines/reference/typedGenericPrototypeMember.types index 9e3f064de0dcd..b772c3be680c6 100644 --- a/tests/baselines/reference/typedGenericPrototypeMember.types +++ b/tests/baselines/reference/typedGenericPrototypeMember.types @@ -16,5 +16,5 @@ List.prototype.add("abc"); // Valid because T is instantiated to any >List : typeof List >prototype : List >add : (item: any) => void ->"abc" : string +>"abc" : "abc" diff --git a/tests/baselines/reference/typeofInterface.types b/tests/baselines/reference/typeofInterface.types index 70e3cfe69266e..c2aa4b58e3197 100644 --- a/tests/baselines/reference/typeofInterface.types +++ b/tests/baselines/reference/typeofInterface.types @@ -23,7 +23,7 @@ var j: typeof k.foo = { a: "hello" }; >k.foo : { a: string; } >k : I >foo : { a: string; } ->{ a: "hello" } : { a: string; } ->a : string ->"hello" : string +>{ a: "hello" } : { a: "hello"; } +>a : "hello" +>"hello" : "hello" diff --git a/tests/baselines/reference/typeofOperatorWithEnumType.types b/tests/baselines/reference/typeofOperatorWithEnumType.types index f9224811393c5..a4e24b1466291 100644 --- a/tests/baselines/reference/typeofOperatorWithEnumType.types +++ b/tests/baselines/reference/typeofOperatorWithEnumType.types @@ -27,7 +27,7 @@ var ResultIsString3 = typeof ENUM1["A"]; >typeof ENUM1["A"] : string >ENUM1["A"] : ENUM1 >ENUM1 : typeof ENUM1 ->"A" : string +>"A" : "A" var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); >ResultIsString4 : string @@ -39,7 +39,7 @@ var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); >0 : number >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" // multiple typeof operators var ResultIsString5 = typeof typeof ENUM; @@ -75,7 +75,7 @@ typeof ENUM1["B"]; >typeof ENUM1["B"] : string >ENUM1["B"] : ENUM1 >ENUM1 : typeof ENUM1 ->"B" : string +>"B" : "B" typeof ENUM, ENUM1; >typeof ENUM, ENUM1 : typeof ENUM1 diff --git a/tests/baselines/reference/typesWithOptionalProperty.types b/tests/baselines/reference/typesWithOptionalProperty.types index 89879740732ca..dbf41521bf72e 100644 --- a/tests/baselines/reference/typesWithOptionalProperty.types +++ b/tests/baselines/reference/typesWithOptionalProperty.types @@ -30,28 +30,28 @@ var a: { var b = { foo: '' }; >b : { foo: string; } ->{ foo: '' } : { foo: string; } ->foo : string ->'' : string +>{ foo: '' } : { foo: ""; } +>foo : "" +>'' : "" var c = { foo: '', bar: 3 }; >c : { foo: string; bar: number; } ->{ foo: '', bar: 3 } : { foo: string; bar: number; } ->foo : string ->'' : string +>{ foo: '', bar: 3 } : { foo: ""; bar: number; } +>foo : "" +>'' : "" >bar : number >3 : number var d = { foo: '', bar: 3, baz: () => '' }; >d : { foo: string; bar: number; baz: () => string; } ->{ foo: '', bar: 3, baz: () => '' } : { foo: string; bar: number; baz: () => string; } ->foo : string ->'' : string +>{ foo: '', bar: 3, baz: () => '' } : { foo: ""; bar: number; baz: () => string; } +>foo : "" +>'' : "" >bar : number >3 : number >baz : () => string >() => '' : () => string ->'' : string +>'' : "" var i: I; >i : I diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.types b/tests/baselines/reference/typesWithSpecializedCallSignatures.types index b587ee7840e27..b2ce825199f24 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.types @@ -143,5 +143,5 @@ var r3: Base = c.foo('hm'); >c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >c : C >foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } ->'hm' : string +>'hm' : "hm" diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types index 3036c0cea714d..3829cd5ce217f 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types @@ -38,7 +38,7 @@ var c = new C('a'); >c : C >new C('a') : C >C : typeof C ->'a' : string +>'a' : "a" interface I { >I : I @@ -114,5 +114,5 @@ var r3: Base = new a('hm'); >Base : Base >new a('hm') : Base >a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } ->'hm' : string +>'hm' : "hm" diff --git a/tests/baselines/reference/unaryPlus.types b/tests/baselines/reference/unaryPlus.types index fc7a038ac72ce..32abffe38b028 100644 --- a/tests/baselines/reference/unaryPlus.types +++ b/tests/baselines/reference/unaryPlus.types @@ -10,7 +10,7 @@ var b = +(""); >+("") : number >("") : any >"" : any ->"" : string +>"" : "" enum E { some, thing }; >E : E @@ -28,15 +28,15 @@ var c = +E.some; var x = +"3"; //should be valid >x : number >+"3" : number ->"3" : string +>"3" : "3" var y = -"3"; // should be valid >y : number >-"3" : number ->"3" : string +>"3" : "3" var z = ~"3"; // should be valid >z : number >~"3" : number ->"3" : string +>"3" : "3" diff --git a/tests/baselines/reference/uncaughtCompilerError1.types b/tests/baselines/reference/uncaughtCompilerError1.types index 20a3f0fbedd87..47245c8880a5b 100644 --- a/tests/baselines/reference/uncaughtCompilerError1.types +++ b/tests/baselines/reference/uncaughtCompilerError1.types @@ -19,7 +19,7 @@ function f() { >lineTokens : any >index : any >trim : any ->'=' : string +>'=' : "=" >index > 0 : boolean >index : any >0 : number @@ -27,7 +27,7 @@ function f() { >token.type : any >token : any >type : any ->'' : string +>'' : "" >tokens[index - 1].type === 'attribute.name.html' : boolean >tokens[index - 1].type : any >tokens[index - 1] : any @@ -36,7 +36,7 @@ function f() { >index : any >1 : number >type : any ->'attribute.name.html' : string +>'attribute.name.html' : "attribute.name.html" if (index === (tokens.length - 1)) { >index === (tokens.length - 1) : boolean @@ -49,9 +49,9 @@ function f() { >1 : number return { appendText: '\"\"', advanceCount: 1 }; ->{ appendText: '\"\"', advanceCount: 1 } : { appendText: string; advanceCount: number; } ->appendText : string ->'\"\"' : string +>{ appendText: '\"\"', advanceCount: 1 } : { appendText: "\"\""; advanceCount: number; } +>appendText : "\"\"" +>'\"\"' : "\"\"" >advanceCount : number >1 : number } @@ -65,7 +65,7 @@ function f() { >index : any >1 : number >type : any ->'attribute.value.html' : string +>'attribute.value.html' : "attribute.value.html" >tokens[index + 1].type !== '' : boolean >tokens[index + 1].type : any >tokens[index + 1] : any @@ -74,12 +74,12 @@ function f() { >index : any >1 : number >type : any ->'' : string +>'' : "" return { appendText: '\"\"', advanceCount: 1 }; ->{ appendText: '\"\"', advanceCount: 1 } : { appendText: string; advanceCount: number; } ->appendText : string ->'\"\"' : string +>{ appendText: '\"\"', advanceCount: 1 } : { appendText: "\"\""; advanceCount: number; } +>appendText : "\"\"" +>'\"\"' : "\"\"" >advanceCount : number >1 : number } diff --git a/tests/baselines/reference/underscoreMapFirst.types b/tests/baselines/reference/underscoreMapFirst.types index 60cbcccda2bd4..4de1389113765 100644 --- a/tests/baselines/reference/underscoreMapFirst.types +++ b/tests/baselines/reference/underscoreMapFirst.types @@ -127,7 +127,7 @@ class MyView extends View { >this : this >model : any >get : any ->"data" : string +>"data" : "data" var allSeries: ISeries[][] = _.pluck(data, "series"); >allSeries : ISeries[][] @@ -137,7 +137,7 @@ class MyView extends View { >_ : typeof _ >pluck : (list: _.Collection, propertyName: string) => any[] >data : IData[] ->"series" : string +>"series" : "series" return _.map(allSeries, _.first); >_.map(allSeries, _.first) : ISeries[] diff --git a/tests/baselines/reference/underscoreTest1.types b/tests/baselines/reference/underscoreTest1.types index 7fe233c4490d2..2f5186e0d271c 100644 --- a/tests/baselines/reference/underscoreTest1.types +++ b/tests/baselines/reference/underscoreTest1.types @@ -173,39 +173,39 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); >0 : number var listOfPlays = [{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }]; ->listOfPlays : { title: string; author: string; year: number; }[] ->[{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }] : { title: string; author: string; year: number; }[] ->{ title: "Cymbeline", author: "Shakespeare", year: 1611 } : { title: string; author: string; year: number; } ->title : string ->"Cymbeline" : string ->author : string ->"Shakespeare" : string +>listOfPlays : ({ title: string; author: string; year: number; } | { title: string; author: string; year: number; } | { title: string; author: string; year: number; })[] +>[{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }] : ({ title: "Cymbeline"; author: "Shakespeare"; year: number; } | { title: "The Tempest"; author: "Shakespeare"; year: number; } | { title: "Other"; author: "Not Shakespeare"; year: number; })[] +>{ title: "Cymbeline", author: "Shakespeare", year: 1611 } : { title: "Cymbeline"; author: "Shakespeare"; year: number; } +>title : "Cymbeline" +>"Cymbeline" : "Cymbeline" +>author : "Shakespeare" +>"Shakespeare" : "Shakespeare" >year : number >1611 : number ->{ title: "The Tempest", author: "Shakespeare", year: 1611 } : { title: string; author: string; year: number; } ->title : string ->"The Tempest" : string ->author : string ->"Shakespeare" : string +>{ title: "The Tempest", author: "Shakespeare", year: 1611 } : { title: "The Tempest"; author: "Shakespeare"; year: number; } +>title : "The Tempest" +>"The Tempest" : "The Tempest" +>author : "Shakespeare" +>"Shakespeare" : "Shakespeare" >year : number >1611 : number ->{ title: "Other", author: "Not Shakespeare", year: 2012 } : { title: string; author: string; year: number; } ->title : string ->"Other" : string ->author : string ->"Not Shakespeare" : string +>{ title: "Other", author: "Not Shakespeare", year: 2012 } : { title: "Other"; author: "Not Shakespeare"; year: number; } +>title : "Other" +>"Other" : "Other" +>author : "Not Shakespeare" +>"Not Shakespeare" : "Not Shakespeare" >year : number >2012 : number _.where(listOfPlays, { author: "Shakespeare", year: 1611 }); ->_.where(listOfPlays, { author: "Shakespeare", year: 1611 }) : { title: string; author: string; year: number; }[] +>_.where(listOfPlays, { author: "Shakespeare", year: 1611 }) : ({ title: string; author: string; year: number; } | { title: string; author: string; year: number; } | { title: string; author: string; year: number; })[] >_.where : { (list: T[], properties: Object): T[]; (list: Dictionary, properties: Object): T[]; } >_ : Underscore.Static >where : { (list: T[], properties: Object): T[]; (list: Dictionary, properties: Object): T[]; } ->listOfPlays : { title: string; author: string; year: number; }[] ->{ author: "Shakespeare", year: 1611 } : { author: string; year: number; } ->author : string ->"Shakespeare" : string +>listOfPlays : ({ title: string; author: string; year: number; } | { title: string; author: string; year: number; } | { title: string; author: string; year: number; })[] +>{ author: "Shakespeare", year: 1611 } : { author: "Shakespeare"; year: number; } +>author : "Shakespeare" +>"Shakespeare" : "Shakespeare" >year : number >1611 : number @@ -235,11 +235,11 @@ _.all([true, 1, null, 'yes'], _.identity); >_.all : { (list: T[], iterator?: Iterator, context?: any): boolean; (list: Dictionary, iterator?: Iterator, context?: any): boolean; } >_ : Underscore.Static >all : { (list: T[], iterator?: Iterator, context?: any): boolean; (list: Dictionary, iterator?: Iterator, context?: any): boolean; } ->[true, 1, null, 'yes'] : (boolean | number | string)[] +>[true, 1, null, 'yes'] : (boolean | number | "yes")[] >true : boolean >1 : number >null : null ->'yes' : string +>'yes' : "yes" >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T @@ -249,10 +249,10 @@ _.any([null, 0, 'yes', false]); >_.any : { (list: T[], iterator?: Iterator, context?: any): boolean; (list: Dictionary, iterator?: Iterator, context?: any): boolean; } >_ : Underscore.Static >any : { (list: T[], iterator?: Iterator, context?: any): boolean; (list: Dictionary, iterator?: Iterator, context?: any): boolean; } ->[null, 0, 'yes', false] : (number | string | boolean)[] +>[null, 0, 'yes', false] : (number | "yes" | boolean)[] >null : null >0 : number ->'yes' : string +>'yes' : "yes" >false : boolean _.contains([1, 2, 3], 3); @@ -280,24 +280,24 @@ _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); >3 : number >2 : number >1 : number ->'sort' : string +>'sort' : "sort" var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }]; ->stooges : { name: string; age: number; }[] ->[{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }] : { name: string; age: number; }[] ->{ name: 'moe', age: 40 } : { name: string; age: number; } ->name : string ->'moe' : string +>stooges : ({ name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; })[] +>[{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }] : ({ name: "moe"; age: number; } | { name: "larry"; age: number; } | { name: "curly"; age: number; })[] +>{ name: 'moe', age: 40 } : { name: "moe"; age: number; } +>name : "moe" +>'moe' : "moe" >age : number >40 : number ->{ name: 'larry', age: 50 } : { name: string; age: number; } ->name : string ->'larry' : string +>{ name: 'larry', age: 50 } : { name: "larry"; age: number; } +>name : "larry" +>'larry' : "larry" >age : number >50 : number ->{ name: 'curly', age: 60 } : { name: string; age: number; } ->name : string ->'curly' : string +>{ name: 'curly', age: 60 } : { name: "curly"; age: number; } +>name : "curly" +>'curly' : "curly" >age : number >60 : number @@ -306,19 +306,19 @@ _.pluck(stooges, 'name'); >_.pluck : { (list: any[], propertyName: string): any[]; (list: Dictionary, propertyName: string): any[]; } >_ : Underscore.Static >pluck : { (list: any[], propertyName: string): any[]; (list: Dictionary, propertyName: string): any[]; } ->stooges : { name: string; age: number; }[] ->'name' : string +>stooges : ({ name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; })[] +>'name' : "name" _.max(stooges, (stooge) => stooge.age); ->_.max(stooges, (stooge) => stooge.age) : { name: string; age: number; } +>_.max(stooges, (stooge) => stooge.age) : { name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; } >_.max : { (list: T[], iterator?: Iterator, context?: any): T; (list: Dictionary, iterator?: Iterator, context?: any): T; } >_ : Underscore.Static >max : { (list: T[], iterator?: Iterator, context?: any): T; (list: Dictionary, iterator?: Iterator, context?: any): T; } ->stooges : { name: string; age: number; }[] ->(stooge) => stooge.age : (stooge: { name: string; age: number; }) => number ->stooge : { name: string; age: number; } +>stooges : ({ name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; })[] +>(stooge) => stooge.age : (stooge: { name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; }) => number +>stooge : { name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; } >stooge.age : number ->stooge : { name: string; age: number; } +>stooge : { name: string; age: number; } | { name: string; age: number; } | { name: string; age: number; } >age : number var numbers = [10, 5, 100, 2, 1000]; @@ -401,11 +401,11 @@ _.groupBy(['one', 'two', 'three'], 'length'); >_.groupBy : { (list: T[], iterator?: Iterator, context?: any): Dictionary; (list: Dictionary, iterator?: Iterator, context?: any): Dictionary; (list: T[], propertyName: string): Dictionary; (list: Dictionary, propertyName: string): Dictionary; } >_ : Underscore.Static >groupBy : { (list: T[], iterator?: Iterator, context?: any): Dictionary; (list: Dictionary, iterator?: Iterator, context?: any): Dictionary; (list: T[], propertyName: string): Dictionary; (list: Dictionary, propertyName: string): Dictionary; } ->['one', 'two', 'three'] : string[] ->'one' : string ->'two' : string ->'three' : string ->'length' : string +>['one', 'two', 'three'] : ("one" | "two" | "three")[] +>'one' : "one" +>'two' : "two" +>'three' : "three" +>'length' : "length" _.countBy([1, 2, 3, 4, 5], (num) => num % 2 == 0 ? 'even' : 'odd'); >_.countBy([1, 2, 3, 4, 5], (num) => num % 2 == 0 ? 'even' : 'odd') : Dictionary @@ -420,14 +420,14 @@ _.countBy([1, 2, 3, 4, 5], (num) => num % 2 == 0 ? 'even' : 'odd'); >5 : number >(num) => num % 2 == 0 ? 'even' : 'odd' : (num: number) => string >num : number ->num % 2 == 0 ? 'even' : 'odd' : string +>num % 2 == 0 ? 'even' : 'odd' : "even" | "odd" >num % 2 == 0 : boolean >num % 2 : number >num : number >2 : number >0 : number ->'even' : string ->'odd' : string +>'even' : "even" +>'odd' : "odd" _.shuffle([1, 2, 3, 4, 5, 6]); >_.shuffle([1, 2, 3, 4, 5, 6]) : number[] @@ -512,12 +512,12 @@ _.compact([0, 1, false, 2, '', 3]); >_.compact : (list: T[]) => T[] >_ : Underscore.Static >compact : (list: T[]) => T[] ->[0, 1, false, 2, '', 3] : (number | boolean | string)[] +>[0, 1, false, 2, '', 3] : (number | boolean | "")[] >0 : number >1 : number >false : boolean >2 : number ->'' : string +>'' : "" >3 : number _.flatten([1, 2, 3, 4]); @@ -659,10 +659,10 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); >_.zip : { (a0: T0[], a1: T1[]): Tuple2[]; (a0: T0[], a1: T1[], a2: T2[]): Tuple3[]; (a0: T0[], a1: T1[], a2: T2[], a3: T3[]): Tuple4[]; (...arrays: any[][]): any[][]; } >_ : Underscore.Static >zip : { (a0: T0[], a1: T1[]): Tuple2[]; (a0: T0[], a1: T1[], a2: T2[]): Tuple3[]; (a0: T0[], a1: T1[], a2: T2[], a3: T3[]): Tuple4[]; (...arrays: any[][]): any[][]; } ->['moe', 'larry', 'curly'] : string[] ->'moe' : string ->'larry' : string ->'curly' : string +>['moe', 'larry', 'curly'] : ("moe" | "larry" | "curly")[] +>'moe' : "moe" +>'larry' : "larry" +>'curly' : "curly" >[30, 40, 50] : number[] >30 : number >40 : number @@ -677,10 +677,10 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]); >_.object : { (list: any[][]): any; (keys: string[], values: any[]): any; } >_ : Underscore.Static >object : { (list: any[][]): any; (keys: string[], values: any[]): any; } ->['moe', 'larry', 'curly'] : string[] ->'moe' : string ->'larry' : string ->'curly' : string +>['moe', 'larry', 'curly'] : ("moe" | "larry" | "curly")[] +>'moe' : "moe" +>'larry' : "larry" +>'curly' : "curly" >[30, 40, 50] : number[] >30 : number >40 : number @@ -691,15 +691,15 @@ _.object([['moe', 30], ['larry', 40], ['curly', 50]]); >_.object : { (list: any[][]): any; (keys: string[], values: any[]): any; } >_ : Underscore.Static >object : { (list: any[][]): any; (keys: string[], values: any[]): any; } ->[['moe', 30], ['larry', 40], ['curly', 50]] : (string | number)[][] ->['moe', 30] : (string | number)[] ->'moe' : string +>[['moe', 30], ['larry', 40], ['curly', 50]] : (("moe" | number)[] | ("larry" | number)[] | ("curly" | number)[])[] +>['moe', 30] : ("moe" | number)[] +>'moe' : "moe" >30 : number ->['larry', 40] : (string | number)[] ->'larry' : string +>['larry', 40] : ("larry" | number)[] +>'larry' : "larry" >40 : number ->['curly', 50] : (string | number)[] ->'curly' : string +>['curly', 50] : ("curly" | number)[] +>'curly' : "curly" >50 : number _.indexOf([1, 2, 3], 2); @@ -789,7 +789,7 @@ var func = function (greeting) { return greeting + ': ' + this.name }; >greeting + ': ' + this.name : string >greeting + ': ' : string >greeting : any ->': ' : string +>': ' : ": " >this.name : any >this : any >name : any @@ -803,10 +803,10 @@ var func2 = _.bind(func, { name: 'moe' }, 'hi'); >_ : Underscore.Static >bind : { (func: T, object: any): T; (func: Function, object: any, ...args: any[]): Function; } >func : (greeting: any) => string ->{ name: 'moe' } : { name: string; } ->name : string ->'moe' : string ->'hi' : string +>{ name: 'moe' } : { name: "moe"; } +>name : "moe" +>'moe' : "moe" +>'hi' : "hi" func2(); >func2() : any @@ -814,11 +814,11 @@ func2(); var buttonView = { >buttonView : { label: string; onClick: () => void; onHover: () => void; } ->{ label: 'underscore', onClick: function () { alert('clicked: ' + this.label); }, onHover: function () { alert('hovering: ' + this.label); }} : { label: string; onClick: () => void; onHover: () => void; } +>{ label: 'underscore', onClick: function () { alert('clicked: ' + this.label); }, onHover: function () { alert('hovering: ' + this.label); }} : { label: "underscore"; onClick: () => void; onHover: () => void; } label: 'underscore', ->label : string ->'underscore' : string +>label : "underscore" +>'underscore' : "underscore" onClick: function () { alert('clicked: ' + this.label); }, >onClick : () => void @@ -826,7 +826,7 @@ var buttonView = { >alert('clicked: ' + this.label) : void >alert : (x: string) => void >'clicked: ' + this.label : string ->'clicked: ' : string +>'clicked: ' : "clicked: " >this.label : any >this : any >label : any @@ -837,7 +837,7 @@ var buttonView = { >alert('hovering: ' + this.label) : void >alert : (x: string) => void >'hovering: ' + this.label : string ->'hovering: ' : string +>'hovering: ' : "hovering: " >this.label : any >this : any >label : any @@ -855,9 +855,9 @@ $('#underscore_button').bind('click', buttonView.onClick); >$('#underscore_button').bind : any >$('#underscore_button') : any >$ : any ->'#underscore_button' : string +>'#underscore_button' : "#underscore_button" >bind : any ->'click' : string +>'click' : "click" >buttonView.onClick : () => void >buttonView : { label: string; onClick: () => void; onHover: () => void; } >onClick : () => void @@ -909,7 +909,7 @@ _.delay(log, 1000, 'logged later'); >delay : (func: Function, wait: number, ...args: any[]) => number >log : (message?: string, ...rest: string[]) => void >1000 : number ->'logged later' : string +>'logged later' : "logged later" _.defer(function () { alert('deferred'); }); >_.defer(function () { alert('deferred'); }) : number @@ -919,14 +919,14 @@ _.defer(function () { alert('deferred'); }); >function () { alert('deferred'); } : () => void >alert('deferred') : void >alert : (x: string) => void ->'deferred' : string +>'deferred' : "deferred" var updatePosition = () => alert('updating position...'); >updatePosition : () => void >() => alert('updating position...') : () => void >alert('updating position...') : void >alert : (x: string) => void ->'updating position...' : string +>'updating position...' : "updating position..." var throttled = _.throttle(updatePosition, 100); >throttled : () => void @@ -951,7 +951,7 @@ var calculateLayout = () => alert('calculating layout...'); >() => alert('calculating layout...') : () => void >alert('calculating layout...') : void >alert : (x: string) => void ->'calculating layout...' : string +>'calculating layout...' : "calculating layout..." var lazyLayout = _.debounce(calculateLayout, 300); >lazyLayout : () => void @@ -976,7 +976,7 @@ var createApplication = () => alert('creating application...'); >() => alert('creating application...') : () => void >alert('creating application...') : void >alert : (x: string) => void ->'creating application...' : string +>'creating application...' : "creating application..." var initialize = _.once(createApplication); >initialize : () => void @@ -1002,7 +1002,7 @@ var render = () => alert("rendering..."); >() => alert("rendering...") : () => void >alert("rendering...") : void >alert : (x: string) => void ->"rendering..." : string +>"rendering..." : "rendering..." var renderNotes = _.after(notes.length, render); >renderNotes : () => void @@ -1036,7 +1036,7 @@ var hello = function (name) { return "hello: " + name; }; >function (name) { return "hello: " + name; } : (name: any) => string >name : any >"hello: " + name : string ->"hello: " : string +>"hello: " : "hello: " >name : any hello = _.wrap(hello, (func, arg) => { return "before, " + func(arg) + ", after"; }); @@ -1052,23 +1052,23 @@ hello = _.wrap(hello, (func, arg) => { return "before, " + func(arg) + ", after" >arg : any >"before, " + func(arg) + ", after" : string >"before, " + func(arg) : string ->"before, " : string +>"before, " : "before, " >func(arg) : string >func : (name: any) => string >arg : any ->", after" : string +>", after" : ", after" hello("moe"); >hello("moe") : string >hello : (name: any) => string ->"moe" : string +>"moe" : "moe" var greet = function (name) { return "hi: " + name; }; >greet : (name: any) => string >function (name) { return "hi: " + name; } : (name: any) => string >name : any >"hi: " + name : string ->"hi: " : string +>"hi: " : "hi: " >name : any var exclaim = function (statement) { return statement + "!"; }; @@ -1077,7 +1077,7 @@ var exclaim = function (statement) { return statement + "!"; }; >statement : any >statement + "!" : string >statement : any ->"!" : string +>"!" : "!" var welcome = _.compose(exclaim, greet); >welcome : Function @@ -1091,7 +1091,7 @@ var welcome = _.compose(exclaim, greet); welcome('moe'); >welcome('moe') : any >welcome : Function ->'moe' : string +>'moe' : "moe" /////////////////////////////////////////////////////////////////////////////////////// @@ -1139,13 +1139,13 @@ _.invert({ Moe: "Moses", Larry: "Louis", Curly: "Jerome" }); >_.invert : (object: any) => any >_ : Underscore.Static >invert : (object: any) => any ->{ Moe: "Moses", Larry: "Louis", Curly: "Jerome" } : { Moe: string; Larry: string; Curly: string; } ->Moe : string ->"Moses" : string ->Larry : string ->"Louis" : string ->Curly : string ->"Jerome" : string +>{ Moe: "Moses", Larry: "Louis", Curly: "Jerome" } : { Moe: "Moses"; Larry: "Louis"; Curly: "Jerome"; } +>Moe : "Moses" +>"Moses" : "Moses" +>Larry : "Louis" +>"Louis" : "Louis" +>Curly : "Jerome" +>"Jerome" : "Jerome" _.functions(_); >_.functions(_) : string[] @@ -1159,9 +1159,9 @@ _.extend({ name: 'moe' }, { age: 50 }); >_.extend : (destination: T, ...sources: any[]) => T >_ : Underscore.Static >extend : (destination: T, ...sources: any[]) => T ->{ name: 'moe' } : { name: string; } ->name : string ->'moe' : string +>{ name: 'moe' } : { name: "moe"; } +>name : "moe" +>'moe' : "moe" >{ age: 50 } : { age: number; } >age : number >50 : number @@ -1171,35 +1171,35 @@ _.pick({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); >_.pick : (object: T, ...keys: string[]) => T >_ : Underscore.Static >pick : (object: T, ...keys: string[]) => T ->{ name: 'moe', age: 50, userid: 'moe1' } : { name: string; age: number; userid: string; } ->name : string ->'moe' : string +>{ name: 'moe', age: 50, userid: 'moe1' } : { name: "moe"; age: number; userid: "moe1"; } +>name : "moe" +>'moe' : "moe" >age : number >50 : number ->userid : string ->'moe1' : string ->'name' : string ->'age' : string +>userid : "moe1" +>'moe1' : "moe1" +>'name' : "name" +>'age' : "age" _.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid'); >_.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid') : { name: string; age: number; userid: string; } >_.omit : (object: T, ...keys: string[]) => T >_ : Underscore.Static >omit : (object: T, ...keys: string[]) => T ->{ name: 'moe', age: 50, userid: 'moe1' } : { name: string; age: number; userid: string; } ->name : string ->'moe' : string +>{ name: 'moe', age: 50, userid: 'moe1' } : { name: "moe"; age: number; userid: "moe1"; } +>name : "moe" +>'moe' : "moe" >age : number >50 : number ->userid : string ->'moe1' : string ->'userid' : string +>userid : "moe1" +>'moe1' : "moe1" +>'userid' : "userid" var iceCream = { flavor: "chocolate" }; >iceCream : { flavor: string; } ->{ flavor: "chocolate" } : { flavor: string; } ->flavor : string ->"chocolate" : string +>{ flavor: "chocolate" } : { flavor: "chocolate"; } +>flavor : "chocolate" +>"chocolate" : "chocolate" _.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); >_.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }) : { flavor: string; } @@ -1207,20 +1207,20 @@ _.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); >_ : Underscore.Static >defaults : (object: T, ...defaults: any[]) => T >iceCream : { flavor: string; } ->{ flavor: "vanilla", sprinkles: "lots" } : { flavor: string; sprinkles: string; } ->flavor : string ->"vanilla" : string ->sprinkles : string ->"lots" : string +>{ flavor: "vanilla", sprinkles: "lots" } : { flavor: "vanilla"; sprinkles: "lots"; } +>flavor : "vanilla" +>"vanilla" : "vanilla" +>sprinkles : "lots" +>"lots" : "lots" _.clone({ name: 'moe' }); >_.clone({ name: 'moe' }) : { name: string; } >_.clone : (object: T) => T >_ : Underscore.Static >clone : (object: T) => T ->{ name: 'moe' } : { name: string; } ->name : string ->'moe' : string +>{ name: 'moe' } : { name: "moe"; } +>name : "moe" +>'moe' : "moe" _.chain([1, 2, 3, 200]) >_.chain([1, 2, 3, 200]) .filter(function (num) { return num % 2 == 0; }) .tap(alert) .map(function (num) { return num * num }) .value() : number[] @@ -1279,13 +1279,13 @@ _.has({ a: 1, b: 2, c: 3 }, "b"); >2 : number >c : number >3 : number ->"b" : string +>"b" : "b" var moe = { name: 'moe', luckyNumbers: [13, 27, 34] }; >moe : { name: string; luckyNumbers: number[]; } ->{ name: 'moe', luckyNumbers: [13, 27, 34] } : { name: string; luckyNumbers: number[]; } ->name : string ->'moe' : string +>{ name: 'moe', luckyNumbers: [13, 27, 34] } : { name: "moe"; luckyNumbers: number[]; } +>name : "moe" +>'moe' : "moe" >luckyNumbers : number[] >[13, 27, 34] : number[] >13 : number @@ -1294,9 +1294,9 @@ var moe = { name: 'moe', luckyNumbers: [13, 27, 34] }; var clone = { name: 'moe', luckyNumbers: [13, 27, 34] }; >clone : { name: string; luckyNumbers: number[]; } ->{ name: 'moe', luckyNumbers: [13, 27, 34] } : { name: string; luckyNumbers: number[]; } ->name : string ->'moe' : string +>{ name: 'moe', luckyNumbers: [13, 27, 34] } : { name: "moe"; luckyNumbers: number[]; } +>name : "moe" +>'moe' : "moe" >luckyNumbers : number[] >[13, 27, 34] : number[] >13 : number @@ -1341,7 +1341,7 @@ _.isElement($('body')[0]); >$('body')[0] : any >$('body') : any >$ : any ->'body' : string +>'body' : "body" >0 : number (function () { return _.isArray(arguments); })(); @@ -1402,7 +1402,7 @@ _.isString("moe"); >_.isString : (object: any) => boolean >_ : Underscore.Static >isString : (object: any) => boolean ->"moe" : string +>"moe" : "moe" _.isNumber(8.4 * 5); >_.isNumber(8.4 * 5) : boolean @@ -1506,9 +1506,9 @@ var underscore = _.noConflict(); var moe2 = { name: 'moe' }; >moe2 : { name: string; } ->{ name: 'moe' } : { name: string; } ->name : string ->'moe' : string +>{ name: 'moe' } : { name: "moe"; } +>name : "moe" +>'moe' : "moe" moe2 === _.identity(moe); >moe2 === _.identity(moe) : boolean @@ -1583,7 +1583,7 @@ _.mixin({ >_("fabio") : any >_("fabio") : Underscore.WrappedObject >_ : Underscore.Static ->"fabio" : string +>"fabio" : "fabio" >capitalize : any _.uniqueId('contact_'); @@ -1591,23 +1591,23 @@ _.uniqueId('contact_'); >_.uniqueId : { (): number; (prefix: string): string; } >_ : Underscore.Static >uniqueId : { (): number; (prefix: string): string; } ->'contact_' : string +>'contact_' : "contact_" _.escape('Curly, Larry & Moe'); >_.escape('Curly, Larry & Moe') : string >_.escape : (s: string) => string >_ : Underscore.Static >escape : (s: string) => string ->'Curly, Larry & Moe' : string +>'Curly, Larry & Moe' : "Curly, Larry & Moe" var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; >object : { cheese: string; stuff: () => string; } ->{ cheese: 'crumpets', stuff: function () { return 'nonsense'; } } : { cheese: string; stuff: () => string; } ->cheese : string ->'crumpets' : string +>{ cheese: 'crumpets', stuff: function () { return 'nonsense'; } } : { cheese: "crumpets"; stuff: () => string; } +>cheese : "crumpets" +>'crumpets' : "crumpets" >stuff : () => string >function () { return 'nonsense'; } : () => string ->'nonsense' : string +>'nonsense' : "nonsense" _.result(object, 'cheese'); >_.result(object, 'cheese') : any @@ -1615,7 +1615,7 @@ _.result(object, 'cheese'); >_ : Underscore.Static >result : (object: any, property: string) => any >object : { cheese: string; stuff: () => string; } ->'cheese' : string +>'cheese' : "cheese" _.result(object, 'stuff'); >_.result(object, 'stuff') : any @@ -1623,7 +1623,7 @@ _.result(object, 'stuff'); >_ : Underscore.Static >result : (object: any, property: string) => any >object : { cheese: string; stuff: () => string; } ->'stuff' : string +>'stuff' : "stuff" var compiled = _.template("hello: <%= name %>"); >compiled : (data: any) => string @@ -1631,18 +1631,18 @@ var compiled = _.template("hello: <%= name %>"); >_.template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; } >_ : Underscore.Static >template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; } ->"hello: <%= name %>" : string +>"hello: <%= name %>" : "hello: <%= name %>" compiled({ name: 'moe' }); >compiled({ name: 'moe' }) : string >compiled : (data: any) => string ->{ name: 'moe' } : { name: string; } ->name : string ->'moe' : string +>{ name: 'moe' } : { name: "moe"; } +>name : "moe" +>'moe' : "moe" var list2 = "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>"; >list2 : string ->"<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>" : string +>"<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>" : "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>" _.template(list2, { people: ['moe', 'curly', 'larry'] }); >_.template(list2, { people: ['moe', 'curly', 'larry'] }) : string @@ -1650,12 +1650,12 @@ _.template(list2, { people: ['moe', 'curly', 'larry'] }); >_ : Underscore.Static >template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; } >list2 : string ->{ people: ['moe', 'curly', 'larry'] } : { people: string[]; } ->people : string[] ->['moe', 'curly', 'larry'] : string[] ->'moe' : string ->'curly' : string ->'larry' : string +>{ people: ['moe', 'curly', 'larry'] } : { people: ("moe" | "curly" | "larry")[]; } +>people : ("moe" | "curly" | "larry")[] +>['moe', 'curly', 'larry'] : ("moe" | "curly" | "larry")[] +>'moe' : "moe" +>'curly' : "curly" +>'larry' : "larry" var template = _.template("<%- value %>"); >template : (data: any) => string @@ -1663,14 +1663,14 @@ var template = _.template("<%- value %>"); >_.template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; } >_ : Underscore.Static >template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; } ->"<%- value %>" : string +>"<%- value %>" : "<%- value %>" template({ value: '