From 4521d76fae1b25f73890cd12a0274014e1f6ce7e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2021 14:48:11 -0800 Subject: [PATCH 1/2] Revert changes for template literal types, keeping tests. --- src/compiler/checker.ts | 63 ++++++++++++++++++----------------------- src/compiler/types.ts | 10 +------ 2 files changed, 29 insertions(+), 44 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b47410d33f93a..95947eb6abab8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13364,7 +13364,7 @@ namespace ts { i--; const t = types[i]; const remove = - t.flags & TypeFlags.StringLikeLiteral && includes & TypeFlags.String || + t.flags & TypeFlags.StringLiteral && includes & TypeFlags.String || t.flags & TypeFlags.NumberLiteral && includes & TypeFlags.Number || t.flags & TypeFlags.BigIntLiteral && includes & TypeFlags.BigInt || t.flags & TypeFlags.UniqueESSymbol && includes & TypeFlags.ESSymbol || @@ -13435,7 +13435,7 @@ namespace ts { } switch (unionReduction) { case UnionReduction.Literal: - if (includes & (TypeFlags.FreshableLiteral | TypeFlags.UniqueESSymbol)) { + if (includes & (TypeFlags.Literal | TypeFlags.UniqueESSymbol)) { removeRedundantLiteralTypes(typeSet, includes); } if (includes & TypeFlags.StringLiteral && includes & TypeFlags.TemplateLiteral) { @@ -14034,7 +14034,6 @@ namespace ts { let type = templateLiteralTypes.get(id); if (!type) { templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes)); - type.regularType = type; } return type; @@ -15091,28 +15090,26 @@ namespace ts { } function getFreshTypeOfLiteralType(type: Type): Type { - if (type.flags & TypeFlags.FreshableLiteral) { - if (!(type).freshType) { - const freshType = type.flags & TypeFlags.TemplateLiteral ? - createTemplateLiteralType((type).texts, (type).types) : - createLiteralType(type.flags, (type).value, (type).symbol); - freshType.regularType = type; + if (type.flags & TypeFlags.Literal) { + if (!(type).freshType) { + const freshType = createLiteralType(type.flags, (type).value, (type).symbol); + freshType.regularType = type; freshType.freshType = freshType; - (type).freshType = freshType; + (type).freshType = freshType; } - return (type).freshType; + return (type).freshType; } return type; } function getRegularTypeOfLiteralType(type: Type): Type { - return type.flags & TypeFlags.FreshableLiteral ? (type).regularType : + return type.flags & TypeFlags.Literal ? (type).regularType : type.flags & TypeFlags.Union ? ((type).regularType || ((type).regularType = mapType(type, getRegularTypeOfLiteralType) as UnionType)) : type; } function isFreshLiteralType(type: Type) { - return !!(type.flags & TypeFlags.FreshableLiteral) && (type).freshType === type; + return !!(type.flags & TypeFlags.Literal) && (type).freshType === type; } function getLiteralType(value: string): StringLiteralType; @@ -18023,20 +18020,17 @@ namespace ts { } } else if (source.flags & TypeFlags.TemplateLiteral) { - if (target.flags & TypeFlags.TemplateLiteral) { - if ((source as TemplateLiteralType).texts.length === (target as TemplateLiteralType).texts.length && - (source as TemplateLiteralType).types.length === (target as TemplateLiteralType).types.length && - every((source as TemplateLiteralType).texts, (t, i) => t === (target as TemplateLiteralType).texts[i]) && - every((instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers)) as TemplateLiteralType).types, (t, i) => !!((target as TemplateLiteralType).types[i].flags & (TypeFlags.Any | TypeFlags.String)) || !!isRelatedTo(t, (target as TemplateLiteralType).types[i], /*reportErrors*/ false))) { - return Ternary.True; - } + if (target.flags & TypeFlags.TemplateLiteral && + (source as TemplateLiteralType).texts.length === (target as TemplateLiteralType).texts.length && + (source as TemplateLiteralType).types.length === (target as TemplateLiteralType).types.length && + every((source as TemplateLiteralType).texts, (t, i) => t === (target as TemplateLiteralType).texts[i]) && + every((instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers)) as TemplateLiteralType).types, (t, i) => !!((target as TemplateLiteralType).types[i].flags & (TypeFlags.Any | TypeFlags.String)) || !!isRelatedTo(t, (target as TemplateLiteralType).types[i], /*reportErrors*/ false))) { + return Ternary.True; } - else { - const constraint = getBaseConstraintOfType(source); - if (result = isRelatedTo(constraint && constraint !== source ? constraint : stringType, target, reportErrors)) { - resetErrorInfo(saveErrorInfo); - return result; - } + const constraint = getBaseConstraintOfType(source); + if (constraint && constraint !== source && (result = isRelatedTo(constraint, target, reportErrors))) { + resetErrorInfo(saveErrorInfo); + return result; } } else if (source.flags & TypeFlags.StringMapping) { @@ -19531,7 +19525,7 @@ namespace ts { function getBaseTypeOfLiteralType(type: Type): Type { return type.flags & TypeFlags.EnumLiteral ? getBaseTypeOfEnumLiteralType(type) : - type.flags & TypeFlags.StringLikeLiteral ? stringType : + type.flags & TypeFlags.StringLiteral ? stringType : type.flags & TypeFlags.NumberLiteral ? numberType : type.flags & TypeFlags.BigIntLiteral ? bigintType : type.flags & TypeFlags.BooleanLiteral ? booleanType : @@ -19541,7 +19535,7 @@ namespace ts { function getWidenedLiteralType(type: Type): Type { return type.flags & TypeFlags.EnumLiteral && isFreshLiteralType(type) ? getBaseTypeOfEnumLiteralType(type) : - type.flags & TypeFlags.StringLikeLiteral && isFreshLiteralType(type) ? stringType : + type.flags & TypeFlags.StringLiteral && isFreshLiteralType(type) ? stringType : type.flags & TypeFlags.NumberLiteral && isFreshLiteralType(type) ? numberType : type.flags & TypeFlags.BigIntLiteral && isFreshLiteralType(type) ? bigintType : type.flags & TypeFlags.BooleanLiteral && isFreshLiteralType(type) ? booleanType : @@ -21035,7 +21029,7 @@ namespace ts { } function isTypeOrBaseIdenticalTo(s: Type, t: Type) { - return isTypeIdenticalTo(s, t) || !!(t.flags & TypeFlags.String && s.flags & TypeFlags.StringLikeLiteral || t.flags & TypeFlags.Number && s.flags & TypeFlags.NumberLiteral); + return isTypeIdenticalTo(s, t) || !!(t.flags & TypeFlags.String && s.flags & TypeFlags.StringLiteral || t.flags & TypeFlags.Number && s.flags & TypeFlags.NumberLiteral); } function isTypeCloselyMatchedBy(s: Type, t: Type) { @@ -31293,7 +31287,7 @@ namespace ts { texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return getFreshTypeOfLiteralType(getTemplateLiteralType(texts, types)); + return isConstContext(node) ? getTemplateLiteralType(texts, types) : stringType; } function getContextNode(node: Expression): Node { @@ -31314,7 +31308,7 @@ namespace ts { // We strip literal freshness when an appropriate contextual type is present such that contextually typed // literals always preserve their literal types (otherwise they might widen during type inference). An alternative // here would be to not mark contextually typed literals as fresh in the first place. - const result = maybeTypeOfKind(type, TypeFlags.FreshableLiteral) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + const result = maybeTypeOfKind(type, TypeFlags.Literal) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? getRegularTypeOfLiteralType(type) : type; return result; } @@ -31404,7 +31398,7 @@ namespace ts { // this a literal context for literals of that primitive type. For example, given a // type parameter 'T extends string', infer string literal types for T. const constraint = getBaseConstraintOfType(contextualType) || unknownType; - return maybeTypeOfKind(constraint, TypeFlags.String) && maybeTypeOfKind(candidateType, TypeFlags.StringLikeLiteral) || + return maybeTypeOfKind(constraint, TypeFlags.String) && maybeTypeOfKind(candidateType, TypeFlags.StringLiteral) || maybeTypeOfKind(constraint, TypeFlags.Number) && maybeTypeOfKind(candidateType, TypeFlags.NumberLiteral) || maybeTypeOfKind(constraint, TypeFlags.BigInt) && maybeTypeOfKind(candidateType, TypeFlags.BigIntLiteral) || maybeTypeOfKind(constraint, TypeFlags.ESSymbol) && maybeTypeOfKind(candidateType, TypeFlags.UniqueESSymbol) || @@ -31412,7 +31406,7 @@ namespace ts { } // If the contextual type is a literal of a particular primitive type, we consider this a // literal context for all literals of that primitive type. - return !!(contextualType.flags & (TypeFlags.StringLikeLiteral | TypeFlags.Index | TypeFlags.StringMapping) && maybeTypeOfKind(candidateType, TypeFlags.StringLikeLiteral) || + return !!(contextualType.flags & (TypeFlags.StringLiteral | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) && maybeTypeOfKind(candidateType, TypeFlags.StringLiteral) || contextualType.flags & TypeFlags.NumberLiteral && maybeTypeOfKind(candidateType, TypeFlags.NumberLiteral) || contextualType.flags & TypeFlags.BigIntLiteral && maybeTypeOfKind(candidateType, TypeFlags.BigIntLiteral) || contextualType.flags & TypeFlags.BooleanLiteral && maybeTypeOfKind(candidateType, TypeFlags.BooleanLiteral) || @@ -38956,8 +38950,7 @@ namespace ts { function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { - const type = getTypeOfSymbol(getSymbolOfNode(node)); - return !!(type.flags & TypeFlags.Literal) && isFreshLiteralType(type); + return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } return false; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4352e2f2171e3..3585ff50a8f3b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4972,10 +4972,6 @@ namespace ts { Unit = Literal | UniqueESSymbol | Nullable, StringOrNumberLiteral = StringLiteral | NumberLiteral, /* @internal */ - StringLikeLiteral = StringLiteral | TemplateLiteral, - /* @internal */ - FreshableLiteral = Literal | TemplateLiteral, - /* @internal */ StringOrNumberLiteralOrUnique = StringLiteral | NumberLiteral | UniqueESSymbol, /* @internal */ DefinitelyFalsy = StringLiteral | NumberLiteral | BigIntLiteral | BooleanLiteral | Void | Undefined | Null, @@ -5069,9 +5065,7 @@ namespace ts { } /* @internal */ - export type FreshableLiteralType = LiteralType | TemplateLiteralType; - /* @internal */ - export type FreshableType = FreshableLiteralType | FreshableIntrinsicType; + export type FreshableType = LiteralType | FreshableIntrinsicType; // String literal types (TypeFlags.StringLiteral) // Numeric literal types (TypeFlags.NumberLiteral) @@ -5475,8 +5469,6 @@ namespace ts { export interface TemplateLiteralType extends InstantiableType { texts: readonly string[]; // Always one element longer than types types: readonly Type[]; // Always at least one element - freshType: TemplateLiteralType; // Fresh version of type - regularType: TemplateLiteralType; // Regular version of type } export interface StringMappingType extends InstantiableType { From 2854cba55d66249dc61345c170a212f4b398b76b Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 1 Feb 2021 23:00:09 +0000 Subject: [PATCH 2/2] Update Baselines and/or Applied Lint Fixes --- .../reference/TemplateExpression1.types | 2 +- .../accessorsOverrideProperty2.types | 2 +- .../reference/api/tsserverlibrary.d.ts | 2 - tests/baselines/reference/api/typescript.d.ts | 2 - tests/baselines/reference/asOperator3.types | 12 +- .../checkJsObjectLiteralIndexSignatures.types | 2 +- .../computedPropertyNames10_ES5.types | 2 +- .../computedPropertyNames10_ES6.types | 2 +- .../computedPropertyNames11_ES5.types | 2 +- .../computedPropertyNames11_ES6.types | 2 +- .../computedPropertyNames12_ES5.types | 2 +- .../computedPropertyNames12_ES6.types | 2 +- .../computedPropertyNames13_ES5.types | 2 +- .../computedPropertyNames13_ES6.types | 2 +- .../computedPropertyNames16_ES5.types | 2 +- .../computedPropertyNames16_ES6.types | 2 +- .../computedPropertyNames4_ES5.types | 2 +- .../computedPropertyNames4_ES6.types | 2 +- .../declFileEmitDeclarationOnly.types | 2 +- .../declarationNoDanglingGenerics.types | 2 +- ...InitializerContextualTypeFromContext.types | 4 +- .../destructuringParameterProperties4.types | 4 +- ...onentiationOperatorInTempalteString4.types | 34 ++-- ...ntiationOperatorInTempalteString4ES6.types | 34 ++-- ...onentiationOperatorInTemplateString1.types | 36 ++-- ...ntiationOperatorInTemplateString1ES6.types | 36 ++-- ...onentiationOperatorInTemplateString2.types | 38 ++-- ...ntiationOperatorInTemplateString2ES6.types | 38 ++-- ...onentiationOperatorInTemplateString3.types | 38 ++-- ...ntiationOperatorInTemplateString3ES6.types | 38 ++-- ...umConstantMemberWithTemplateLiterals.types | 2 +- .../esModuleInteropImportTSLibHasImport.types | 4 +- ...atorInTemplateStringWithSyntaxError1.types | 36 ++-- ...atorInTemplateStringWithSyntaxError2.types | 36 ++-- ...atorInTemplateStringWithSyntaxError3.types | 36 ++-- ...ionOperatorWithTemplateStringInvalid.types | 24 +-- ...OperatorWithTemplateStringInvalidES6.types | 24 +-- ...importCallExpressionDeclarationEmit1.types | 2 +- ...portCallExpressionReturnPromiseOfAny.types | 10 +- ...mportCallExpressionShouldNotGetParen.types | 2 +- .../reference/inferenceErasedSignatures.types | 2 +- ...mplateEscapeSequences(target=es2015).types | 36 ++-- ...dTemplateEscapeSequences(target=es5).types | 36 ++-- ...mplateEscapeSequences(target=esnext).types | 36 ++-- .../jsDeclarationsExportedClassAliases.types | 2 +- .../jsdocTypeFromChainedAssignment2.types | 30 +-- .../reference/noImplicitSymbolToString.types | 8 +- .../parenthesizedContexualTyping3.types | 16 +- .../privateNameFieldCallExpression.types | 4 +- .../propertyOverridesAccessors2.types | 2 +- .../reference/recursiveTypeReferences1.types | 2 +- ...teralTypesWithTemplateStrings02.errors.txt | 7 +- ...ingLiteralTypesWithTemplateStrings02.types | 2 +- .../reference/taggedTemplateChain.types | 2 +- .../taggedTemplateContextualTyping1.types | 8 +- .../taggedTemplateContextualTyping2.types | 6 +- ...gedTemplateStringsHexadecimalEscapes.types | 2 +- ...TemplateStringsHexadecimalEscapesES6.types | 2 +- ...ainCharactersThatArePartsOfEscapes02.types | 2 +- ...haractersThatArePartsOfEscapes02_ES6.types | 2 +- ...TemplateStringsTypeArgumentInference.types | 22 +- ...plateStringsTypeArgumentInferenceES6.types | 22 +- ...edTemplateStringsWithCurriedFunction.types | 2 +- ...lateStringsWithIncompatibleTypedTags.types | 18 +- ...eStringsWithIncompatibleTypedTagsES6.types | 18 +- ...ingsWithManyCallAndMemberExpressions.types | 2 +- ...sWithManyCallAndMemberExpressionsES6.types | 2 +- ...mplateStringsWithOverloadResolution1.types | 10 +- ...teStringsWithOverloadResolution1_ES6.types | 10 +- ...mplateStringsWithOverloadResolution2.types | 4 +- ...teStringsWithOverloadResolution2_ES6.types | 4 +- ...mplateStringsWithOverloadResolution3.types | 36 ++-- ...teStringsWithOverloadResolution3_ES6.types | 36 ++-- ...edTemplateStringsWithTagNamedDeclare.types | 2 +- ...emplateStringsWithTagNamedDeclareES6.types | 2 +- ...gedTemplateStringsWithTagsTypedAsAny.types | 16 +- ...TemplateStringsWithTagsTypedAsAnyES6.types | 16 +- .../taggedTemplateStringsWithTypedTags.types | 14 +- ...aggedTemplateStringsWithTypedTagsES6.types | 14 +- ...gedTemplateStringsWithUnicodeEscapes.types | 2 +- ...TemplateStringsWithUnicodeEscapesES6.types | 2 +- ...esWithIncompleteTemplateExpressions1.types | 2 +- ...esWithIncompleteTemplateExpressions2.types | 2 +- ...esWithIncompleteTemplateExpressions3.types | 2 +- ...esWithIncompleteTemplateExpressions4.types | 2 +- ...esWithIncompleteTemplateExpressions5.types | 2 +- ...esWithIncompleteTemplateExpressions6.types | 2 +- .../taggedTemplatesWithTypeArguments1.types | 18 +- .../taggedTemplatesWithTypeArguments2.types | 8 +- .../reference/templateLiteralTypes1.types | 2 +- .../templateLiteralTypes2.errors.txt | 144 +++++++++++++ .../reference/templateLiteralTypes2.js | 8 +- .../reference/templateLiteralTypes2.types | 140 ++++++------- .../templateStringBinaryOperations.types | 96 ++++----- .../templateStringBinaryOperationsES6.types | 96 ++++----- ...lateStringBinaryOperationsES6Invalid.types | 192 +++++++++--------- ...emplateStringBinaryOperationsInvalid.types | 192 +++++++++--------- .../reference/templateStringInArray.types | 2 +- .../templateStringInArrowFunction.types | 6 +- .../templateStringInArrowFunctionES6.types | 6 +- .../templateStringInCallExpression.types | 6 +- .../templateStringInCallExpressionES6.types | 6 +- .../templateStringInConditional.types | 8 +- .../templateStringInConditionalES6.types | 8 +- .../templateStringInDeleteExpression.types | 2 +- .../templateStringInDeleteExpressionES6.types | 2 +- .../reference/templateStringInDivision.types | 2 +- .../templateStringInEqualityChecks.errors.txt | 13 -- .../templateStringInEqualityChecks.types | 8 +- ...mplateStringInEqualityChecksES6.errors.txt | 13 -- .../templateStringInEqualityChecksES6.types | 8 +- .../templateStringInFunctionExpression.types | 4 +- ...emplateStringInFunctionExpressionES6.types | 4 +- .../templateStringInInOperator.types | 2 +- .../templateStringInInOperatorES6.types | 2 +- .../templateStringInIndexExpression.types | 2 +- .../templateStringInIndexExpressionES6.types | 2 +- .../templateStringInInstanceOf.types | 2 +- .../templateStringInInstanceOfES6.types | 2 +- .../templateStringInModuleName.types | 2 +- .../templateStringInModuleNameES6.types | 2 +- .../reference/templateStringInModulo.types | 2 +- .../reference/templateStringInModuloES6.types | 2 +- .../templateStringInMultiplication.types | 2 +- .../templateStringInMultiplicationES6.types | 2 +- .../templateStringInNewExpression.types | 6 +- .../templateStringInNewExpressionES6.types | 6 +- .../templateStringInNewOperator.types | 2 +- .../templateStringInNewOperatorES6.types | 2 +- .../templateStringInObjectLiteral.types | 2 +- .../templateStringInObjectLiteralES6.types | 2 +- .../templateStringInParentheses.types | 4 +- .../templateStringInParenthesesES6.types | 4 +- .../templateStringInPropertyAssignment.types | 2 +- ...emplateStringInPropertyAssignmentES6.types | 2 +- .../templateStringInPropertyName2.types | 2 +- .../templateStringInPropertyNameES6_2.types | 2 +- .../templateStringInSwitchAndCase.errors.txt | 15 -- .../templateStringInSwitchAndCase.types | 6 +- ...emplateStringInSwitchAndCaseES6.errors.txt | 15 -- .../templateStringInSwitchAndCaseES6.types | 6 +- .../templateStringInTaggedTemplate.types | 6 +- .../templateStringInTaggedTemplateES6.types | 6 +- .../templateStringInTypeAssertion.types | 2 +- .../templateStringInTypeAssertionES6.types | 2 +- .../reference/templateStringInTypeOf.types | 2 +- .../reference/templateStringInTypeOfES6.types | 2 +- .../reference/templateStringInUnaryPlus.types | 2 +- .../templateStringInUnaryPlusES6.types | 2 +- .../reference/templateStringInWhile.types | 4 +- .../reference/templateStringInWhileES6.types | 4 +- .../templateStringInYieldKeyword.types | 4 +- ...ainCharactersThatArePartsOfEscapes02.types | 2 +- ...haractersThatArePartsOfEscapes02_ES6.types | 2 +- .../templateStringWithEmbeddedAddition.types | 2 +- ...emplateStringWithEmbeddedAdditionES6.types | 2 +- .../templateStringWithEmbeddedArray.types | 2 +- .../templateStringWithEmbeddedArrayES6.types | 2 +- ...plateStringWithEmbeddedArrowFunction.types | 2 +- ...teStringWithEmbeddedArrowFunctionES6.types | 2 +- .../templateStringWithEmbeddedComments.types | 2 +- ...emplateStringWithEmbeddedCommentsES6.types | 2 +- ...emplateStringWithEmbeddedConditional.types | 4 +- ...lateStringWithEmbeddedConditionalES6.types | 4 +- .../templateStringWithEmbeddedDivision.types | 2 +- ...emplateStringWithEmbeddedDivisionES6.types | 2 +- ...StringWithEmbeddedFunctionExpression.types | 2 +- ...ingWithEmbeddedFunctionExpressionES6.types | 2 +- ...templateStringWithEmbeddedInOperator.types | 4 +- ...plateStringWithEmbeddedInOperatorES6.types | 4 +- ...templateStringWithEmbeddedInstanceOf.types | 4 +- ...plateStringWithEmbeddedInstanceOfES6.types | 4 +- .../templateStringWithEmbeddedModulo.types | 2 +- .../templateStringWithEmbeddedModuloES6.types | 2 +- ...lateStringWithEmbeddedMultiplication.types | 2 +- ...eStringWithEmbeddedMultiplicationES6.types | 2 +- ...emplateStringWithEmbeddedNewOperator.types | 2 +- ...lateStringWithEmbeddedNewOperatorES6.types | 2 +- ...plateStringWithEmbeddedObjectLiteral.types | 2 +- ...teStringWithEmbeddedObjectLiteralES6.types | 2 +- ...lateStringWithEmbeddedTemplateString.types | 6 +- ...eStringWithEmbeddedTemplateStringES6.types | 6 +- ...gWithEmbeddedTypeAssertionOnAddition.types | 2 +- ...thEmbeddedTypeAssertionOnAdditionES6.types | 2 +- ...lateStringWithEmbeddedTypeOfOperator.types | 4 +- ...eStringWithEmbeddedTypeOfOperatorES6.types | 4 +- .../templateStringWithEmbeddedUnaryPlus.types | 2 +- ...mplateStringWithEmbeddedUnaryPlusES6.types | 2 +- ...mplateStringWithEmbeddedYieldKeyword.types | 2 +- ...ateStringWithEmbeddedYieldKeywordES6.types | 2 +- ...mplateStringWithEmptyLiteralPortions.types | 24 +-- ...ateStringWithEmptyLiteralPortionsES6.types | 24 +-- ...StringWithOpenCommentInStringPortion.types | 2 +- ...ingWithOpenCommentInStringPortionES6.types | 2 +- .../templateStringWithPropertyAccess.types | 2 +- .../templateStringWithPropertyAccessES6.types | 2 +- ...lateStringsArrayTypeDefinedInES5Mode.types | 2 +- ...ateStringsArrayTypeNotDefinedES5Mode.types | 2 +- ...teStringsArrayTypeRedefinedInES6Mode.types | 2 +- .../truthinessCallExpressionCoercion.types | 2 +- .../typeGuardIntersectionTypes.types | 4 +- ...codeExtendedEscapesInTemplates20_ES5.types | 2 +- ...codeExtendedEscapesInTemplates20_ES6.types | 2 +- 203 files changed, 1188 insertions(+), 1115 deletions(-) create mode 100644 tests/baselines/reference/templateLiteralTypes2.errors.txt delete mode 100644 tests/baselines/reference/templateStringInEqualityChecks.errors.txt delete mode 100644 tests/baselines/reference/templateStringInEqualityChecksES6.errors.txt delete mode 100644 tests/baselines/reference/templateStringInSwitchAndCase.errors.txt delete mode 100644 tests/baselines/reference/templateStringInSwitchAndCaseES6.errors.txt diff --git a/tests/baselines/reference/TemplateExpression1.types b/tests/baselines/reference/TemplateExpression1.types index a293dc672ee61..e23083d83ec5e 100644 --- a/tests/baselines/reference/TemplateExpression1.types +++ b/tests/baselines/reference/TemplateExpression1.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/TemplateExpression1.ts === var v = `foo ${ a >v : string ->`foo ${ a : `foo ${any}` +>`foo ${ a : string >a : any diff --git a/tests/baselines/reference/accessorsOverrideProperty2.types b/tests/baselines/reference/accessorsOverrideProperty2.types index 228dc06299b92..860b6f4f021cf 100644 --- a/tests/baselines/reference/accessorsOverrideProperty2.types +++ b/tests/baselines/reference/accessorsOverrideProperty2.types @@ -22,7 +22,7 @@ class Derived extends Base { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->`x was set to ${value}` : `x was set to ${number}` +>`x was set to ${value}` : string >value : number } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 70e326c4c998a..e822771067599 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2656,8 +2656,6 @@ declare namespace ts { export interface TemplateLiteralType extends InstantiableType { texts: readonly string[]; types: readonly Type[]; - freshType: TemplateLiteralType; - regularType: TemplateLiteralType; } export interface StringMappingType extends InstantiableType { symbol: Symbol; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 5c9fcf765b1f4..b8525b1806471 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2656,8 +2656,6 @@ declare namespace ts { export interface TemplateLiteralType extends InstantiableType { texts: readonly string[]; types: readonly Type[]; - freshType: TemplateLiteralType; - regularType: TemplateLiteralType; } export interface StringMappingType extends InstantiableType { symbol: Symbol; diff --git a/tests/baselines/reference/asOperator3.types b/tests/baselines/reference/asOperator3.types index 1e40a6e218d1a..e5e319d3caf3a 100644 --- a/tests/baselines/reference/asOperator3.types +++ b/tests/baselines/reference/asOperator3.types @@ -5,7 +5,7 @@ declare function tag(...x: any[]): any; var a = `${123 + 456 as number}`; >a : string ->`${123 + 456 as number}` : `${number}` +>`${123 + 456 as number}` : string >123 + 456 as number : number >123 + 456 : number >123 : 123 @@ -13,7 +13,7 @@ var a = `${123 + 456 as number}`; var b = `leading ${123 + 456 as number}`; >b : string ->`leading ${123 + 456 as number}` : `leading ${number}` +>`leading ${123 + 456 as number}` : string >123 + 456 as number : number >123 + 456 : number >123 : 123 @@ -21,7 +21,7 @@ var b = `leading ${123 + 456 as number}`; var c = `${123 + 456 as number} trailing`; >c : string ->`${123 + 456 as number} trailing` : `${number} trailing` +>`${123 + 456 as number} trailing` : string >123 + 456 as number : number >123 + 456 : number >123 : 123 @@ -30,7 +30,7 @@ var c = `${123 + 456 as number} trailing`; var d = `Hello ${123} World` as string; >d : string >`Hello ${123} World` as string : string ->`Hello ${123} World` : "Hello 123 World" +>`Hello ${123} World` : string >123 : 123 var e = `Hello` as string; @@ -43,7 +43,7 @@ var f = 1 + `${1} end of string` as string; >1 + `${1} end of string` as string : string >1 + `${1} end of string` : string >1 : 1 ->`${1} end of string` : "1 end of string" +>`${1} end of string` : string >1 : 1 var g = tag `Hello ${123} World` as string; @@ -51,7 +51,7 @@ var g = tag `Hello ${123} World` as string; >tag `Hello ${123} World` as string : string >tag `Hello ${123} World` : any >tag : (...x: any[]) => any ->`Hello ${123} World` : "Hello 123 World" +>`Hello ${123} World` : string >123 : 123 var h = tag `Hello` as string; diff --git a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types index 465cbf72e815f..21653432b5acb 100644 --- a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types +++ b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types @@ -10,7 +10,7 @@ let n = Math.random(); let s = `${n}`; >s : string ->`${n}` : `${number}` +>`${n}` : string >n : number const numericIndex = { [n]: 1 }; diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.types b/tests/baselines/reference/computedPropertyNames10_ES5.types index 7c89309b32e02..82d82bcc638fd 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.types +++ b/tests/baselines/reference/computedPropertyNames10_ES5.types @@ -60,6 +60,6 @@ var v = { [`hello ${a} bye`]() { } >[`hello ${a} bye`] : () => void ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any } diff --git a/tests/baselines/reference/computedPropertyNames10_ES6.types b/tests/baselines/reference/computedPropertyNames10_ES6.types index 355fc7c58208d..c9ad6eeebb6c4 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES6.types +++ b/tests/baselines/reference/computedPropertyNames10_ES6.types @@ -60,6 +60,6 @@ var v = { [`hello ${a} bye`]() { } >[`hello ${a} bye`] : () => void ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any } diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index b66b419310d83..944f4a4cfcc3b 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -70,7 +70,7 @@ var v = { get [`hello ${a} bye`]() { return 0; } >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index 40e0c98488eb1..1d9551ea082be 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -70,7 +70,7 @@ var v = { get [`hello ${a} bye`]() { return 0; } >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames12_ES5.types b/tests/baselines/reference/computedPropertyNames12_ES5.types index cc7d1a29755dd..63afc3bd4da0b 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES5.types +++ b/tests/baselines/reference/computedPropertyNames12_ES5.types @@ -63,7 +63,7 @@ class C { static [`hello ${a} bye`] = 0 >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames12_ES6.types b/tests/baselines/reference/computedPropertyNames12_ES6.types index d1da7d7aab9dd..f846d159eec08 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES6.types +++ b/tests/baselines/reference/computedPropertyNames12_ES6.types @@ -63,7 +63,7 @@ class C { static [`hello ${a} bye`] = 0 >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames13_ES5.types b/tests/baselines/reference/computedPropertyNames13_ES5.types index 33c89a82c94c6..07c5cee22cd0e 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES5.types +++ b/tests/baselines/reference/computedPropertyNames13_ES5.types @@ -59,6 +59,6 @@ class C { static [`hello ${a} bye`]() { } >[`hello ${a} bye`] : () => void ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any } diff --git a/tests/baselines/reference/computedPropertyNames13_ES6.types b/tests/baselines/reference/computedPropertyNames13_ES6.types index 57a4bb9b46548..8e0111d760022 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES6.types +++ b/tests/baselines/reference/computedPropertyNames13_ES6.types @@ -59,6 +59,6 @@ class C { static [`hello ${a} bye`]() { } >[`hello ${a} bye`] : () => void ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any } diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.types b/tests/baselines/reference/computedPropertyNames16_ES5.types index 468f77b322975..7e6d5054098ec 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.types +++ b/tests/baselines/reference/computedPropertyNames16_ES5.types @@ -69,7 +69,7 @@ class C { get [`hello ${a} bye`]() { return 0; } >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames16_ES6.types b/tests/baselines/reference/computedPropertyNames16_ES6.types index 558af27cea7bd..9898cbc00d4dc 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES6.types +++ b/tests/baselines/reference/computedPropertyNames16_ES6.types @@ -69,7 +69,7 @@ class C { get [`hello ${a} bye`]() { return 0; } >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames4_ES5.types b/tests/baselines/reference/computedPropertyNames4_ES5.types index ba6d3c6d9e828..b9181140ed56c 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES5.types +++ b/tests/baselines/reference/computedPropertyNames4_ES5.types @@ -70,7 +70,7 @@ var v = { [`hello ${a} bye`]: 0 >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/computedPropertyNames4_ES6.types b/tests/baselines/reference/computedPropertyNames4_ES6.types index a25ca0f7bc153..669af26ebdf12 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES6.types +++ b/tests/baselines/reference/computedPropertyNames4_ES6.types @@ -70,7 +70,7 @@ var v = { [`hello ${a} bye`]: 0 >[`hello ${a} bye`] : number ->`hello ${a} bye` : `hello ${any} bye` +>`hello ${a} bye` : string >a : any >0 : 0 } diff --git a/tests/baselines/reference/declFileEmitDeclarationOnly.types b/tests/baselines/reference/declFileEmitDeclarationOnly.types index f508a00cc71fa..9a3cf8cfc70b0 100644 --- a/tests/baselines/reference/declFileEmitDeclarationOnly.types +++ b/tests/baselines/reference/declFileEmitDeclarationOnly.types @@ -23,7 +23,7 @@ class HelloWorld { >Log.info : (msg: string) => void >Log : { info(msg: string): void; } >info : (msg: string) => void ->`Hello ${this.name}` : `Hello ${string}` +>`Hello ${this.name}` : string >this.name : string >this : this >name : string diff --git a/tests/baselines/reference/declarationNoDanglingGenerics.types b/tests/baselines/reference/declarationNoDanglingGenerics.types index 65c381a2e4673..9fd057e32f3d9 100644 --- a/tests/baselines/reference/declarationNoDanglingGenerics.types +++ b/tests/baselines/reference/declarationNoDanglingGenerics.types @@ -16,7 +16,7 @@ function register(kind: string): void | never { throw new Error(`Class with kind "${kind}" is already registered.`); >new Error(`Class with kind "${kind}" is already registered.`) : Error >Error : ErrorConstructor ->`Class with kind "${kind}" is already registered.` : `Class with kind "${string}" is already registered.` +>`Class with kind "${kind}" is already registered.` : string >kind : string } kindCache[kind] = true; diff --git a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.types b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.types index 551e2e99339a7..d0ddb4918a034 100644 --- a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.types +++ b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.types @@ -34,7 +34,7 @@ const Parent: SFC = ({ const Child: SFC = ({ >Child : SFC ->({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => `name: Apollo props: ${string}` | `name: Artemis props: ${string}` | `name: Dionysus props: ${string}` | `name: Persephone props: ${string}` +>({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => string children, >children : any @@ -47,7 +47,7 @@ const Child: SFC = ({ >props : {} }) => `name: ${name} props: ${JSON.stringify(props)}`; ->`name: ${name} props: ${JSON.stringify(props)}` : `name: Apollo props: ${string}` | `name: Artemis props: ${string}` | `name: Dionysus props: ${string}` | `name: Persephone props: ${string}` +>`name: ${name} props: ${JSON.stringify(props)}` : string >name : "Apollo" | "Artemis" | "Dionysus" | "Persephone" >JSON.stringify(props) : string >JSON.stringify : { (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string; (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string; } diff --git a/tests/baselines/reference/destructuringParameterProperties4.types b/tests/baselines/reference/destructuringParameterProperties4.types index 0f6e7d88ad59e..8f49dc9ba9110 100644 --- a/tests/baselines/reference/destructuringParameterProperties4.types +++ b/tests/baselines/reference/destructuringParameterProperties4.types @@ -75,10 +75,10 @@ class C2 extends C1 { >C1 : C1 public doSomethingWithSuperProperties() { ->doSomethingWithSuperProperties : () => `${any} ${any} ${any}` +>doSomethingWithSuperProperties : () => string return `${this.a} ${this.b} ${this.c}`; ->`${this.a} ${this.b} ${this.c}` : `${any} ${any} ${any}` +>`${this.a} ${this.b} ${this.c}` : string >this.a : any >this : this >a : any diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types index 0ed777f4e3c00..912a26f746ff7 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types @@ -12,14 +12,14 @@ var s; // With TemplateTail `${t1 ** -t2} world`; ->`${t1 ** -t2} world` : `${number} world` +>`${t1 ** -t2} world` : string >t1 ** -t2 : number >t1 : number >-t2 : number >t2 : number `${(-t1) ** t2 - t1} world`; ->`${(-t1) ** t2 - t1} world` : `${number} world` +>`${(-t1) ** t2 - t1} world` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -29,7 +29,7 @@ var s; >t1 : number `${(-++t1) ** t2 - t1} world`; ->`${(-++t1) ** t2 - t1} world` : `${number} world` +>`${(-++t1) ** t2 - t1} world` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -40,7 +40,7 @@ var s; >t1 : number `${(-t1++) ** t2 - t1} world`; ->`${(-t1++) ** t2 - t1} world` : `${number} world` +>`${(-t1++) ** t2 - t1} world` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -51,7 +51,7 @@ var s; >t1 : number `${(~t1) ** t2 ** --t1 } world`; ->`${(~t1) ** t2 ** --t1 } world` : `${number} world` +>`${(~t1) ** t2 ** --t1 } world` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) } world` : "string world" | "number world" | "bigint world" | "boolean world" | "symbol world" | "undefined world" | "object world" | "function world" +>`${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -73,7 +73,7 @@ var s; // TempateHead & TemplateTail are empt `${t1 ** -t2} hello world ${t1 ** -t2}`; ->`${t1 ** -t2} hello world ${t1 ** -t2}` : `${number} hello world ${number}` +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string >t1 ** -t2 : number >t1 : number >-t2 : number @@ -84,7 +84,7 @@ var s; >t2 : number `${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; ->`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : `${number} hello world ${number}` +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -101,7 +101,7 @@ var s; >t1 : number `${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; ->`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : `${number} hello world ${number}` +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -121,7 +121,7 @@ var s; >t1 : number `${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; ->`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : `${number} hello world ${number}` +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -141,7 +141,7 @@ var s; >t1 : number `${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; ->`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : `${number} hello world ${number}` +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -160,7 +160,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; ->`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : "string hello world string" | "string hello world number" | "string hello world bigint" | "string hello world boolean" | "string hello world symbol" | "string hello world undefined" | "string hello world object" | "string hello world function" | "number hello world string" | "number hello world number" | "number hello world bigint" | "number hello world boolean" | "number hello world symbol" | "number hello world undefined" | "number hello world object" | "number hello world function" | "bigint hello world string" | "bigint hello world number" | "bigint hello world bigint" | "bigint hello world boolean" | "bigint hello world symbol" | "bigint hello world undefined" | "bigint hello world object" | "bigint hello world function" | "boolean hello world string" | "boolean hello world number" | "boolean hello world bigint" | "boolean hello world boolean" | "boolean hello world symbol" | "boolean hello world undefined" | "boolean hello world object" | "boolean hello world function" | "symbol hello world string" | "symbol hello world number" | "symbol hello world bigint" | "symbol hello world boolean" | "symbol hello world symbol" | "symbol hello world undefined" | "symbol hello world object" | "symbol hello world function" | "undefined hello world string" | "undefined hello world number" | "undefined hello world bigint" | "undefined hello world boolean" | "undefined hello world symbol" | "undefined hello world undefined" | "undefined hello world object" | "undefined hello world function" | "object hello world string" | "object hello world number" | "object hello world bigint" | "object hello world boolean" | "object hello world symbol" | "object hello world undefined" | "object hello world object" | "object hello world function" | "function hello world string" | "function hello world number" | "function hello world bigint" | "function hello world boolean" | "function hello world symbol" | "function hello world undefined" | "function hello world object" | "function hello world function" +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -178,7 +178,7 @@ var s; // With templateHead `hello ${(-t1) ** t2 - t1}`; ->`hello ${(-t1) ** t2 - t1}` : `hello ${number}` +>`hello ${(-t1) ** t2 - t1}` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -188,7 +188,7 @@ var s; >t1 : number `hello ${(-++t1) ** t2 - t1}`; ->`hello ${(-++t1) ** t2 - t1}` : `hello ${number}` +>`hello ${(-++t1) ** t2 - t1}` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -199,7 +199,7 @@ var s; >t1 : number `hello ${(-t1++) ** t2 - t1}`; ->`hello ${(-t1++) ** t2 - t1}` : `hello ${number}` +>`hello ${(-t1++) ** t2 - t1}` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -210,7 +210,7 @@ var s; >t1 : number `hello ${(~t1) ** t2 ** --t1 }`; ->`hello ${(~t1) ** t2 ** --t1 }` : `hello ${number}` +>`hello ${(~t1) ** t2 ** --t1 }` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1)}`; ->`hello ${typeof (t1 ** t2 ** t1)}` : "hello string" | "hello number" | "hello bigint" | "hello boolean" | "hello symbol" | "hello undefined" | "hello object" | "hello function" +>`hello ${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types index e984817fd5a8a..08d0d591dfb1b 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types @@ -12,14 +12,14 @@ var s; // With TemplateTail `${t1 ** -t2} world`; ->`${t1 ** -t2} world` : `${number} world` +>`${t1 ** -t2} world` : string >t1 ** -t2 : number >t1 : number >-t2 : number >t2 : number `${(-t1) ** t2 - t1} world`; ->`${(-t1) ** t2 - t1} world` : `${number} world` +>`${(-t1) ** t2 - t1} world` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -29,7 +29,7 @@ var s; >t1 : number `${(-++t1) ** t2 - t1} world`; ->`${(-++t1) ** t2 - t1} world` : `${number} world` +>`${(-++t1) ** t2 - t1} world` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -40,7 +40,7 @@ var s; >t1 : number `${(-t1++) ** t2 - t1} world`; ->`${(-t1++) ** t2 - t1} world` : `${number} world` +>`${(-t1++) ** t2 - t1} world` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -51,7 +51,7 @@ var s; >t1 : number `${(~t1) ** t2 ** --t1 } world`; ->`${(~t1) ** t2 ** --t1 } world` : `${number} world` +>`${(~t1) ** t2 ** --t1 } world` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) } world` : "string world" | "number world" | "bigint world" | "boolean world" | "symbol world" | "undefined world" | "object world" | "function world" +>`${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -73,7 +73,7 @@ var s; // TempateHead & TemplateTail are empt `${t1 ** -t2} hello world ${t1 ** -t2}`; ->`${t1 ** -t2} hello world ${t1 ** -t2}` : `${number} hello world ${number}` +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string >t1 ** -t2 : number >t1 : number >-t2 : number @@ -84,7 +84,7 @@ var s; >t2 : number `${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; ->`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : `${number} hello world ${number}` +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -101,7 +101,7 @@ var s; >t1 : number `${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; ->`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : `${number} hello world ${number}` +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -121,7 +121,7 @@ var s; >t1 : number `${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; ->`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : `${number} hello world ${number}` +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -141,7 +141,7 @@ var s; >t1 : number `${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; ->`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : `${number} hello world ${number}` +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -160,7 +160,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; ->`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : "string hello world string" | "string hello world number" | "string hello world bigint" | "string hello world boolean" | "string hello world symbol" | "string hello world undefined" | "string hello world object" | "string hello world function" | "number hello world string" | "number hello world number" | "number hello world bigint" | "number hello world boolean" | "number hello world symbol" | "number hello world undefined" | "number hello world object" | "number hello world function" | "bigint hello world string" | "bigint hello world number" | "bigint hello world bigint" | "bigint hello world boolean" | "bigint hello world symbol" | "bigint hello world undefined" | "bigint hello world object" | "bigint hello world function" | "boolean hello world string" | "boolean hello world number" | "boolean hello world bigint" | "boolean hello world boolean" | "boolean hello world symbol" | "boolean hello world undefined" | "boolean hello world object" | "boolean hello world function" | "symbol hello world string" | "symbol hello world number" | "symbol hello world bigint" | "symbol hello world boolean" | "symbol hello world symbol" | "symbol hello world undefined" | "symbol hello world object" | "symbol hello world function" | "undefined hello world string" | "undefined hello world number" | "undefined hello world bigint" | "undefined hello world boolean" | "undefined hello world symbol" | "undefined hello world undefined" | "undefined hello world object" | "undefined hello world function" | "object hello world string" | "object hello world number" | "object hello world bigint" | "object hello world boolean" | "object hello world symbol" | "object hello world undefined" | "object hello world object" | "object hello world function" | "function hello world string" | "function hello world number" | "function hello world bigint" | "function hello world boolean" | "function hello world symbol" | "function hello world undefined" | "function hello world object" | "function hello world function" +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -178,7 +178,7 @@ var s; // With templateHead `hello ${(-t1) ** t2 - t1}`; ->`hello ${(-t1) ** t2 - t1}` : `hello ${number}` +>`hello ${(-t1) ** t2 - t1}` : string >(-t1) ** t2 - t1 : number >(-t1) ** t2 : number >(-t1) : number @@ -188,7 +188,7 @@ var s; >t1 : number `hello ${(-++t1) ** t2 - t1}`; ->`hello ${(-++t1) ** t2 - t1}` : `hello ${number}` +>`hello ${(-++t1) ** t2 - t1}` : string >(-++t1) ** t2 - t1 : number >(-++t1) ** t2 : number >(-++t1) : number @@ -199,7 +199,7 @@ var s; >t1 : number `hello ${(-t1++) ** t2 - t1}`; ->`hello ${(-t1++) ** t2 - t1}` : `hello ${number}` +>`hello ${(-t1++) ** t2 - t1}` : string >(-t1++) ** t2 - t1 : number >(-t1++) ** t2 : number >(-t1++) : number @@ -210,7 +210,7 @@ var s; >t1 : number `hello ${(~t1) ** t2 ** --t1 }`; ->`hello ${(~t1) ** t2 ** --t1 }` : `hello ${number}` +>`hello ${(~t1) ** t2 ** --t1 }` : string >(~t1) ** t2 ** --t1 : number >(~t1) : number >~t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1)}`; ->`hello ${typeof (t1 ** t2 ** t1)}` : "hello string" | "hello number" | "hello bigint" | "hello boolean" | "hello symbol" | "hello undefined" | "hello object" | "hello function" +>`hello ${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types index 91e19730aff47..0a40fc6f766e9 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types @@ -12,13 +12,13 @@ var s; // TempateHead & TemplateTail are empty `${t1 ** t2}`; ->`${t1 ** t2}` : `${number}` +>`${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number `${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1}` : `${number}` +>`${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1}` : `${number}` +>`${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1}` : `${number}` +>`${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1 }`; ->`${t1 + t2 ** t2 + t1 }` : `${number}` +>`${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) }`; ->`${typeof (t1 ** t2 ** t1) }` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>`${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -74,7 +74,7 @@ var s; >t1 : number `${t1 ** t2}${t1 ** t2}`; ->`${t1 ** t2}${t1 ** t2}` : `${number}${number}` +>`${t1 ** t2}${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : `${number}${number}` +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `${t1 + t2 ** t1}${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1}${t1 + t2 ** t1}` : `${number}${number}` +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `${t1 ** t2 + t1}${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1}${t1 ** t2 + t1}` : `${number}${number}` +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; ->`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : `${number}${number}` +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; ->`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : "stringstring" | "stringnumber" | "stringbigint" | "stringboolean" | "stringsymbol" | "stringundefined" | "stringobject" | "stringfunction" | "numberstring" | "numbernumber" | "numberbigint" | "numberboolean" | "numbersymbol" | "numberundefined" | "numberobject" | "numberfunction" | "bigintstring" | "bigintnumber" | "bigintbigint" | "bigintboolean" | "bigintsymbol" | "bigintundefined" | "bigintobject" | "bigintfunction" | "booleanstring" | "booleannumber" | "booleanbigint" | "booleanboolean" | "booleansymbol" | "booleanundefined" | "booleanobject" | "booleanfunction" | "symbolstring" | "symbolnumber" | "symbolbigint" | "symbolboolean" | "symbolsymbol" | "symbolundefined" | "symbolobject" | "symbolfunction" | "undefinedstring" | "undefinednumber" | "undefinedbigint" | "undefinedboolean" | "undefinedsymbol" | "undefinedundefined" | "undefinedobject" | "undefinedfunction" | "objectstring" | "objectnumber" | "objectbigint" | "objectboolean" | "objectsymbol" | "objectundefined" | "objectobject" | "objectfunction" | "functionstring" | "functionnumber" | "functionbigint" | "functionboolean" | "functionsymbol" | "functionundefined" | "functionobject" | "functionfunction" +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `${t1 ** t2} hello world ${t1 ** t2}`; ->`${t1 ** t2} hello world ${t1 ** t2}` : `${number} hello world ${number}` +>`${t1 ** t2} hello world ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : `${number} hello world ${number}` +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : `${number} hello world ${number}` +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : `${number} hello world ${number}` +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; ->`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : `${number} hello world ${number}` +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; ->`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : "string hello world string" | "string hello world number" | "string hello world bigint" | "string hello world boolean" | "string hello world symbol" | "string hello world undefined" | "string hello world object" | "string hello world function" | "number hello world string" | "number hello world number" | "number hello world bigint" | "number hello world boolean" | "number hello world symbol" | "number hello world undefined" | "number hello world object" | "number hello world function" | "bigint hello world string" | "bigint hello world number" | "bigint hello world bigint" | "bigint hello world boolean" | "bigint hello world symbol" | "bigint hello world undefined" | "bigint hello world object" | "bigint hello world function" | "boolean hello world string" | "boolean hello world number" | "boolean hello world bigint" | "boolean hello world boolean" | "boolean hello world symbol" | "boolean hello world undefined" | "boolean hello world object" | "boolean hello world function" | "symbol hello world string" | "symbol hello world number" | "symbol hello world bigint" | "symbol hello world boolean" | "symbol hello world symbol" | "symbol hello world undefined" | "symbol hello world object" | "symbol hello world function" | "undefined hello world string" | "undefined hello world number" | "undefined hello world bigint" | "undefined hello world boolean" | "undefined hello world symbol" | "undefined hello world undefined" | "undefined hello world object" | "undefined hello world function" | "object hello world string" | "object hello world number" | "object hello world bigint" | "object hello world boolean" | "object hello world symbol" | "object hello world undefined" | "object hello world object" | "object hello world function" | "function hello world string" | "function hello world number" | "function hello world bigint" | "function hello world boolean" | "function hello world symbol" | "function hello world undefined" | "function hello world object" | "function hello world function" +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types index 8f58a022c2b0a..9d712e6e366c4 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types @@ -12,13 +12,13 @@ var s; // TempateHead & TemplateTail are empty `${t1 ** t2}`; ->`${t1 ** t2}` : `${number}` +>`${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number `${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1}` : `${number}` +>`${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1}` : `${number}` +>`${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1}` : `${number}` +>`${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1 }`; ->`${t1 + t2 ** t2 + t1 }` : `${number}` +>`${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) }`; ->`${typeof (t1 ** t2 ** t1) }` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>`${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -74,7 +74,7 @@ var s; >t1 : number `${t1 ** t2}${t1 ** t2}`; ->`${t1 ** t2}${t1 ** t2}` : `${number}${number}` +>`${t1 ** t2}${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : `${number}${number}` +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `${t1 + t2 ** t1}${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1}${t1 + t2 ** t1}` : `${number}${number}` +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `${t1 ** t2 + t1}${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1}${t1 ** t2 + t1}` : `${number}${number}` +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; ->`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : `${number}${number}` +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; ->`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : "stringstring" | "stringnumber" | "stringbigint" | "stringboolean" | "stringsymbol" | "stringundefined" | "stringobject" | "stringfunction" | "numberstring" | "numbernumber" | "numberbigint" | "numberboolean" | "numbersymbol" | "numberundefined" | "numberobject" | "numberfunction" | "bigintstring" | "bigintnumber" | "bigintbigint" | "bigintboolean" | "bigintsymbol" | "bigintundefined" | "bigintobject" | "bigintfunction" | "booleanstring" | "booleannumber" | "booleanbigint" | "booleanboolean" | "booleansymbol" | "booleanundefined" | "booleanobject" | "booleanfunction" | "symbolstring" | "symbolnumber" | "symbolbigint" | "symbolboolean" | "symbolsymbol" | "symbolundefined" | "symbolobject" | "symbolfunction" | "undefinedstring" | "undefinednumber" | "undefinedbigint" | "undefinedboolean" | "undefinedsymbol" | "undefinedundefined" | "undefinedobject" | "undefinedfunction" | "objectstring" | "objectnumber" | "objectbigint" | "objectboolean" | "objectsymbol" | "objectundefined" | "objectobject" | "objectfunction" | "functionstring" | "functionnumber" | "functionbigint" | "functionboolean" | "functionsymbol" | "functionundefined" | "functionobject" | "functionfunction" +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `${t1 ** t2} hello world ${t1 ** t2}`; ->`${t1 ** t2} hello world ${t1 ** t2}` : `${number} hello world ${number}` +>`${t1 ** t2} hello world ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; ->`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : `${number} hello world ${number}` +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; ->`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : `${number} hello world ${number}` +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; ->`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : `${number} hello world ${number}` +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; ->`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : `${number} hello world ${number}` +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; ->`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : "string hello world string" | "string hello world number" | "string hello world bigint" | "string hello world boolean" | "string hello world symbol" | "string hello world undefined" | "string hello world object" | "string hello world function" | "number hello world string" | "number hello world number" | "number hello world bigint" | "number hello world boolean" | "number hello world symbol" | "number hello world undefined" | "number hello world object" | "number hello world function" | "bigint hello world string" | "bigint hello world number" | "bigint hello world bigint" | "bigint hello world boolean" | "bigint hello world symbol" | "bigint hello world undefined" | "bigint hello world object" | "bigint hello world function" | "boolean hello world string" | "boolean hello world number" | "boolean hello world bigint" | "boolean hello world boolean" | "boolean hello world symbol" | "boolean hello world undefined" | "boolean hello world object" | "boolean hello world function" | "symbol hello world string" | "symbol hello world number" | "symbol hello world bigint" | "symbol hello world boolean" | "symbol hello world symbol" | "symbol hello world undefined" | "symbol hello world object" | "symbol hello world function" | "undefined hello world string" | "undefined hello world number" | "undefined hello world bigint" | "undefined hello world boolean" | "undefined hello world symbol" | "undefined hello world undefined" | "undefined hello world object" | "undefined hello world function" | "object hello world string" | "object hello world number" | "object hello world bigint" | "object hello world boolean" | "object hello world symbol" | "object hello world undefined" | "object hello world object" | "object hello world function" | "function hello world string" | "function hello world number" | "function hello world bigint" | "function hello world boolean" | "function hello world symbol" | "function hello world undefined" | "function hello world object" | "function hello world function" +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types index b2d570b2d3650..9b583b03d2836 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types @@ -12,13 +12,13 @@ var s; // With templateHead `hello ${t1 ** t2}`; ->`hello ${t1 ** t2}` : `hello ${number}` +>`hello ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number `hello ${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1}` : `hello ${number}` +>`hello ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1}` : `hello ${number}` +>`hello ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1}` : `hello ${number}` +>`hello ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1 }`; ->`hello ${t1 + t2 ** t2 + t1 }` : `hello ${number}` +>`hello ${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) }` : "hello string" | "hello number" | "hello bigint" | "hello boolean" | "hello symbol" | "hello undefined" | "hello object" | "hello function" +>`hello ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `hello ${1 + typeof (t1 ** t2 ** t1) }`; ->`hello ${1 + typeof (t1 ** t2 ** t1) }` : `hello ${string}` +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string >1 + typeof (t1 ** t2 ** t1) : string >1 : 1 >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -74,7 +74,7 @@ var s; >t1 : number `hello ${t1 ** t2}${t1 ** t2}`; ->`hello ${t1 ** t2}${t1 ** t2}` : `hello ${number}${number}` +>`hello ${t1 ** t2}${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : `hello ${number}${number}` +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : `hello ${number}${number}` +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : `hello ${number}${number}` +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; ->`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : `hello ${number}${number}` +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : "hello stringstring" | "hello stringnumber" | "hello stringbigint" | "hello stringboolean" | "hello stringsymbol" | "hello stringundefined" | "hello stringobject" | "hello stringfunction" | "hello numberstring" | "hello numbernumber" | "hello numberbigint" | "hello numberboolean" | "hello numbersymbol" | "hello numberundefined" | "hello numberobject" | "hello numberfunction" | "hello bigintstring" | "hello bigintnumber" | "hello bigintbigint" | "hello bigintboolean" | "hello bigintsymbol" | "hello bigintundefined" | "hello bigintobject" | "hello bigintfunction" | "hello booleanstring" | "hello booleannumber" | "hello booleanbigint" | "hello booleanboolean" | "hello booleansymbol" | "hello booleanundefined" | "hello booleanobject" | "hello booleanfunction" | "hello symbolstring" | "hello symbolnumber" | "hello symbolbigint" | "hello symbolboolean" | "hello symbolsymbol" | "hello symbolundefined" | "hello symbolobject" | "hello symbolfunction" | "hello undefinedstring" | "hello undefinednumber" | "hello undefinedbigint" | "hello undefinedboolean" | "hello undefinedsymbol" | "hello undefinedundefined" | "hello undefinedobject" | "hello undefinedfunction" | "hello objectstring" | "hello objectnumber" | "hello objectbigint" | "hello objectboolean" | "hello objectsymbol" | "hello objectundefined" | "hello objectobject" | "hello objectfunction" | "hello functionstring" | "hello functionnumber" | "hello functionbigint" | "hello functionboolean" | "hello functionsymbol" | "hello functionundefined" | "hello functionobject" | "hello functionfunction" +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `hello ${t1 ** t2} hello world ${t1 ** t2}`; ->`hello ${t1 ** t2} hello world ${t1 ** t2}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; ->`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : "hello string hello world string" | "hello string hello world number" | "hello string hello world bigint" | "hello string hello world boolean" | "hello string hello world symbol" | "hello string hello world undefined" | "hello string hello world object" | "hello string hello world function" | "hello number hello world string" | "hello number hello world number" | "hello number hello world bigint" | "hello number hello world boolean" | "hello number hello world symbol" | "hello number hello world undefined" | "hello number hello world object" | "hello number hello world function" | "hello bigint hello world string" | "hello bigint hello world number" | "hello bigint hello world bigint" | "hello bigint hello world boolean" | "hello bigint hello world symbol" | "hello bigint hello world undefined" | "hello bigint hello world object" | "hello bigint hello world function" | "hello boolean hello world string" | "hello boolean hello world number" | "hello boolean hello world bigint" | "hello boolean hello world boolean" | "hello boolean hello world symbol" | "hello boolean hello world undefined" | "hello boolean hello world object" | "hello boolean hello world function" | "hello symbol hello world string" | "hello symbol hello world number" | "hello symbol hello world bigint" | "hello symbol hello world boolean" | "hello symbol hello world symbol" | "hello symbol hello world undefined" | "hello symbol hello world object" | "hello symbol hello world function" | "hello undefined hello world string" | "hello undefined hello world number" | "hello undefined hello world bigint" | "hello undefined hello world boolean" | "hello undefined hello world symbol" | "hello undefined hello world undefined" | "hello undefined hello world object" | "hello undefined hello world function" | "hello object hello world string" | "hello object hello world number" | "hello object hello world bigint" | "hello object hello world boolean" | "hello object hello world symbol" | "hello object hello world undefined" | "hello object hello world object" | "hello object hello world function" | "hello function hello world string" | "hello function hello world number" | "hello function hello world bigint" | "hello function hello world boolean" | "hello function hello world symbol" | "hello function hello world undefined" | "hello function hello world object" | "hello function hello world function" +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types index 66a49fb6bd097..c1c6394c63e1f 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types @@ -12,13 +12,13 @@ var s; // With templateHead `hello ${t1 ** t2}`; ->`hello ${t1 ** t2}` : `hello ${number}` +>`hello ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number `hello ${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1}` : `hello ${number}` +>`hello ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1}` : `hello ${number}` +>`hello ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1}` : `hello ${number}` +>`hello ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1 }`; ->`hello ${t1 + t2 ** t2 + t1 }` : `hello ${number}` +>`hello ${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) }` : "hello string" | "hello number" | "hello bigint" | "hello boolean" | "hello symbol" | "hello undefined" | "hello object" | "hello function" +>`hello ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `hello ${1 + typeof (t1 ** t2 ** t1) }`; ->`hello ${1 + typeof (t1 ** t2 ** t1) }` : `hello ${string}` +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string >1 + typeof (t1 ** t2 ** t1) : string >1 : 1 >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -74,7 +74,7 @@ var s; >t1 : number `hello ${t1 ** t2}${t1 ** t2}`; ->`hello ${t1 ** t2}${t1 ** t2}` : `hello ${number}${number}` +>`hello ${t1 ** t2}${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : `hello ${number}${number}` +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : `hello ${number}${number}` +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : `hello ${number}${number}` +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; ->`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : `hello ${number}${number}` +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : "hello stringstring" | "hello stringnumber" | "hello stringbigint" | "hello stringboolean" | "hello stringsymbol" | "hello stringundefined" | "hello stringobject" | "hello stringfunction" | "hello numberstring" | "hello numbernumber" | "hello numberbigint" | "hello numberboolean" | "hello numbersymbol" | "hello numberundefined" | "hello numberobject" | "hello numberfunction" | "hello bigintstring" | "hello bigintnumber" | "hello bigintbigint" | "hello bigintboolean" | "hello bigintsymbol" | "hello bigintundefined" | "hello bigintobject" | "hello bigintfunction" | "hello booleanstring" | "hello booleannumber" | "hello booleanbigint" | "hello booleanboolean" | "hello booleansymbol" | "hello booleanundefined" | "hello booleanobject" | "hello booleanfunction" | "hello symbolstring" | "hello symbolnumber" | "hello symbolbigint" | "hello symbolboolean" | "hello symbolsymbol" | "hello symbolundefined" | "hello symbolobject" | "hello symbolfunction" | "hello undefinedstring" | "hello undefinednumber" | "hello undefinedbigint" | "hello undefinedboolean" | "hello undefinedsymbol" | "hello undefinedundefined" | "hello undefinedobject" | "hello undefinedfunction" | "hello objectstring" | "hello objectnumber" | "hello objectbigint" | "hello objectboolean" | "hello objectsymbol" | "hello objectundefined" | "hello objectobject" | "hello objectfunction" | "hello functionstring" | "hello functionnumber" | "hello functionbigint" | "hello functionboolean" | "hello functionsymbol" | "hello functionundefined" | "hello functionobject" | "hello functionfunction" +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `hello ${t1 ** t2} hello world ${t1 ** t2}`; ->`hello ${t1 ** t2} hello world ${t1 ** t2}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; ->`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; ->`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; ->`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; ->`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : `hello ${number} hello world ${number}` +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; ->`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : "hello string hello world string" | "hello string hello world number" | "hello string hello world bigint" | "hello string hello world boolean" | "hello string hello world symbol" | "hello string hello world undefined" | "hello string hello world object" | "hello string hello world function" | "hello number hello world string" | "hello number hello world number" | "hello number hello world bigint" | "hello number hello world boolean" | "hello number hello world symbol" | "hello number hello world undefined" | "hello number hello world object" | "hello number hello world function" | "hello bigint hello world string" | "hello bigint hello world number" | "hello bigint hello world bigint" | "hello bigint hello world boolean" | "hello bigint hello world symbol" | "hello bigint hello world undefined" | "hello bigint hello world object" | "hello bigint hello world function" | "hello boolean hello world string" | "hello boolean hello world number" | "hello boolean hello world bigint" | "hello boolean hello world boolean" | "hello boolean hello world symbol" | "hello boolean hello world undefined" | "hello boolean hello world object" | "hello boolean hello world function" | "hello symbol hello world string" | "hello symbol hello world number" | "hello symbol hello world bigint" | "hello symbol hello world boolean" | "hello symbol hello world symbol" | "hello symbol hello world undefined" | "hello symbol hello world object" | "hello symbol hello world function" | "hello undefined hello world string" | "hello undefined hello world number" | "hello undefined hello world bigint" | "hello undefined hello world boolean" | "hello undefined hello world symbol" | "hello undefined hello world undefined" | "hello undefined hello world object" | "hello undefined hello world function" | "hello object hello world string" | "hello object hello world number" | "hello object hello world bigint" | "hello object hello world boolean" | "hello object hello world symbol" | "hello object hello world undefined" | "hello object hello world object" | "hello object hello world function" | "hello function hello world string" | "hello function hello world number" | "hello function hello world bigint" | "hello function hello world boolean" | "hello function hello world symbol" | "hello function hello world undefined" | "hello function hello world object" | "hello function hello world function" +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types index f49a0220b7495..431d688f3b478 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types @@ -12,13 +12,13 @@ var s; // With TemplateTail `${t1 ** t2} world`; ->`${t1 ** t2} world` : `${number} world` +>`${t1 ** t2} world` : string >t1 ** t2 : number >t1 : number >t2 : number `${t1 ** t2 ** t1} world`; ->`${t1 ** t2 ** t1} world` : `${number} world` +>`${t1 ** t2 ** t1} world` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `${t1 + t2 ** t1} world`; ->`${t1 + t2 ** t1} world` : `${number} world` +>`${t1 + t2 ** t1} world` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `${t1 ** t2 + t1} world`; ->`${t1 ** t2 + t1} world` : `${number} world` +>`${t1 ** t2 + t1} world` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1 } world`; ->`${t1 + t2 ** t2 + t1 } world` : `${number} world` +>`${t1 + t2 ** t2 + t1 } world` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) } world` : "string world" | "number world" | "bigint world" | "boolean world" | "symbol world" | "undefined world" | "object world" | "function world" +>`${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `${1 + typeof (t1 ** t2 ** t1) } world`; ->`${1 + typeof (t1 ** t2 ** t1) } world` : `${string} world` +>`${1 + typeof (t1 ** t2 ** t1) } world` : string >1 + typeof (t1 ** t2 ** t1) : string >1 : 1 >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -74,7 +74,7 @@ var s; >t1 : number `${t1 ** t2}${t1 ** t2} world`; ->`${t1 ** t2}${t1 ** t2} world` : `${number}${number} world` +>`${t1 ** t2}${t1 ** t2} world` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; ->`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : `${number}${number} world` +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `${t1 + t2 ** t1}${t1 + t2 ** t1} world`; ->`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : `${number}${number} world` +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `${t1 ** t2 + t1}${t1 ** t2 + t1} world`; ->`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : `${number}${number} world` +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; ->`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : `${number}${number} world` +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : "stringstring world" | "stringnumber world" | "stringbigint world" | "stringboolean world" | "stringsymbol world" | "stringundefined world" | "stringobject world" | "stringfunction world" | "numberstring world" | "numbernumber world" | "numberbigint world" | "numberboolean world" | "numbersymbol world" | "numberundefined world" | "numberobject world" | "numberfunction world" | "bigintstring world" | "bigintnumber world" | "bigintbigint world" | "bigintboolean world" | "bigintsymbol world" | "bigintundefined world" | "bigintobject world" | "bigintfunction world" | "booleanstring world" | "booleannumber world" | "booleanbigint world" | "booleanboolean world" | "booleansymbol world" | "booleanundefined world" | "booleanobject world" | "booleanfunction world" | "symbolstring world" | "symbolnumber world" | "symbolbigint world" | "symbolboolean world" | "symbolsymbol world" | "symbolundefined world" | "symbolobject world" | "symbolfunction world" | "undefinedstring world" | "undefinednumber world" | "undefinedbigint world" | "undefinedboolean world" | "undefinedsymbol world" | "undefinedundefined world" | "undefinedobject world" | "undefinedfunction world" | "objectstring world" | "objectnumber world" | "objectbigint world" | "objectboolean world" | "objectsymbol world" | "objectundefined world" | "objectobject world" | "objectfunction world" | "functionstring world" | "functionnumber world" | "functionbigint world" | "functionboolean world" | "functionsymbol world" | "functionundefined world" | "functionobject world" | "functionfunction world" +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `${t1 ** t2} hello world ${t1 ** t2} !!`; ->`${t1 ** t2} hello world ${t1 ** t2} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; ->`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; ->`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; ->`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; ->`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : `${number} hello world ${number} !!` +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; ->`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : "string hello world string !!" | "string hello world number !!" | "string hello world bigint !!" | "string hello world boolean !!" | "string hello world symbol !!" | "string hello world undefined !!" | "string hello world object !!" | "string hello world function !!" | "number hello world string !!" | "number hello world number !!" | "number hello world bigint !!" | "number hello world boolean !!" | "number hello world symbol !!" | "number hello world undefined !!" | "number hello world object !!" | "number hello world function !!" | "bigint hello world string !!" | "bigint hello world number !!" | "bigint hello world bigint !!" | "bigint hello world boolean !!" | "bigint hello world symbol !!" | "bigint hello world undefined !!" | "bigint hello world object !!" | "bigint hello world function !!" | "boolean hello world string !!" | "boolean hello world number !!" | "boolean hello world bigint !!" | "boolean hello world boolean !!" | "boolean hello world symbol !!" | "boolean hello world undefined !!" | "boolean hello world object !!" | "boolean hello world function !!" | "symbol hello world string !!" | "symbol hello world number !!" | "symbol hello world bigint !!" | "symbol hello world boolean !!" | "symbol hello world symbol !!" | "symbol hello world undefined !!" | "symbol hello world object !!" | "symbol hello world function !!" | "undefined hello world string !!" | "undefined hello world number !!" | "undefined hello world bigint !!" | "undefined hello world boolean !!" | "undefined hello world symbol !!" | "undefined hello world undefined !!" | "undefined hello world object !!" | "undefined hello world function !!" | "object hello world string !!" | "object hello world number !!" | "object hello world bigint !!" | "object hello world boolean !!" | "object hello world symbol !!" | "object hello world undefined !!" | "object hello world object !!" | "object hello world function !!" | "function hello world string !!" | "function hello world number !!" | "function hello world bigint !!" | "function hello world boolean !!" | "function hello world symbol !!" | "function hello world undefined !!" | "function hello world object !!" | "function hello world function !!" +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types index 583c51c3804df..ccbacd4c7196c 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types @@ -12,13 +12,13 @@ var s; // With TemplateTail `${t1 ** t2} world`; ->`${t1 ** t2} world` : `${number} world` +>`${t1 ** t2} world` : string >t1 ** t2 : number >t1 : number >t2 : number `${t1 ** t2 ** t1} world`; ->`${t1 ** t2 ** t1} world` : `${number} world` +>`${t1 ** t2 ** t1} world` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -26,7 +26,7 @@ var s; >t1 : number `${t1 + t2 ** t1} world`; ->`${t1 + t2 ** t1} world` : `${number} world` +>`${t1 + t2 ** t1} world` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -34,7 +34,7 @@ var s; >t1 : number `${t1 ** t2 + t1} world`; ->`${t1 ** t2 + t1} world` : `${number} world` +>`${t1 ** t2 + t1} world` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -42,7 +42,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1 } world`; ->`${t1 + t2 ** t2 + t1 } world` : `${number} world` +>`${t1 + t2 ** t2 + t1 } world` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) } world` : "string world" | "number world" | "bigint world" | "boolean world" | "symbol world" | "undefined world" | "object world" | "function world" +>`${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -62,7 +62,7 @@ var s; >t1 : number `${1 + typeof (t1 ** t2 ** t1) } world`; ->`${1 + typeof (t1 ** t2 ** t1) } world` : `${string} world` +>`${1 + typeof (t1 ** t2 ** t1) } world` : string >1 + typeof (t1 ** t2 ** t1) : string >1 : 1 >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -74,7 +74,7 @@ var s; >t1 : number `${t1 ** t2}${t1 ** t2} world`; ->`${t1 ** t2}${t1 ** t2} world` : `${number}${number} world` +>`${t1 ** t2}${t1 ** t2} world` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -83,7 +83,7 @@ var s; >t2 : number `${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; ->`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : `${number}${number} world` +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -96,7 +96,7 @@ var s; >t1 : number `${t1 + t2 ** t1}${t1 + t2 ** t1} world`; ->`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : `${number}${number} world` +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -109,7 +109,7 @@ var s; >t1 : number `${t1 ** t2 + t1}${t1 ** t2 + t1} world`; ->`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : `${number}${number} world` +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -122,7 +122,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; ->`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : `${number}${number} world` +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -139,7 +139,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; ->`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : "stringstring world" | "stringnumber world" | "stringbigint world" | "stringboolean world" | "stringsymbol world" | "stringundefined world" | "stringobject world" | "stringfunction world" | "numberstring world" | "numbernumber world" | "numberbigint world" | "numberboolean world" | "numbersymbol world" | "numberundefined world" | "numberobject world" | "numberfunction world" | "bigintstring world" | "bigintnumber world" | "bigintbigint world" | "bigintboolean world" | "bigintsymbol world" | "bigintundefined world" | "bigintobject world" | "bigintfunction world" | "booleanstring world" | "booleannumber world" | "booleanbigint world" | "booleanboolean world" | "booleansymbol world" | "booleanundefined world" | "booleanobject world" | "booleanfunction world" | "symbolstring world" | "symbolnumber world" | "symbolbigint world" | "symbolboolean world" | "symbolsymbol world" | "symbolundefined world" | "symbolobject world" | "symbolfunction world" | "undefinedstring world" | "undefinednumber world" | "undefinedbigint world" | "undefinedboolean world" | "undefinedsymbol world" | "undefinedundefined world" | "undefinedobject world" | "undefinedfunction world" | "objectstring world" | "objectnumber world" | "objectbigint world" | "objectboolean world" | "objectsymbol world" | "objectundefined world" | "objectobject world" | "objectfunction world" | "functionstring world" | "functionnumber world" | "functionbigint world" | "functionboolean world" | "functionsymbol world" | "functionundefined world" | "functionobject world" | "functionfunction world" +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number @@ -156,7 +156,7 @@ var s; >t1 : number `${t1 ** t2} hello world ${t1 ** t2} !!`; ->`${t1 ** t2} hello world ${t1 ** t2} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string >t1 ** t2 : number >t1 : number >t2 : number @@ -165,7 +165,7 @@ var s; >t2 : number `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; ->`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -178,7 +178,7 @@ var s; >t1 : number `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; ->`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number @@ -191,7 +191,7 @@ var s; >t1 : number `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; ->`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : `${number} hello world ${number} !!` +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; ->`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : `${number} hello world ${number} !!` +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -221,7 +221,7 @@ var s; >t1 : number `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; ->`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : "string hello world string !!" | "string hello world number !!" | "string hello world bigint !!" | "string hello world boolean !!" | "string hello world symbol !!" | "string hello world undefined !!" | "string hello world object !!" | "string hello world function !!" | "number hello world string !!" | "number hello world number !!" | "number hello world bigint !!" | "number hello world boolean !!" | "number hello world symbol !!" | "number hello world undefined !!" | "number hello world object !!" | "number hello world function !!" | "bigint hello world string !!" | "bigint hello world number !!" | "bigint hello world bigint !!" | "bigint hello world boolean !!" | "bigint hello world symbol !!" | "bigint hello world undefined !!" | "bigint hello world object !!" | "bigint hello world function !!" | "boolean hello world string !!" | "boolean hello world number !!" | "boolean hello world bigint !!" | "boolean hello world boolean !!" | "boolean hello world symbol !!" | "boolean hello world undefined !!" | "boolean hello world object !!" | "boolean hello world function !!" | "symbol hello world string !!" | "symbol hello world number !!" | "symbol hello world bigint !!" | "symbol hello world boolean !!" | "symbol hello world symbol !!" | "symbol hello world undefined !!" | "symbol hello world object !!" | "symbol hello world function !!" | "undefined hello world string !!" | "undefined hello world number !!" | "undefined hello world bigint !!" | "undefined hello world boolean !!" | "undefined hello world symbol !!" | "undefined hello world undefined !!" | "undefined hello world object !!" | "undefined hello world function !!" | "object hello world string !!" | "object hello world number !!" | "object hello world bigint !!" | "object hello world boolean !!" | "object hello world symbol !!" | "object hello world undefined !!" | "object hello world object !!" | "object hello world function !!" | "function hello world string !!" | "function hello world number !!" | "function hello world bigint !!" | "function hello world boolean !!" | "function hello world symbol !!" | "function hello world undefined !!" | "function hello world object !!" | "function hello world function !!" +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string >typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/enumConstantMemberWithTemplateLiterals.types b/tests/baselines/reference/enumConstantMemberWithTemplateLiterals.types index 256c73fd03363..b750b8e8ab444 100644 --- a/tests/baselines/reference/enumConstantMemberWithTemplateLiterals.types +++ b/tests/baselines/reference/enumConstantMemberWithTemplateLiterals.types @@ -106,7 +106,7 @@ enum T5 { g = `1${"2"}3`, >g : T5.e ->`1${"2"}3` : "123" +>`1${"2"}3` : string >"2" : "2" h = `1`.length diff --git a/tests/baselines/reference/esModuleInteropImportTSLibHasImport.types b/tests/baselines/reference/esModuleInteropImportTSLibHasImport.types index ed97cc86cb738..5851ad03565bf 100644 --- a/tests/baselines/reference/esModuleInteropImportTSLibHasImport.types +++ b/tests/baselines/reference/esModuleInteropImportTSLibHasImport.types @@ -19,8 +19,8 @@ const sayHello = (name?: string) => void (`Hello, ${name}!`); >(name?: string) => void (`Hello, ${name}!`) : (name?: string) => any >name : string >void (`Hello, ${name}!`) : undefined ->(`Hello, ${name}!`) : `Hello, ${string}!` ->`Hello, ${name}!` : `Hello, ${string}!` +>(`Hello, ${name}!`) : string +>`Hello, ${name}!` : string >name : string export default sayHello; diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types index 9a7fc68838710..8c7e7d27aa847 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types @@ -13,7 +13,7 @@ var s; // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () // TempateHead & TemplateTail are empty `${1 + typeof t1 ** t2 ** t1}`; ->`${1 + typeof t1 ** t2 ** t1}` : `${number}` +>`${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -24,7 +24,7 @@ var s; >t1 : number `${-t1 ** t2 - t1}`; ->`${-t1 ** t2 - t1}` : `${number}` +>`${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -33,7 +33,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1}`; ->`${-++t1 ** t2 - t1}` : `${number}` +>`${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -43,7 +43,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1}`; ->`${-t1++ ** t2 - t1}` : `${number}` +>`${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -53,7 +53,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 }`; ->`${!t1 ** t2 ** --t1 }` : `${number}` +>`${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -63,7 +63,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1}`; ->`${typeof t1 ** t2 ** t1}` : `${number}` +>`${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -72,7 +72,7 @@ var s; >t1 : number `${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; ->`${-t1 ** t2 - t1}${-t1 ** t2 - t1}` : `${number}${number}` +>`${-t1 ** t2 - t1}${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -87,7 +87,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; ->`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}` : `${number}${number}` +>`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -104,7 +104,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; ->`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}` : `${number}${number}` +>`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -121,7 +121,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ->`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }` : `${number}${number}` +>`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -138,7 +138,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ->`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : `${number}${number}` +>`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -153,7 +153,7 @@ var s; >t1 : number `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ->`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}` : `${number}${number}` +>`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -172,7 +172,7 @@ var s; >t1 : number `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; ->`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}` : `${number} hello world ${number}` +>`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -187,7 +187,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; ->`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}` : `${number} hello world ${number}` +>`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; ->`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}` : `${number} hello world ${number}` +>`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -221,7 +221,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ->`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }` : `${number} hello world ${number}` +>`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -238,7 +238,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ->`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : `${number} hello world ${number}` +>`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -253,7 +253,7 @@ var s; >t1 : number `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ->`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}` : `${number} hello world ${number}` +>`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types index e1b1e9942a1c9..9cacc633c6243 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types @@ -13,7 +13,7 @@ var s; // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () // With templateHead `hello ${-t1 ** t2 - t1}`; ->`hello ${-t1 ** t2 - t1}` : `hello ${number}` +>`hello ${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -22,7 +22,7 @@ var s; >t1 : number `hello ${-++t1 ** t2 - t1}`; ->`hello ${-++t1 ** t2 - t1}` : `hello ${number}` +>`hello ${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -32,7 +32,7 @@ var s; >t1 : number `hello ${-t1++ ** t2 - t1}`; ->`hello ${-t1++ ** t2 - t1}` : `hello ${number}` +>`hello ${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -42,7 +42,7 @@ var s; >t1 : number `hello ${!t1 ** t2 ** --t1 }`; ->`hello ${!t1 ** t2 ** --t1 }` : `hello ${number}` +>`hello ${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `hello ${typeof t1 ** t2 ** t1}`; ->`hello ${typeof t1 ** t2 ** t1}` : `hello ${number}` +>`hello ${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -61,7 +61,7 @@ var s; >t1 : number `hello ${1 + typeof t1 ** t2 ** t1}`; ->`hello ${1 + typeof t1 ** t2 ** t1}` : `hello ${number}` +>`hello ${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -72,7 +72,7 @@ var s; >t1 : number `hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; ->`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}` : `hello ${number}${number}` +>`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -87,7 +87,7 @@ var s; >t1 : number `hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; ->`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}` : `hello ${number}${number}` +>`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -104,7 +104,7 @@ var s; >t1 : number `hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; ->`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}` : `hello ${number}${number}` +>`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -121,7 +121,7 @@ var s; >t1 : number `hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ->`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }` : `hello ${number}${number}` +>`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -138,7 +138,7 @@ var s; >t1 : number `hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ->`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : `hello ${number}${number}` +>`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -153,7 +153,7 @@ var s; >t1 : number `hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ->`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}` : `hello ${number}${number}` +>`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -172,7 +172,7 @@ var s; >t1 : number `hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; ->`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}` : `hello ${number} hello world ${number}` +>`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -187,7 +187,7 @@ var s; >t1 : number `hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; ->`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}` : `hello ${number} hello world ${number}` +>`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; ->`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}` : `hello ${number} hello world ${number}` +>`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -221,7 +221,7 @@ var s; >t1 : number `hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ->`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }` : `hello ${number} hello world ${number}` +>`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -238,7 +238,7 @@ var s; >t1 : number `hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ->`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -253,7 +253,7 @@ var s; >t1 : number `hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ->`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}` : `hello ${number} hello world ${number}` +>`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types index 527eaad4eaedc..36d594f3821d2 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types @@ -13,7 +13,7 @@ var s; // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () // With TemplateTail `${-t1 ** t2 - t1} world`; ->`${-t1 ** t2 - t1} world` : `${number} world` +>`${-t1 ** t2 - t1} world` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -22,7 +22,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1} world`; ->`${-++t1 ** t2 - t1} world` : `${number} world` +>`${-++t1 ** t2 - t1} world` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -32,7 +32,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1} world`; ->`${-t1++ ** t2 - t1} world` : `${number} world` +>`${-t1++ ** t2 - t1} world` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -42,7 +42,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 } world`; ->`${!t1 ** t2 ** --t1 } world` : `${number} world` +>`${!t1 ** t2 ** --t1 } world` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -52,7 +52,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1} world`; ->`${typeof t1 ** t2 ** t1} world` : `${number} world` +>`${typeof t1 ** t2 ** t1} world` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -61,7 +61,7 @@ var s; >t1 : number `${1 + typeof t1 ** t2 ** t1} world`; ->`${1 + typeof t1 ** t2 ** t1} world` : `${number} world` +>`${1 + typeof t1 ** t2 ** t1} world` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -72,7 +72,7 @@ var s; >t1 : number `${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; ->`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world` : `${number}${number} world` +>`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -87,7 +87,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; ->`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world` : `${number}${number} world` +>`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -104,7 +104,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; ->`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world` : `${number}${number} world` +>`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -121,7 +121,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; ->`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world` : `${number}${number} world` +>`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -138,7 +138,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; ->`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world` : `${number}${number} world` +>`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -153,7 +153,7 @@ var s; >t1 : number `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; ->`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world` : `${number}${number} world` +>`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number @@ -172,7 +172,7 @@ var s; >t1 : number `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; ->`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!` : `${number} hello world ${number} !!` +>`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!` : string >-t1 ** t2 - t1 : number >-t1 ** t2 : number >-t1 : number @@ -187,7 +187,7 @@ var s; >t1 : number `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; ->`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!` : `${number} hello world ${number} !!` +>`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!` : string >-++t1 ** t2 - t1 : number >-++t1 ** t2 : number >-++t1 : number @@ -204,7 +204,7 @@ var s; >t1 : number `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; ->`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!` : `${number} hello world ${number} !!` +>`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!` : string >-t1++ ** t2 - t1 : number >-t1++ ** t2 : number >-t1++ : number @@ -221,7 +221,7 @@ var s; >t1 : number `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; ->`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!` : `${number} hello world ${number} !!` +>`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!` : string >!t1 ** t2 ** --t1 : number >!t1 : boolean >t1 : number @@ -238,7 +238,7 @@ var s; >t1 : number `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; ->`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!` : string >typeof t1 ** t2 ** t1 : number >typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >t1 : number @@ -253,7 +253,7 @@ var s; >t1 : number `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; ->`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!` : `${number} hello world ${number} !!` +>`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!` : string >1 + typeof t1 ** t2 ** t1 : number >1 : 1 >typeof t1 ** t2 ** t1 : number diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.types b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.types index de61a9beb2bcd..1958e478d734b 100644 --- a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.types +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.types @@ -3,55 +3,55 @@ var a = 1 ** `${ 3 }`; >a : number >1 ** `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 ** `2${ 3 }`; >b : number >1 ** `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 ** `${ 3 }4`; >c : number >1 ** `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 ** `2${ 3 }4`; >d : number >1 ** `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` ** 5; >e : number >`${ 3 }` ** 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` ** 5; >f : number >`2${ 3 }` ** 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` ** 5; >g : number >`${ 3 }4` ** 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` ** 5; >h : number >`2${ 3 }4` ** 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -62,25 +62,25 @@ var k = 10; k **= `${ 3 }`; >k **= `${ 3 }` : number >k : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 k **= `2${ 3 }`; >k **= `2${ 3 }` : number >k : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 k **= `2${ 3 }4`; >k **= `2${ 3 }4` : number >k : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 k **= `2${ 3 }4`; >k **= `2${ 3 }4` : number >k : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.types b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.types index eaca3660157fc..6db21a24ce38c 100644 --- a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.types +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.types @@ -3,55 +3,55 @@ var a = 1 ** `${ 3 }`; >a : number >1 ** `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 ** `2${ 3 }`; >b : number >1 ** `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 ** `${ 3 }4`; >c : number >1 ** `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 ** `2${ 3 }4`; >d : number >1 ** `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` ** 5; >e : number >`${ 3 }` ** 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` ** 5; >f : number >`2${ 3 }` ** 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` ** 5; >g : number >`${ 3 }4` ** 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` ** 5; >h : number >`2${ 3 }4` ** 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -62,24 +62,24 @@ var k = 10; k **= `${ 3 }`; >k **= `${ 3 }` : number >k : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 k **= `2${ 3 }`; >k **= `2${ 3 }` : number >k : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 k **= `2${ 3 }4`; >k **= `2${ 3 }4` : number >k : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 kj **= `2${ 3 }4`; >kj **= `2${ 3 }4` : number >kj : any ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types index 2683bb3cc85ab..b04e37ec43eae 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types @@ -19,7 +19,7 @@ import(getSpecifier()); var p0 = import(`${directory}\\${moduleFile}`); >p0 : Promise >import(`${directory}\\${moduleFile}`) : Promise ->`${directory}\\${moduleFile}` : `${string}\\${number}` +>`${directory}\\${moduleFile}` : string >directory : string >moduleFile : number diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types index 9592dc870d318..bfe4d8d955641 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types @@ -23,7 +23,7 @@ declare const moduleFile: number; import(`${directory}\\${moduleFile}`); >import(`${directory}\\${moduleFile}`) : Promise ->`${directory}\\${moduleFile}` : `${string}\\${number}` +>`${directory}\\${moduleFile}` : string >directory : string >moduleFile : number @@ -94,7 +94,7 @@ var p3: Promise = import(j=getSpecifier()); >getSpecifier : () => string function * loadModule(directories: string[]) { ->loadModule : (directories: string[]) => Generator<`${string}\\moduleFile`, void, string> +>loadModule : (directories: string[]) => Generator >directories : string[] for (const directory of directories) { @@ -102,14 +102,14 @@ function * loadModule(directories: string[]) { >directories : string[] const path = `${directory}\\moduleFile`; ->path : `${string}\\moduleFile` ->`${directory}\\moduleFile` : `${string}\\moduleFile` +>path : string +>`${directory}\\moduleFile` : string >directory : string import(yield path); >import(yield path) : Promise >yield path : any ->path : `${string}\\moduleFile` +>path : string } } diff --git a/tests/baselines/reference/importCallExpressionShouldNotGetParen.types b/tests/baselines/reference/importCallExpressionShouldNotGetParen.types index b9c3cde9b89b9..6c45228344687 100644 --- a/tests/baselines/reference/importCallExpressionShouldNotGetParen.types +++ b/tests/baselines/reference/importCallExpressionShouldNotGetParen.types @@ -7,7 +7,7 @@ import(`./locales/${localeName}.js`).then(bar => { >import(`./locales/${localeName}.js`).then(bar => { let x = bar;}) : Promise >import(`./locales/${localeName}.js`).then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >import(`./locales/${localeName}.js`) : Promise ->`./locales/${localeName}.js` : "./locales/zh-CN.js" +>`./locales/${localeName}.js` : string >localeName : "zh-CN" >then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >bar => { let x = bar;} : (bar: any) => void diff --git a/tests/baselines/reference/inferenceErasedSignatures.types b/tests/baselines/reference/inferenceErasedSignatures.types index 018a06971100a..84f64ffda5682 100644 --- a/tests/baselines/reference/inferenceErasedSignatures.types +++ b/tests/baselines/reference/inferenceErasedSignatures.types @@ -36,7 +36,7 @@ class SomeClass extends SomeAbstractClass { >context : number return `${context}`; ->`${context}` : `${number}` +>`${context}` : string >context : number } } diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types index 8acfa55570242..08b1ed6844442 100644 --- a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types @@ -18,21 +18,21 @@ const b = tag`123 ${100}` >b : any >tag`123 ${100}` : any >tag : (str: any, ...args: any[]) => any ->`123 ${100}` : "123 100" +>`123 ${100}` : string >100 : 100 const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; >x : any >tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any >tag : (str: any, ...args: any[]) => any ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld" +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate ->y : "hello} 100 traordinary 200 wonderful 300 world" ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "hello} 100 traordinary 200 wonderful 300 world" +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 @@ -47,97 +47,97 @@ const a1 = tag`${ 100 }\0` // \0 >a1 : any >tag`${ 100 }\0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\0` : "100\0" +>`${ 100 }\0` : string >100 : 100 const a2 = tag`${ 100 }\00` // \\00 >a2 : any >tag`${ 100 }\00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\00` : "100\\00" +>`${ 100 }\00` : string >100 : 100 const a3 = tag`${ 100 }\u` // \\u >a3 : any >tag`${ 100 }\u` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u` : "100\\u" +>`${ 100 }\u` : string >100 : 100 const a4 = tag`${ 100 }\u0` // \\u0 >a4 : any >tag`${ 100 }\u0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0` : "100\\u0" +>`${ 100 }\u0` : string >100 : 100 const a5 = tag`${ 100 }\u00` // \\u00 >a5 : any >tag`${ 100 }\u00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u00` : "100\\u00" +>`${ 100 }\u00` : string >100 : 100 const a6 = tag`${ 100 }\u000` // \\u000 >a6 : any >tag`${ 100 }\u000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u000` : "100\\u000" +>`${ 100 }\u000` : string >100 : 100 const a7 = tag`${ 100 }\u0000` // \u0000 >a7 : any >tag`${ 100 }\u0000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0000` : "100\0" +>`${ 100 }\u0000` : string >100 : 100 const a8 = tag`${ 100 }\u{` // \\u{ >a8 : any >tag`${ 100 }\u{` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{` : "100\\u{" +>`${ 100 }\u{` : string >100 : 100 const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF >a9 : any >tag`${ 100 }\u{10FFFF}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{10FFFF}` : "100􏿿" +>`${ 100 }\u{10FFFF}` : string >100 : 100 const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 >a10 : any >tag`${ 100 }\u{1f622` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622` : "100\\u{1f622" +>`${ 100 }\u{1f622` : string >100 : 100 const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} >a11 : any >tag`${ 100 }\u{1f622}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622}` : "100😢" +>`${ 100 }\u{1f622}` : string >100 : 100 const a12 = tag`${ 100 }\x` // \\x >a12 : any >tag`${ 100 }\x` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x` : "100\\x" +>`${ 100 }\x` : string >100 : 100 const a13 = tag`${ 100 }\x0` // \\x0 >a13 : any >tag`${ 100 }\x0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x0` : "100\\x0" +>`${ 100 }\x0` : string >100 : 100 const a14 = tag`${ 100 }\x00` // \x00 >a14 : any >tag`${ 100 }\x00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x00` : "100\0" +>`${ 100 }\x00` : string >100 : 100 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types index 8acfa55570242..08b1ed6844442 100644 --- a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types @@ -18,21 +18,21 @@ const b = tag`123 ${100}` >b : any >tag`123 ${100}` : any >tag : (str: any, ...args: any[]) => any ->`123 ${100}` : "123 100" +>`123 ${100}` : string >100 : 100 const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; >x : any >tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any >tag : (str: any, ...args: any[]) => any ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld" +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate ->y : "hello} 100 traordinary 200 wonderful 300 world" ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "hello} 100 traordinary 200 wonderful 300 world" +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 @@ -47,97 +47,97 @@ const a1 = tag`${ 100 }\0` // \0 >a1 : any >tag`${ 100 }\0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\0` : "100\0" +>`${ 100 }\0` : string >100 : 100 const a2 = tag`${ 100 }\00` // \\00 >a2 : any >tag`${ 100 }\00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\00` : "100\\00" +>`${ 100 }\00` : string >100 : 100 const a3 = tag`${ 100 }\u` // \\u >a3 : any >tag`${ 100 }\u` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u` : "100\\u" +>`${ 100 }\u` : string >100 : 100 const a4 = tag`${ 100 }\u0` // \\u0 >a4 : any >tag`${ 100 }\u0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0` : "100\\u0" +>`${ 100 }\u0` : string >100 : 100 const a5 = tag`${ 100 }\u00` // \\u00 >a5 : any >tag`${ 100 }\u00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u00` : "100\\u00" +>`${ 100 }\u00` : string >100 : 100 const a6 = tag`${ 100 }\u000` // \\u000 >a6 : any >tag`${ 100 }\u000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u000` : "100\\u000" +>`${ 100 }\u000` : string >100 : 100 const a7 = tag`${ 100 }\u0000` // \u0000 >a7 : any >tag`${ 100 }\u0000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0000` : "100\0" +>`${ 100 }\u0000` : string >100 : 100 const a8 = tag`${ 100 }\u{` // \\u{ >a8 : any >tag`${ 100 }\u{` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{` : "100\\u{" +>`${ 100 }\u{` : string >100 : 100 const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF >a9 : any >tag`${ 100 }\u{10FFFF}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{10FFFF}` : "100􏿿" +>`${ 100 }\u{10FFFF}` : string >100 : 100 const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 >a10 : any >tag`${ 100 }\u{1f622` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622` : "100\\u{1f622" +>`${ 100 }\u{1f622` : string >100 : 100 const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} >a11 : any >tag`${ 100 }\u{1f622}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622}` : "100😢" +>`${ 100 }\u{1f622}` : string >100 : 100 const a12 = tag`${ 100 }\x` // \\x >a12 : any >tag`${ 100 }\x` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x` : "100\\x" +>`${ 100 }\x` : string >100 : 100 const a13 = tag`${ 100 }\x0` // \\x0 >a13 : any >tag`${ 100 }\x0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x0` : "100\\x0" +>`${ 100 }\x0` : string >100 : 100 const a14 = tag`${ 100 }\x00` // \x00 >a14 : any >tag`${ 100 }\x00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x00` : "100\0" +>`${ 100 }\x00` : string >100 : 100 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types index 8acfa55570242..08b1ed6844442 100644 --- a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types @@ -18,21 +18,21 @@ const b = tag`123 ${100}` >b : any >tag`123 ${100}` : any >tag : (str: any, ...args: any[]) => any ->`123 ${100}` : "123 100" +>`123 ${100}` : string >100 : 100 const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; >x : any >tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any >tag : (str: any, ...args: any[]) => any ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld" +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate ->y : "hello} 100 traordinary 200 wonderful 300 world" ->`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : "hello} 100 traordinary 200 wonderful 300 world" +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string >100 : 100 >200 : 200 >300 : 300 @@ -47,97 +47,97 @@ const a1 = tag`${ 100 }\0` // \0 >a1 : any >tag`${ 100 }\0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\0` : "100\0" +>`${ 100 }\0` : string >100 : 100 const a2 = tag`${ 100 }\00` // \\00 >a2 : any >tag`${ 100 }\00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\00` : "100\\00" +>`${ 100 }\00` : string >100 : 100 const a3 = tag`${ 100 }\u` // \\u >a3 : any >tag`${ 100 }\u` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u` : "100\\u" +>`${ 100 }\u` : string >100 : 100 const a4 = tag`${ 100 }\u0` // \\u0 >a4 : any >tag`${ 100 }\u0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0` : "100\\u0" +>`${ 100 }\u0` : string >100 : 100 const a5 = tag`${ 100 }\u00` // \\u00 >a5 : any >tag`${ 100 }\u00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u00` : "100\\u00" +>`${ 100 }\u00` : string >100 : 100 const a6 = tag`${ 100 }\u000` // \\u000 >a6 : any >tag`${ 100 }\u000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u000` : "100\\u000" +>`${ 100 }\u000` : string >100 : 100 const a7 = tag`${ 100 }\u0000` // \u0000 >a7 : any >tag`${ 100 }\u0000` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u0000` : "100\0" +>`${ 100 }\u0000` : string >100 : 100 const a8 = tag`${ 100 }\u{` // \\u{ >a8 : any >tag`${ 100 }\u{` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{` : "100\\u{" +>`${ 100 }\u{` : string >100 : 100 const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF >a9 : any >tag`${ 100 }\u{10FFFF}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{10FFFF}` : "100􏿿" +>`${ 100 }\u{10FFFF}` : string >100 : 100 const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 >a10 : any >tag`${ 100 }\u{1f622` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622` : "100\\u{1f622" +>`${ 100 }\u{1f622` : string >100 : 100 const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} >a11 : any >tag`${ 100 }\u{1f622}` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\u{1f622}` : "100😢" +>`${ 100 }\u{1f622}` : string >100 : 100 const a12 = tag`${ 100 }\x` // \\x >a12 : any >tag`${ 100 }\x` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x` : "100\\x" +>`${ 100 }\x` : string >100 : 100 const a13 = tag`${ 100 }\x0` // \\x0 >a13 : any >tag`${ 100 }\x0` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x0` : "100\\x0" +>`${ 100 }\x0` : string >100 : 100 const a14 = tag`${ 100 }\x00` // \x00 >a14 : any >tag`${ 100 }\x00` : any >tag : (str: any, ...args: any[]) => any ->`${ 100 }\x00` : "100\0" +>`${ 100 }\x00` : string >100 : 100 diff --git a/tests/baselines/reference/jsDeclarationsExportedClassAliases.types b/tests/baselines/reference/jsDeclarationsExportedClassAliases.types index 9a2369a46c07f..c9be4e46037d6 100644 --- a/tests/baselines/reference/jsDeclarationsExportedClassAliases.types +++ b/tests/baselines/reference/jsDeclarationsExportedClassAliases.types @@ -28,7 +28,7 @@ class FancyError extends Error { super(`error with status ${status}`); >super(`error with status ${status}`) : void >super : ErrorConstructor ->`error with status ${status}` : `error with status ${any}` +>`error with status ${status}` : string >status : any } } diff --git a/tests/baselines/reference/jsdocTypeFromChainedAssignment2.types b/tests/baselines/reference/jsdocTypeFromChainedAssignment2.types index 9950788aa5743..7bbcb5becabcb 100644 --- a/tests/baselines/reference/jsdocTypeFromChainedAssignment2.types +++ b/tests/baselines/reference/jsdocTypeFromChainedAssignment2.types @@ -20,17 +20,17 @@ mod.g('also no') >'also no' : "also no" mod.h(0) ->mod.h(0) : `hi, ${string}!` ->mod.h : (mom: string) => `hi, ${string}!` +>mod.h(0) : string +>mod.h : (mom: string) => string >mod : typeof mod ->h : (mom: string) => `hi, ${string}!` +>h : (mom: string) => string >0 : 0 mod.i(1) ->mod.i(1) : `hi, ${string}!` ->mod.i : (mom: string) => `hi, ${string}!` +>mod.i(1) : string +>mod.i : (mom: string) => string >mod : typeof mod ->i : (mom: string) => `hi, ${string}!` +>i : (mom: string) => string >1 : 1 === tests/cases/conformance/jsdoc/mod.js === @@ -55,24 +55,24 @@ exports.f = exports.g = function fg(n) { } /** @param {string} mom */ module.exports.h = module.exports.i = function hi(mom) { ->module.exports.h = module.exports.i = function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => `hi, ${string}!` ->module.exports.h : (mom: string) => `hi, ${string}!` +>module.exports.h = module.exports.i = function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => string +>module.exports.h : (mom: string) => string >module.exports : typeof import("tests/cases/conformance/jsdoc/mod") >module : { "\"tests/cases/conformance/jsdoc/mod\"": typeof import("tests/cases/conformance/jsdoc/mod"); } >exports : typeof import("tests/cases/conformance/jsdoc/mod") ->h : (mom: string) => `hi, ${string}!` ->module.exports.i = function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => `hi, ${string}!` ->module.exports.i : (mom: string) => `hi, ${string}!` +>h : (mom: string) => string +>module.exports.i = function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => string +>module.exports.i : (mom: string) => string >module.exports : typeof import("tests/cases/conformance/jsdoc/mod") >module : { "\"tests/cases/conformance/jsdoc/mod\"": typeof import("tests/cases/conformance/jsdoc/mod"); } >exports : typeof import("tests/cases/conformance/jsdoc/mod") ->i : (mom: string) => `hi, ${string}!` ->function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => `hi, ${string}!` ->hi : (mom: string) => `hi, ${string}!` +>i : (mom: string) => string +>function hi(mom) { return `hi, ${mom}!`;} : (mom: string) => string +>hi : (mom: string) => string >mom : string return `hi, ${mom}!`; ->`hi, ${mom}!` : `hi, ${string}!` +>`hi, ${mom}!` : string >mom : string } diff --git a/tests/baselines/reference/noImplicitSymbolToString.types b/tests/baselines/reference/noImplicitSymbolToString.types index e4ea9afa516d1..c21c0e07bfded 100644 --- a/tests/baselines/reference/noImplicitSymbolToString.types +++ b/tests/baselines/reference/noImplicitSymbolToString.types @@ -9,8 +9,8 @@ let str = "hello "; >"hello " : "hello " const templateStr = `hello ${symbol}`; ->templateStr : `hello ${string}` ->`hello ${symbol}` : `hello ${string}` +>templateStr : string +>`hello ${symbol}` : string >symbol : symbol const appendStr = "hello " + symbol; @@ -31,8 +31,8 @@ let symbolUnionString!: symbol | string; >symbolUnionString : string | symbol const templateStrUnion = `union with number ${symbolUnionNumber} and union with string ${symbolUnionString}`; ->templateStrUnion : `union with number ${string} and union with string ${string}` ->`union with number ${symbolUnionNumber} and union with string ${symbolUnionString}` : `union with number ${string} and union with string ${string}` +>templateStrUnion : string +>`union with number ${symbolUnionNumber} and union with string ${symbolUnionString}` : string >symbolUnionNumber : number | symbol >symbolUnionString : string | symbol diff --git a/tests/baselines/reference/parenthesizedContexualTyping3.types b/tests/baselines/reference/parenthesizedContexualTyping3.types index 2acc75d368e6e..d43cd213b5697 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping3.types +++ b/tests/baselines/reference/parenthesizedContexualTyping3.types @@ -37,7 +37,7 @@ var a = tempFun `${ x => x } ${ 10 }` >a : number >tempFun `${ x => x } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ x => x } ${ 10 }` : `${string} 10` +>`${ x => x } ${ 10 }` : string >x => x : (x: number) => number >x : number >x : number @@ -47,7 +47,7 @@ var b = tempFun `${ (x => x) } ${ 10 }` >b : number >tempFun `${ (x => x) } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ (x => x) } ${ 10 }` : `${string} 10` +>`${ (x => x) } ${ 10 }` : string >(x => x) : (x: number) => number >x => x : (x: number) => number >x : number @@ -58,7 +58,7 @@ var c = tempFun `${ ((x => x)) } ${ 10 }` >c : number >tempFun `${ ((x => x)) } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ ((x => x)) } ${ 10 }` : `${string} 10` +>`${ ((x => x)) } ${ 10 }` : string >((x => x)) : (x: number) => number >(x => x) : (x: number) => number >x => x : (x: number) => number @@ -70,7 +70,7 @@ var d = tempFun `${ x => x } ${ x => x } ${ 10 }` >d : number >tempFun `${ x => x } ${ x => x } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ x => x } ${ x => x } ${ 10 }` : `${string} ${string} 10` +>`${ x => x } ${ x => x } ${ 10 }` : string >x => x : (x: number) => number >x : number >x : number @@ -83,7 +83,7 @@ var e = tempFun `${ x => x } ${ (x => x) } ${ 10 }` >e : number >tempFun `${ x => x } ${ (x => x) } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ x => x } ${ (x => x) } ${ 10 }` : `${string} ${string} 10` +>`${ x => x } ${ (x => x) } ${ 10 }` : string >x => x : (x: number) => number >x : number >x : number @@ -97,7 +97,7 @@ var f = tempFun `${ x => x } ${ ((x => x)) } ${ 10 }` >f : number >tempFun `${ x => x } ${ ((x => x)) } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ x => x } ${ ((x => x)) } ${ 10 }` : `${string} ${string} 10` +>`${ x => x } ${ ((x => x)) } ${ 10 }` : string >x => x : (x: number) => number >x : number >x : number @@ -112,7 +112,7 @@ var g = tempFun `${ (x => x) } ${ (((x => x))) } ${ 10 }` >g : number >tempFun `${ (x => x) } ${ (((x => x))) } ${ 10 }` : number >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ (x => x) } ${ (((x => x))) } ${ 10 }` : `${string} ${string} 10` +>`${ (x => x) } ${ (((x => x))) } ${ 10 }` : string >(x => x) : (x: number) => number >x => x : (x: number) => number >x : number @@ -129,7 +129,7 @@ var h = tempFun `${ (x => x) } ${ (((x => x))) } ${ undefined }` >h : any >tempFun `${ (x => x) } ${ (((x => x))) } ${ undefined }` : any >tempFun : { (tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; (tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => T, x: T): T; } ->`${ (x => x) } ${ (((x => x))) } ${ undefined }` : `${string} ${string} undefined` +>`${ (x => x) } ${ (((x => x))) } ${ undefined }` : string >(x => x) : (x: any) => any >x => x : (x: any) => any >x : any diff --git a/tests/baselines/reference/privateNameFieldCallExpression.types b/tests/baselines/reference/privateNameFieldCallExpression.types index cdcf01d0e5ce7..a103c2230b4d6 100644 --- a/tests/baselines/reference/privateNameFieldCallExpression.types +++ b/tests/baselines/reference/privateNameFieldCallExpression.types @@ -73,7 +73,7 @@ class A { >this.#fieldFunc2`head${1}middle${2}tail` : void >this.#fieldFunc2 : (a: any, ...b: any[]) => void >this : this ->`head${1}middle${2}tail` : "head1middle2tail" +>`head${1}middle${2}tail` : string >1 : 1 >2 : 2 @@ -84,7 +84,7 @@ class A { >this.getInstance : () => A >this : this >getInstance : () => A ->`test${1}and${2}` : "test1and2" +>`test${1}and${2}` : string >1 : 1 >2 : 2 } diff --git a/tests/baselines/reference/propertyOverridesAccessors2.types b/tests/baselines/reference/propertyOverridesAccessors2.types index 8ea1f4449c57f..b87387d052a98 100644 --- a/tests/baselines/reference/propertyOverridesAccessors2.types +++ b/tests/baselines/reference/propertyOverridesAccessors2.types @@ -13,7 +13,7 @@ class Base { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->`x was set to ${value}` : `x was set to ${number}` +>`x was set to ${value}` : string >value : number } diff --git a/tests/baselines/reference/recursiveTypeReferences1.types b/tests/baselines/reference/recursiveTypeReferences1.types index 4008c9286ac88..8259f392c5ba8 100644 --- a/tests/baselines/reference/recursiveTypeReferences1.types +++ b/tests/baselines/reference/recursiveTypeReferences1.types @@ -445,7 +445,7 @@ function parse(node: Tree, index: number[] = []): HTMLUListElement { >'a' : "a" >{ href: `#${el.id}`, rel: 'noopener', 'data-index': idx.join('.') } : { href: string; rel: string; 'data-index': string; } >href : string ->`#${el.id}` : `#${string}` +>`#${el.id}` : string >el.id : string >el : HTMLHeadingElement >id : string diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt index 21293d7c84e6c..4137661f0bef9 100644 --- a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts(1,5): error TS2322: Type '"AB\nC"' is not assignable to type '"AB\r\nC"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts(3,5): error TS2322: Type 'string' is not assignable to type '"DE\nF"'. -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts (1 errors) ==== +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts (2 errors) ==== let abc: "AB\r\nC" = `AB ~~~ !!! error TS2322: Type '"AB\nC"' is not assignable to type '"AB\r\nC"'. C`; - let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; \ No newline at end of file + let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '"DE\nF"'. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.types b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.types index 912ab642767ae..c8dcf901e534b 100644 --- a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.types +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.types @@ -6,6 +6,6 @@ let abc: "AB\r\nC" = `AB C`; let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; >de_NEWLINE_f : "DE\nF" ->`DE${"\n"}F` : "DE\nF" +>`DE${"\n"}F` : string >"\n" : "\n" diff --git a/tests/baselines/reference/taggedTemplateChain.types b/tests/baselines/reference/taggedTemplateChain.types index 510f0846e4895..9690fc22f6991 100644 --- a/tests/baselines/reference/taggedTemplateChain.types +++ b/tests/baselines/reference/taggedTemplateChain.types @@ -10,6 +10,6 @@ a?.`b`; a?.`b${1}c`; >a?.`b${1}c` : any >a : any ->`b${1}c` : "b1c" +>`b${1}c` : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplateContextualTyping1.types b/tests/baselines/reference/taggedTemplateContextualTyping1.types index 09e05c6570095..84af70b5b88cd 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping1.types +++ b/tests/baselines/reference/taggedTemplateContextualTyping1.types @@ -33,7 +33,7 @@ function tempTag1(...rest: any[]): T { tempTag1 `${ x => { x(undefined); return x; } }${ 10 }`; >tempTag1 `${ x => { x(undefined); return x; } }${ 10 }` : 10 >tempTag1 : { (templateStrs: TemplateStringsArray, f: FuncType, x: T): T; (templateStrs: TemplateStringsArray, f: FuncType, h: FuncType, x: T): T; } ->`${ x => { x(undefined); return x; } }${ 10 }` : `${string}10` +>`${ x => { x(undefined); return x; } }${ 10 }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : number @@ -45,7 +45,7 @@ tempTag1 `${ x => { x(undefined); return x; } }${ 10 } tempTag1 `${ x => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ 10 }`; >tempTag1 `${ x => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ 10 }` : 10 >tempTag1 : { (templateStrs: TemplateStringsArray, f: FuncType, x: T): T; (templateStrs: TemplateStringsArray, f: FuncType, h: FuncType, x: T): T; } ->`${ x => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ 10 }` : `${string}${string}10` +>`${ x => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ 10 }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : number @@ -63,7 +63,7 @@ tempTag1 `${ x => { x(undefined); return x; } }${ y => tempTag1 `${ x => { x(undefined); return x; } }${ (y: (p: T) => T) => { y(undefined); return y } }${ undefined }`; >tempTag1 `${ x => { x(undefined); return x; } }${ (y: (p: T) => T) => { y(undefined); return y } }${ undefined }` : any >tempTag1 : { (templateStrs: TemplateStringsArray, f: FuncType, x: T): T; (templateStrs: TemplateStringsArray, f: FuncType, h: FuncType, x: T): T; } ->`${ x => { x(undefined); return x; } }${ (y: (p: T) => T) => { y(undefined); return y } }${ undefined }` : `${string}${string}undefined` +>`${ x => { x(undefined); return x; } }${ (y: (p: T) => T) => { y(undefined); return y } }${ undefined }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : number @@ -82,7 +82,7 @@ tempTag1 `${ x => { x(undefined); return x; } }${ (y: tempTag1 `${ (x: (p: T) => T) => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ undefined }`; >tempTag1 `${ (x: (p: T) => T) => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ undefined }` : any >tempTag1 : { (templateStrs: TemplateStringsArray, f: FuncType, x: T): T; (templateStrs: TemplateStringsArray, f: FuncType, h: FuncType, x: T): T; } ->`${ (x: (p: T) => T) => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ undefined }` : `${string}${string}undefined` +>`${ (x: (p: T) => T) => { x(undefined); return x; } }${ y => { y(undefined); return y; } }${ undefined }` : string >(x: (p: T) => T) => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >p : T diff --git a/tests/baselines/reference/taggedTemplateContextualTyping2.types b/tests/baselines/reference/taggedTemplateContextualTyping2.types index a84e76263e978..d182bb526a882 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping2.types +++ b/tests/baselines/reference/taggedTemplateContextualTyping2.types @@ -39,7 +39,7 @@ function tempTag2(...rest: any[]): any { tempTag2 `${ x => { x(undefined); return x; } }${ 0 }`; >tempTag2 `${ x => { x(undefined); return x; } }${ 0 }` : number >tempTag2 : { (templateStrs: TemplateStringsArray, f: FuncType1, x: number): number; (templateStrs: TemplateStringsArray, f: FuncType2, h: FuncType2, x: string): string; } ->`${ x => { x(undefined); return x; } }${ 0 }` : `${string}0` +>`${ x => { x(undefined); return x; } }${ 0 }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : number @@ -51,7 +51,7 @@ tempTag2 `${ x => { x(undefined); return x; } }${ 0 }`; tempTag2 `${ x => { x(undefined); return x; } }${ y => { y(null); return y; } }${ "hello" }`; >tempTag2 `${ x => { x(undefined); return x; } }${ y => { y(null); return y; } }${ "hello" }` : string >tempTag2 : { (templateStrs: TemplateStringsArray, f: FuncType1, x: number): number; (templateStrs: TemplateStringsArray, f: FuncType2, h: FuncType2, x: string): string; } ->`${ x => { x(undefined); return x; } }${ y => { y(null); return y; } }${ "hello" }` : `${string}${string}hello` +>`${ x => { x(undefined); return x; } }${ y => { y(null); return y; } }${ "hello" }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : string @@ -69,7 +69,7 @@ tempTag2 `${ x => { x(undefined); return x; } }${ y => { y { x(undefined); return x; } }${ undefined }${ "hello" }`; >tempTag2 `${ x => { x(undefined); return x; } }${ undefined }${ "hello" }` : string >tempTag2 : { (templateStrs: TemplateStringsArray, f: FuncType1, x: number): number; (templateStrs: TemplateStringsArray, f: FuncType2, h: FuncType2, x: string): string; } ->`${ x => { x(undefined); return x; } }${ undefined }${ "hello" }` : `${string}undefinedhello` +>`${ x => { x(undefined); return x; } }${ undefined }${ "hello" }` : string >x => { x(undefined); return x; } : (x: (p: T) => T) => (p: T) => T >x : (p: T) => T >x(undefined) : string diff --git a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types index ee58cfcd1db69..e42bf52c005d4 100644 --- a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types +++ b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.types @@ -7,6 +7,6 @@ function f(...args: any[]) { f `\x0D${ "Interrupted CRLF" }\x0A`; >f `\x0D${ "Interrupted CRLF" }\x0A` : void >f : (...args: any[]) => void ->`\x0D${ "Interrupted CRLF" }\x0A` : "\rInterrupted CRLF\n" +>`\x0D${ "Interrupted CRLF" }\x0A` : string >"Interrupted CRLF" : "Interrupted CRLF" diff --git a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types index 256d9d06b473d..1b5fefe9c9ee0 100644 --- a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types +++ b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapesES6.types @@ -7,6 +7,6 @@ function f(...args: any[]) { f `\x0D${ "Interrupted CRLF" }\x0A`; >f `\x0D${ "Interrupted CRLF" }\x0A` : void >f : (...args: any[]) => void ->`\x0D${ "Interrupted CRLF" }\x0A` : "\rInterrupted CRLF\n" +>`\x0D${ "Interrupted CRLF" }\x0A` : string >"Interrupted CRLF" : "Interrupted CRLF" diff --git a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types index 32efe026183b4..d4b77f95c4fe8 100644 --- a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types +++ b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.ts === `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` : "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 >" " : " " >" " : " " >" " : " " diff --git a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types index b75054d77d147..dc6455c17a917 100644 --- a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.types @@ -8,7 +8,7 @@ function f(...x: any[]) { 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` >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` : "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 >" " : " " >" " : " " >" " : " " diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types index 91462bef19b72..114b37d1cf2e2 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types @@ -28,7 +28,7 @@ function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; >someGenerics1a `${3}` : void >someGenerics1a : (n: T, m: number) => void ->`${3}` : "3" +>`${3}` : string >3 : 3 function someGenerics1b(n: TemplateStringsArray, m: U) { } @@ -39,7 +39,7 @@ function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; >someGenerics1b `${3}` : void >someGenerics1b : (n: TemplateStringsArray, m: U) => void ->`${3}` : "3" +>`${3}` : string >3 : 3 // Generic tag with argument of function type whose parameter is of type parameter type @@ -111,7 +111,7 @@ function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void someGenerics4 `${4}${ () => null }`; >someGenerics4 `${4}${ () => null }` : void >someGenerics4 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${4}${ () => null }` : `4${string}` +>`${4}${ () => null }` : string >4 : 4 >() => null : () => any >null : null @@ -127,7 +127,7 @@ someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; >someGenerics4 `${ null }${ null }` : void >someGenerics4 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${ null }${ null }` : "nullnull" +>`${ null }${ null }` : string >null : null >null : null @@ -142,7 +142,7 @@ function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void someGenerics5 `${ 4 } ${ () => null }`; >someGenerics5 `${ 4 } ${ () => null }` : void >someGenerics5 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${ 4 } ${ () => null }` : `4 ${string}` +>`${ 4 } ${ () => null }` : string >4 : 4 >() => null : () => any >null : null @@ -158,7 +158,7 @@ someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; >someGenerics5 `${null}${null}` : void >someGenerics5 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${null}${null}` : "nullnull" +>`${null}${null}` : string >null : null >null : null @@ -285,7 +285,7 @@ var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; >x `${null}${null}${null}` : void >x : (strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void ->`${null}${null}${null}` : "nullnullnull" +>`${null}${null}${null}` : string >null : null >null : null >null : null @@ -305,7 +305,7 @@ var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; >a9a : string >someGenerics9 `${ '' }${ 0 }${ [] }` : "" >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ '' }${ 0 }${ [] }` : `0${string}` +>`${ '' }${ 0 }${ [] }` : string >'' : "" >0 : 0 >[] : undefined[] @@ -333,7 +333,7 @@ var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: >a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; } >someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; } >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : `undefined${string}${string}` +>`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : string >undefined : undefined >{ x: 6, z: new Date() } : { x: number; z: Date; } >x : number @@ -378,7 +378,7 @@ var a = someGenerics9 `${ 7 }${ anyVar }${ 4 }`; >a : any >someGenerics9 `${ 7 }${ anyVar }${ 4 }` : any >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ 7 }${ anyVar }${ 4 }` : `7${any}4` +>`${ 7 }${ anyVar }${ 4 }` : string >7 : 7 >anyVar : any >4 : 4 @@ -391,7 +391,7 @@ var arr = someGenerics9 `${ [] }${ null }${ undefined }`; >arr : any[] >someGenerics9 `${ [] }${ null }${ undefined }` : any[] >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ [] }${ null }${ undefined }` : `${string}nullundefined` +>`${ [] }${ null }${ undefined }` : string >[] : undefined[] >null : null >undefined : undefined diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types index c0a42cb12b6d7..1953bde609932 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types @@ -28,7 +28,7 @@ function someGenerics1a(n: T, m: number) { } someGenerics1a `${3}`; >someGenerics1a `${3}` : void >someGenerics1a : (n: T, m: number) => void ->`${3}` : "3" +>`${3}` : string >3 : 3 function someGenerics1b(n: TemplateStringsArray, m: U) { } @@ -39,7 +39,7 @@ function someGenerics1b(n: TemplateStringsArray, m: U) { } someGenerics1b `${3}`; >someGenerics1b `${3}` : void >someGenerics1b : (n: TemplateStringsArray, m: U) => void ->`${3}` : "3" +>`${3}` : string >3 : 3 // Generic tag with argument of function type whose parameter is of type parameter type @@ -111,7 +111,7 @@ function someGenerics4(strs: TemplateStringsArray, n: T, f: (x: U) => void someGenerics4 `${4}${ () => null }`; >someGenerics4 `${4}${ () => null }` : void >someGenerics4 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${4}${ () => null }` : `4${string}` +>`${4}${ () => null }` : string >4 : 4 >() => null : () => any >null : null @@ -127,7 +127,7 @@ someGenerics4 `${''}${ () => 3 }`; someGenerics4 `${ null }${ null }`; >someGenerics4 `${ null }${ null }` : void >someGenerics4 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${ null }${ null }` : "nullnull" +>`${ null }${ null }` : string >null : null >null : null @@ -142,7 +142,7 @@ function someGenerics5(strs: TemplateStringsArray, n: T, f: (x: U) => void someGenerics5 `${ 4 } ${ () => null }`; >someGenerics5 `${ 4 } ${ () => null }` : void >someGenerics5 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${ 4 } ${ () => null }` : `4 ${string}` +>`${ 4 } ${ () => null }` : string >4 : 4 >() => null : () => any >null : null @@ -158,7 +158,7 @@ someGenerics5 `${ '' }${ () => 3 }`; someGenerics5 `${null}${null}`; >someGenerics5 `${null}${null}` : void >someGenerics5 : (strs: TemplateStringsArray, n: T, f: (x: U) => void) => void ->`${null}${null}` : "nullnull" +>`${null}${null}` : string >null : null >null : null @@ -285,7 +285,7 @@ var x = someGenerics8 `${ someGenerics7 }`; x `${null}${null}${null}`; >x `${null}${null}${null}` : void >x : (strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void ->`${null}${null}${null}` : "nullnullnull" +>`${null}${null}${null}` : string >null : null >null : null >null : null @@ -305,7 +305,7 @@ var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; >a9a : string >someGenerics9 `${ '' }${ 0 }${ [] }` : "" >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ '' }${ 0 }${ [] }` : `0${string}` +>`${ '' }${ 0 }${ [] }` : string >'' : "" >0 : 0 >[] : undefined[] @@ -333,7 +333,7 @@ var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: >a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; } >someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; } >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : `undefined${string}${string}` +>`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : string >undefined : undefined >{ x: 6, z: new Date() } : { x: number; z: Date; } >x : number @@ -378,7 +378,7 @@ var a = someGenerics9 `${ 7 }${ anyVar }${ 4 }`; >a : any >someGenerics9 `${ 7 }${ anyVar }${ 4 }` : any >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ 7 }${ anyVar }${ 4 }` : `7${any}4` +>`${ 7 }${ anyVar }${ 4 }` : string >7 : 7 >anyVar : any >4 : 4 @@ -391,7 +391,7 @@ var arr = someGenerics9 `${ [] }${ null }${ undefined }`; >arr : any[] >someGenerics9 `${ [] }${ null }${ undefined }` : any[] >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T ->`${ [] }${ null }${ undefined }` : `${string}nullundefined` +>`${ [] }${ null }${ undefined }` : string >[] : undefined[] >null : null >undefined : undefined diff --git a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types index 3ee924bd2553b..9f5543bd030c5 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types +++ b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types @@ -37,7 +37,7 @@ f({ ...{ x: 0 } })`x${f}x`; >{ x: 0 } : { x: number; } >x : number >0 : 0 ->`x${f}x` : `x${string}x` +>`x${f}x` : string >f : (_: any) => (..._: any[]) => string f({ ...{ x: 0 }, y: (() => 1)() })``; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types index aac6a9ef5198a..1e0acac274aec 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types @@ -32,7 +32,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -47,7 +47,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : I @@ -63,7 +63,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -77,7 +77,7 @@ f `abc`[0].member `abc${1}def${2}ghi`; >`abc` : "abc" >0 : 0 >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -87,12 +87,12 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -102,12 +102,12 @@ f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; >f `abc${ true }def${ true }ghi`["member"] : I >f `abc${ true }def${ true }ghi` : I >f : I ->`abc${ true }def${ true }ghi` : "abctruedeftrueghi" +>`abc${ true }def${ true }ghi` : string >true : true >true : true >"member" : "member" >member : I ->`abc${ 1 }def${ 2 }ghi` : "abc1def2ghi" +>`abc${ 1 }def${ 2 }ghi` : string >1 : 1 >2 : 2 @@ -123,7 +123,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : (x: string) => void >f : I >thisIsNotATag : (x: string) => void ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types index e1790c8933e05..39993e1367b6f 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types @@ -32,7 +32,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -47,7 +47,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : I @@ -63,7 +63,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -77,7 +77,7 @@ f `abc`[0].member `abc${1}def${2}ghi`; >`abc` : "abc" >0 : 0 >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -87,12 +87,12 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -102,12 +102,12 @@ f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; >f `abc${ true }def${ true }ghi`["member"] : I >f `abc${ true }def${ true }ghi` : I >f : I ->`abc${ true }def${ true }ghi` : "abctruedeftrueghi" +>`abc${ true }def${ true }ghi` : string >true : true >true : true >"member" : "member" >member : I ->`abc${ 1 }def${ 2 }ghi` : "abc1def2ghi" +>`abc${ 1 }def${ 2 }ghi` : string >1 : 1 >2 : 2 @@ -123,7 +123,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : (x: string) => void >f : I >thisIsNotATag : (x: string) => void ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types index 4fa74ad2d2bb2..7049ed1cbb746 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types @@ -30,7 +30,7 @@ var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >f `abc${ 0 }def`.member : new (s: string) => new (n: number) => new () => boolean >f `abc${ 0 }def` : I >f : I ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 >member : new (s: string) => new (n: number) => new () => boolean >"hello" : "hello" diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types index b953073a17ab4..365e824c76b08 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types @@ -30,7 +30,7 @@ var x = new new new f `abc${ 0 }def`.member("hello")(42) === true; >f `abc${ 0 }def`.member : new (s: string) => new (n: number) => new () => boolean >f `abc${ 0 }def` : I >f : I ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 >member : new (s: string) => new (n: number) => new () => boolean >"hello" : "hello" diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types index a051231230175..e809c1c274578 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types @@ -84,14 +84,14 @@ var v = foo `${1}`; // string >v : string >foo `${1}` : string >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var w = foo `${1}${2}`; // boolean >w : boolean >foo `${1}${2}` : boolean >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${2}` : "12" +>`${1}${2}` : string >1 : 1 >2 : 2 @@ -99,7 +99,7 @@ var x = foo `${1}${true}`; // boolean (with error) >x : never >foo `${1}${true}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${true}` : "1true" +>`${1}${true}` : string >1 : 1 >true : true @@ -107,7 +107,7 @@ var y = foo `${1}${"2"}`; // {} >y : {} >foo `${1}${"2"}` : {} >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${"2"}` : "12" +>`${1}${"2"}` : string >1 : 1 >"2" : "2" @@ -115,7 +115,7 @@ var z = foo `${1}${2}${3}`; // any (with error) >z : never >foo `${1}${2}${3}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${2}${3}` : "123" +>`${1}${2}${3}` : string >1 : 1 >2 : 2 >3 : 3 diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types index 1f84f29a2ee96..d9cb80eb05c80 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types @@ -84,14 +84,14 @@ var v = foo `${1}`; // string >v : string >foo `${1}` : string >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var w = foo `${1}${2}`; // boolean >w : boolean >foo `${1}${2}` : boolean >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${2}` : "12" +>`${1}${2}` : string >1 : 1 >2 : 2 @@ -99,7 +99,7 @@ var x = foo `${1}${true}`; // boolean (with error) >x : never >foo `${1}${true}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${true}` : "1true" +>`${1}${true}` : string >1 : 1 >true : true @@ -107,7 +107,7 @@ var y = foo `${1}${"2"}`; // {} >y : {} >foo `${1}${"2"}` : {} >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${"2"}` : "12" +>`${1}${"2"}` : string >1 : 1 >"2" : "2" @@ -115,7 +115,7 @@ var z = foo `${1}${2}${3}`; // any (with error) >z : never >foo `${1}${2}${3}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } ->`${1}${2}${3}` : "123" +>`${1}${2}${3}` : string >1 : 1 >2 : 2 >3 : 3 diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types index 1bfdf77919a84..d9bac7879d94d 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.types @@ -21,7 +21,7 @@ var a = foo1 `${1}`; >a : string >foo1 `${1}` : string >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var b = foo1([], 1); @@ -53,7 +53,7 @@ var c = foo2 `${1}`; >c : string >foo2 `${1}` : string >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var d = foo2([], 1); diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types index 4ae8b4ac37e98..68180a23d8f5f 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.types @@ -21,7 +21,7 @@ var a = foo1 `${1}`; >a : string >foo1 `${1}` : string >foo1 : { (strs: TemplateStringsArray, x: number): string; (strs: string[], x: number): number; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var b = foo1([], 1); @@ -53,7 +53,7 @@ var c = foo2 `${1}`; >c : string >foo2 `${1}` : string >foo2 : { (strs: string[], x: number): number; (strs: TemplateStringsArray, x: number): string; } ->`${1}` : "1" +>`${1}` : string >1 : 1 var d = foo2([], 1); diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types index 44fa1ad821ec9..138b2a162da61 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types @@ -18,7 +18,7 @@ var s: string = fn1 `${ undefined }`; >s : string >fn1 `${ undefined }` : string >fn1 : { (strs: TemplateStringsArray, s: string): string; (strs: TemplateStringsArray, n: number): number; } ->`${ undefined }` : "undefined" +>`${ undefined }` : string >undefined : undefined // No candidate overloads found @@ -48,7 +48,7 @@ var d1: Date = fn2 `${ 0 }${ undefined }`; // contextually typed >d1 : Date >fn2 `${ 0 }${ undefined }` : any >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ undefined }` : "0undefined" +>`${ 0 }${ undefined }` : string >0 : 0 >undefined : undefined @@ -56,7 +56,7 @@ var d2 = fn2 `${ 0 }${ undefined }`; // any >d2 : any >fn2 `${ 0 }${ undefined }` : any >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ undefined }` : "0undefined" +>`${ 0 }${ undefined }` : string >0 : 0 >undefined : undefined @@ -74,7 +74,7 @@ d2(); // no error (typed as any) fn2 `${ 0 }${ '' }`; // OK >fn2 `${ 0 }${ '' }` : "" >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ '' }` : "0" +>`${ 0 }${ '' }` : string >0 : 0 >'' : "" @@ -82,7 +82,7 @@ fn2 `${ 0 }${ '' }`; // OK fn2 `${ '' }${ 0 }`; // OK >fn2 `${ '' }${ 0 }` : number >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ '' }${ 0 }` : "0" +>`${ '' }${ 0 }` : string >'' : "" >0 : 0 @@ -114,14 +114,14 @@ var s = fn3 `${ 3 }`; >s : string >fn3 `${ 3 }` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var s = fn3 `${'' }${ 3 }${ '' }`; >s : string >fn3 `${'' }${ 3 }${ '' }` : "" >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${'' }${ 3 }${ '' }` : "3" +>`${'' }${ 3 }${ '' }` : string >'' : "" >3 : 3 >'' : "" @@ -130,7 +130,7 @@ var n = fn3 `${ 5 }${ 5 }${ 5 }`; >n : number >fn3 `${ 5 }${ 5 }${ 5 }` : number >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 5 }${ 5 }${ 5 }` : "555" +>`${ 5 }${ 5 }${ 5 }` : string >5 : 5 >5 : 5 >5 : 5 @@ -143,14 +143,14 @@ var s = fn3 `${ 4 }` >s : string >fn3 `${ 4 }` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 4 }` : "4" +>`${ 4 }` : string >4 : 4 var s = fn3 `${ '' }${ '' }${ '' }`; >s : string >fn3 `${ '' }${ '' }${ '' }` : "" >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ '' }${ '' }${ '' }` : "" +>`${ '' }${ '' }${ '' }` : string >'' : "" >'' : "" >'' : "" @@ -159,7 +159,7 @@ var n = fn3 `${ '' }${ '' }${ 3 }`; >n : number >fn3 `${ '' }${ '' }${ 3 }` : 3 >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ '' }${ '' }${ 3 }` : "3" +>`${ '' }${ '' }${ 3 }` : string >'' : "" >'' : "" >3 : 3 @@ -194,28 +194,28 @@ function fn4() { } fn4 `${ '' }${ 3 }`; >fn4 `${ '' }${ 3 }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ '' }${ 3 }` : "3" +>`${ '' }${ 3 }` : string >'' : "" >3 : 3 fn4 `${ 3 }${ '' }`; >fn4 `${ 3 }${ '' }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ 3 }${ '' }` : "3" +>`${ 3 }${ '' }` : string >3 : 3 >'' : "" fn4 `${ 3 }${ undefined }`; >fn4 `${ 3 }${ undefined }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ 3 }${ undefined }` : "3undefined" +>`${ 3 }${ undefined }` : string >3 : 3 >undefined : undefined fn4 `${ '' }${ null }`; >fn4 `${ '' }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ '' }${ null }` : "null" +>`${ '' }${ null }` : string >'' : "" >null : null @@ -223,7 +223,7 @@ fn4 `${ '' }${ null }`; fn4 `${ null }${ null }`; // Error >fn4 `${ null }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ null }${ null }` : "nullnull" +>`${ null }${ null }` : string >null : null >null : null @@ -231,14 +231,14 @@ fn4 `${ null }${ null }`; // Error fn4 `${ true }${ null }`; >fn4 `${ true }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ true }${ null }` : "truenull" +>`${ true }${ null }` : string >true : true >null : null fn4 `${ null }${ true }`; >fn4 `${ null }${ true }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ null }${ true }` : "nulltrue" +>`${ null }${ true }` : string >null : null >true : true diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types index 61426f6353056..57d82e034ae04 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types @@ -18,7 +18,7 @@ var s: string = fn1 `${ undefined }`; >s : string >fn1 `${ undefined }` : string >fn1 : { (strs: TemplateStringsArray, s: string): string; (strs: TemplateStringsArray, n: number): number; } ->`${ undefined }` : "undefined" +>`${ undefined }` : string >undefined : undefined // No candidate overloads found @@ -48,7 +48,7 @@ var d1: Date = fn2 `${ 0 }${ undefined }`; // contextually typed >d1 : Date >fn2 `${ 0 }${ undefined }` : any >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ undefined }` : "0undefined" +>`${ 0 }${ undefined }` : string >0 : 0 >undefined : undefined @@ -56,7 +56,7 @@ var d2 = fn2 `${ 0 }${ undefined }`; // any >d2 : any >fn2 `${ 0 }${ undefined }` : any >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ undefined }` : "0undefined" +>`${ 0 }${ undefined }` : string >0 : 0 >undefined : undefined @@ -74,7 +74,7 @@ d2(); // no error (typed as any) fn2 `${ 0 }${ '' }`; // OK >fn2 `${ 0 }${ '' }` : "" >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ 0 }${ '' }` : "0" +>`${ 0 }${ '' }` : string >0 : 0 >'' : "" @@ -82,7 +82,7 @@ fn2 `${ 0 }${ '' }`; // OK fn2 `${ '' }${ 0 }`; // OK >fn2 `${ '' }${ 0 }` : number >fn2 : { (strs: TemplateStringsArray, s: string, n: number): number; (strs: TemplateStringsArray, n: number, t: T): T; } ->`${ '' }${ 0 }` : "0" +>`${ '' }${ 0 }` : string >'' : "" >0 : 0 @@ -114,14 +114,14 @@ var s = fn3 `${ 3 }`; >s : string >fn3 `${ 3 }` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var s = fn3 `${'' }${ 3 }${ '' }`; >s : string >fn3 `${'' }${ 3 }${ '' }` : "" >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${'' }${ 3 }${ '' }` : "3" +>`${'' }${ 3 }${ '' }` : string >'' : "" >3 : 3 >'' : "" @@ -130,7 +130,7 @@ var n = fn3 `${ 5 }${ 5 }${ 5 }`; >n : number >fn3 `${ 5 }${ 5 }${ 5 }` : number >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 5 }${ 5 }${ 5 }` : "555" +>`${ 5 }${ 5 }${ 5 }` : string >5 : 5 >5 : 5 >5 : 5 @@ -143,14 +143,14 @@ var s = fn3 `${ 4 }` >s : string >fn3 `${ 4 }` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ 4 }` : "4" +>`${ 4 }` : string >4 : 4 var s = fn3 `${ '' }${ '' }${ '' }`; >s : string >fn3 `${ '' }${ '' }${ '' }` : "" >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ '' }${ '' }${ '' }` : "" +>`${ '' }${ '' }${ '' }` : string >'' : "" >'' : "" >'' : "" @@ -159,7 +159,7 @@ var n = fn3 `${ '' }${ '' }${ 3 }`; >n : number >fn3 `${ '' }${ '' }${ 3 }` : 3 >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } ->`${ '' }${ '' }${ 3 }` : "3" +>`${ '' }${ '' }${ 3 }` : string >'' : "" >'' : "" >3 : 3 @@ -194,28 +194,28 @@ function fn4() { } fn4 `${ '' }${ 3 }`; >fn4 `${ '' }${ 3 }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ '' }${ 3 }` : "3" +>`${ '' }${ 3 }` : string >'' : "" >3 : 3 fn4 `${ 3 }${ '' }`; >fn4 `${ 3 }${ '' }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ 3 }${ '' }` : "3" +>`${ 3 }${ '' }` : string >3 : 3 >'' : "" fn4 `${ 3 }${ undefined }`; >fn4 `${ 3 }${ undefined }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ 3 }${ undefined }` : "3undefined" +>`${ 3 }${ undefined }` : string >3 : 3 >undefined : undefined fn4 `${ '' }${ null }`; >fn4 `${ '' }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ '' }${ null }` : "null" +>`${ '' }${ null }` : string >'' : "" >null : null @@ -223,7 +223,7 @@ fn4 `${ '' }${ null }`; fn4 `${ null }${ null }`; // Error >fn4 `${ null }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ null }${ null }` : "nullnull" +>`${ null }${ null }` : string >null : null >null : null @@ -231,14 +231,14 @@ fn4 `${ null }${ null }`; // Error fn4 `${ true }${ null }`; >fn4 `${ true }${ null }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ true }${ null }` : "truenull" +>`${ true }${ null }` : string >true : true >null : null fn4 `${ null }${ true }`; >fn4 `${ null }${ true }` : any >fn4 : { (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray, n: T, m: U): any; (strs: TemplateStringsArray): any; } ->`${ null }${ true }` : "nulltrue" +>`${ null }${ true }` : string >null : null >true : true diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.types b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.types index 9d09a445ac6d2..3d39c883056d8 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.types @@ -8,6 +8,6 @@ function declare(x: any, ...ys: any[]) { declare `Hello ${0} world!`; >declare `Hello ${0} world!` : void >declare : (x: any, ...ys: any[]) => void ->`Hello ${0} world!` : "Hello 0 world!" +>`Hello ${0} world!` : string >0 : 0 diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclareES6.types b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclareES6.types index 76163bf33c767..57309b399ba0d 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclareES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclareES6.types @@ -8,6 +8,6 @@ function declare(x: any, ...ys: any[]) { declare `Hello ${0} world!`; >declare `Hello ${0} world!` : void >declare : (x: any, ...ys: any[]) => void ->`Hello ${0} world!` : "Hello 0 world!" +>`Hello ${0} world!` : string >0 : 0 diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types index da75f4cec414a..9bd975bb472ec 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.types @@ -10,7 +10,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -30,7 +30,7 @@ f.g.h `abc${1}def${2}ghi`; >f : any >g : any >h : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -45,7 +45,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : any @@ -61,7 +61,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -75,7 +75,7 @@ f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >`abc` : "abc" >"member" : "member" >someOtherTag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -85,12 +85,12 @@ f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >someOtherTag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -106,7 +106,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : any >f : any >thisIsNotATag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types index af4251130db25..3fde2cd552d42 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAnyES6.types @@ -10,7 +10,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -30,7 +30,7 @@ f.g.h `abc${1}def${2}ghi`; >f : any >g : any >h : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -45,7 +45,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : any @@ -61,7 +61,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -75,7 +75,7 @@ f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; >`abc` : "abc" >"member" : "member" >someOtherTag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -85,12 +85,12 @@ f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : any >f `abc${1}def${2}ghi` : any >f : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >someOtherTag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -106,7 +106,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : any >f : any >thisIsNotATag : any ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types index 1c41bcbaed049..2f8b5df162bbf 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.types @@ -32,7 +32,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -47,7 +47,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : I @@ -63,7 +63,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -77,7 +77,7 @@ f `abc`[0].member `abc${1}def${2}ghi`; >`abc` : "abc" >0 : 0 >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -87,12 +87,12 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -108,7 +108,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : (x: string) => void >f : I >thisIsNotATag : (x: string) => void ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types index 5bd96e1f154cf..313a338baf6e9 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTagsES6.types @@ -32,7 +32,7 @@ f `abc` f `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -47,7 +47,7 @@ f `abc${1}def${2}ghi`.member; >f `abc${1}def${2}ghi`.member : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >member : I @@ -63,7 +63,7 @@ f `abc${1}def${2}ghi`["member"]; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" @@ -77,7 +77,7 @@ f `abc`[0].member `abc${1}def${2}ghi`; >`abc` : "abc" >0 : 0 >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -87,12 +87,12 @@ f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; >f `abc${1}def${2}ghi`["member"] : I >f `abc${1}def${2}ghi` : I >f : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" >member : I ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 @@ -108,7 +108,7 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); >f.thisIsNotATag : (x: string) => void >f : I >thisIsNotATag : (x: string) => void ->`abc${1}def${2}ghi` : "abc1def2ghi" +>`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types index 18d40b65bc40c..4b9b447d32a32 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types +++ b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.types @@ -7,6 +7,6 @@ function f(...args: any[]) { 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'` : "'💩' should be converted to '💩'" +>`'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : string >" should be converted to " : " should be converted to " diff --git a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types index 1558663ff7908..36a298c5a38e9 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapesES6.types @@ -7,6 +7,6 @@ function f(...args: any[]) { 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'` : "'💩' should be converted to '💩'" +>`'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'` : string >" should be converted to " : " should be converted to " diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions1.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions1.types index 8298380638969..16e40b638aa85 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions1.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions1.types @@ -10,6 +10,6 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ >f `123qdawdrqw${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ : `123qdawdrqw${any}` +>`123qdawdrqw${ : string > : any diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions2.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions2.types index 093c57969e5bc..600d85805ee3b 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions2.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions2.types @@ -10,7 +10,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ }${ >f `123qdawdrqw${ }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ }${ : `123qdawdrqw${any}${any}` +>`123qdawdrqw${ }${ : string > : any > : any diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types index 84444acf4b4d0..dd512edab241f 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types @@ -10,7 +10,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ 1 }${ >f `123qdawdrqw${ 1 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ 1 }${ : `123qdawdrqw1${any}` +>`123qdawdrqw${ 1 }${ : string >1 : 1 > : any diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types index 11431691a72eb..8fb37587be28d 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types @@ -10,7 +10,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ 1 }${ }${ >f `123qdawdrqw${ 1 }${ }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ 1 }${ }${ : `123qdawdrqw1${any}${any}` +>`123qdawdrqw${ 1 }${ }${ : string >1 : 1 > : any > : any diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types index fbfaf564ae26b..b83f6fd5770ed 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types @@ -10,7 +10,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ 1 }${ 2 }${ >f `123qdawdrqw${ 1 }${ 2 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ 1 }${ 2 }${ : `123qdawdrqw12${any}` +>`123qdawdrqw${ 1 }${ 2 }${ : string >1 : 1 >2 : 2 > : any diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types index 54c6d5900e54e..6c73c0e59a093 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types @@ -10,7 +10,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { f `123qdawdrqw${ 1 }${ >f `123qdawdrqw${ 1 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void ->`123qdawdrqw${ 1 }${ : `123qdawdrqw1${any}` +>`123qdawdrqw${ 1 }${ : string >1 : 1 > : any diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types index 89e075be990d6..c2719c22877f7 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types @@ -20,14 +20,7 @@ export const a = f ` >a : void >f ` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : void >f : (strs: TemplateStringsArray, ...callbacks: ((x: T) => any)[]) => void ->` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : ` - hello - ${string} - brave - ${string} - world - ${string} -` +>` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : string hello ${stuff => stuff.x} @@ -73,14 +66,7 @@ export const b = g ` >b : string | number | boolean >g ` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : string | number | boolean >g : (strs: TemplateStringsArray, t: (i: Input) => T, u: (i: Input) => U, v: (i: Input) => V) => T | U | V ->` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : ` - hello - ${string} - brave - ${string} - world - ${string} -` +>` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : string hello ${stuff => stuff.x} diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types index 3cd64576b349d..c78719846cf72 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types @@ -18,7 +18,7 @@ const a = new tag `${100} ${200}`("hello", "world"); >new tag `${100} ${200}`("hello", "world") : any >tag `${100} ${200}` : SomethingNewable >tag : SomethingTaggable ->`${100} ${200}` : "100 200" +>`${100} ${200}` : string >100 : 100 >200 : 200 >"hello" : "hello" @@ -29,7 +29,7 @@ const b = new tag `${"hello"} ${"world"}`(100, 200); >new tag `${"hello"} ${"world"}`(100, 200) : any >tag `${"hello"} ${"world"}` : SomethingNewable >tag : SomethingTaggable ->`${"hello"} ${"world"}` : "hello world" +>`${"hello"} ${"world"}` : string >"hello" : "hello" >"world" : "world" >100 : 100 @@ -41,7 +41,7 @@ const c = new tag `${100} ${200}`("hello", "world"); >new tag `${100} ${200}` : any >tag `${100} ${200}` : SomethingNewable >tag : SomethingTaggable ->`${100} ${200}` : "100 200" +>`${100} ${200}` : string >100 : 100 >200 : 200 >"hello" : "hello" @@ -53,7 +53,7 @@ const d = new tag `${"hello"} ${"world"}`(100, 200); >new tag `${"hello"} ${"world"}` : any >tag `${"hello"} ${"world"}` : SomethingNewable >tag : SomethingTaggable ->`${"hello"} ${"world"}` : "hello world" +>`${"hello"} ${"world"}` : string >"hello" : "hello" >"world" : "world" >100 : 100 diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index 61429f5de463b..3ab499d448bd1 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -8,7 +8,7 @@ const createScopedActionType = (scope: S) => (type: T) => `${scope}/${type}` as `${S}/${T}` : (type: T) => `${S}/${T}` >type : T >`${scope}/${type}` as `${S}/${T}` : `${S}/${T}` ->`${scope}/${type}` : `${S}/${T}` +>`${scope}/${type}` : string >scope : S >type : T diff --git a/tests/baselines/reference/templateLiteralTypes2.errors.txt b/tests/baselines/reference/templateLiteralTypes2.errors.txt new file mode 100644 index 0000000000000..f5e69d835636f --- /dev/null +++ b/tests/baselines/reference/templateLiteralTypes2.errors.txt @@ -0,0 +1,144 @@ +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(6,11): error TS2322: Type 'string' is not assignable to type '`abc${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(7,11): error TS2322: Type 'string' is not assignable to type '`abc${number}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(8,11): error TS2322: Type 'string' is not assignable to type '"abcfoo" | "abcbar" | "abcbaz"'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(9,11): error TS2322: Type 'string' is not assignable to type '`abc${T}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(21,11): error TS2322: Type 'string' is not assignable to type '`abc${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(23,11): error TS2322: Type 'string' is not assignable to type '`abc${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(29,11): error TS2322: Type 'string' is not assignable to type '`foo${string}` | `bar${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(32,11): error TS2322: Type 'string' is not assignable to type '`foo${string}` | `bar${string}` | `baz${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(43,11): error TS2322: Type 'string' is not assignable to type '`foo${string}`'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(67,9): error TS2322: Type '`foo${number}`' is not assignable to type 'String'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(68,9): error TS2322: Type '`foo${number}`' is not assignable to type 'Object'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(69,9): error TS2322: Type '`foo${number}`' is not assignable to type '{}'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(70,9): error TS2322: Type '`foo${number}`' is not assignable to type '{ length: number; }'. +tests/cases/conformance/types/literal/templateLiteralTypes2.ts(98,7): error TS2322: Type 'string' is not assignable to type '`${number}px`'. + + +==== tests/cases/conformance/types/literal/templateLiteralTypes2.ts (14 errors) ==== + function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { + const c1 = `abc${s}`; // `abc${string}` + const c2 = `abc${n}`; // `abc${number}` + const c3 = `abc${u}`; // "abcfoo" | "abcbar" | "abcbaz" + const c4 = `abc${t}`; // `abc${T} + const d1: `abc${string}` = `abc${s}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`abc${string}`'. + const d2: `abc${number}` = `abc${n}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`abc${number}`'. + const d3: `abc${'foo' | 'bar' | 'baz'}` = `abc${u}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '"abcfoo" | "abcbar" | "abcbaz"'. + const d4: `abc${T}` = `abc${t}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`abc${T}`'. + } + + function ft2(s: string) { + return `abc${s}`; + } + + function ft10(s: string) { + const c1 = `abc${s}`; // Widening type `abc${string}` + let v1 = c1; // Type string + const c2 = c1; // Widening type `abc${string}` + let v2 = c2; // Type string + const c3: `abc${string}` = `abc${s}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`abc${string}`'. + let v3 = c3; // Type `abc${string}` + const c4: `abc${string}` = c1; // Type `abc${string}` + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`abc${string}`'. + let v4 = c4; // Type `abc${string}` + } + + function ft11(s: string, cond: boolean) { + const c1 = cond ? `foo${s}` : `bar${s}`; // widening `foo${string}` | widening `bar${string}` + const c2: `foo${string}` | `bar${string}` = c1; // `foo${string}` | `bar${string}` + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`foo${string}` | `bar${string}`'. + const c3 = cond ? c1 : c2; // `foo${string}` | `bar${string}` + const c4 = cond ? c3 : `baz${s}`; // `foo${string}` | `bar${string}` | widening `baz${string}` + const c5: `foo${string}` | `bar${string}` | `baz${string}` = c4; // `foo${string}` | `bar${string}` | `baz${string}` + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`foo${string}` | `bar${string}` | `baz${string}`'. + let v1 = c1; // string + let v2 = c2; // `foo${string}` | `bar${string}` + let v3 = c3; // `foo${string}` | `bar${string}` + let v4 = c4; // string + let v5 = c5; // `foo${string}` | `bar${string}` | `baz${string}` + } + + function ft12(s: string) { + const c1 = `foo${s}`; + let v1 = c1; + const c2: `foo${string}` = `foo${s}`; + ~~ +!!! error TS2322: Type 'string' is not assignable to type '`foo${string}`'. + let v2 = c2; + const c3 = `foo${s}` as `foo${string}`; + let v3 = c3; + const c4 = <`foo${string}`>`foo${s}`; + let v4 = c4; + const c5 = `foo${s}` as const; + let v5 = c5; + } + + declare function widening(x: T): T; + declare function nonWidening(x: T): T; + + function ft13(s: string, cond: boolean) { + let x1 = widening(`foo${s}`); + let x2 = widening(cond ? 'a' : `foo${s}`); + let y1 = nonWidening(`foo${s}`); + let y2 = nonWidening(cond ? 'a' : `foo${s}`); + } + + type T0 = string | `${number}px`; + + function ft14(t: `foo${number}`) { + let x1: string = t; + let x2: String = t; + ~~ +!!! error TS2322: Type '`foo${number}`' is not assignable to type 'String'. + let x3: Object = t; + ~~ +!!! error TS2322: Type '`foo${number}`' is not assignable to type 'Object'. + let x4: {} = t; + ~~ +!!! error TS2322: Type '`foo${number}`' is not assignable to type '{}'. + let x6: { length: number } = t; + ~~ +!!! error TS2322: Type '`foo${number}`' is not assignable to type '{ length: number; }'. + } + + // Repro from #41631 + + declare function takesLiteral(literal: T): T extends `foo.bar.${infer R}` ? R : unknown; + + const t1 = takesLiteral("foo.bar.baz"); // "baz" + const id2 = "foo.bar.baz"; + const t2 = takesLiteral(id2); // "baz" + + declare const someString: string; + const t3 = takesLiteral(`foo.bar.${someString}`); // string + + const id4 = `foo.bar.${someString}`; + const t4 = takesLiteral(id4); // string + + declare const someUnion: 'abc' | 'def' | 'ghi'; + const t5 = takesLiteral(`foo.bar.${someUnion}`); // "abc" | "def" | "ghi" + + // Repro from #41732 + + const pixelValue: number = 22; + + type PixelValueType = `${number}px`; + + const pixelString: PixelValueType = `22px`; + + const pixelStringWithTemplate: PixelValueType = `${pixelValue}px`; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '`${number}px`'. + \ No newline at end of file diff --git a/tests/baselines/reference/templateLiteralTypes2.js b/tests/baselines/reference/templateLiteralTypes2.js index ce87e6b5869fb..3c9276c1eb009 100644 --- a/tests/baselines/reference/templateLiteralTypes2.js +++ b/tests/baselines/reference/templateLiteralTypes2.js @@ -176,7 +176,7 @@ var pixelStringWithTemplate = pixelValue + "px"; //// [templateLiteralTypes2.d.ts] declare function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T): void; -declare function ft2(s: string): `abc${string}`; +declare function ft2(s: string): string; declare function ft10(s: string): void; declare function ft11(s: string, cond: boolean): void; declare function ft12(s: string): void; @@ -190,11 +190,11 @@ declare const t1: "baz"; declare const id2 = "foo.bar.baz"; declare const t2: "baz"; declare const someString: string; -declare const t3: string; +declare const t3: unknown; declare const id4: string; -declare const t4: string; +declare const t4: unknown; declare const someUnion: 'abc' | 'def' | 'ghi'; -declare const t5: "abc" | "def" | "ghi"; +declare const t5: unknown; declare const pixelValue: number; declare type PixelValueType = `${number}px`; declare const pixelString: PixelValueType; diff --git a/tests/baselines/reference/templateLiteralTypes2.types b/tests/baselines/reference/templateLiteralTypes2.types index 1013a43a7b402..cb9d7ae2595a1 100644 --- a/tests/baselines/reference/templateLiteralTypes2.types +++ b/tests/baselines/reference/templateLiteralTypes2.types @@ -7,52 +7,52 @@ function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t >t : T const c1 = `abc${s}`; // `abc${string}` ->c1 : `abc${string}` ->`abc${s}` : `abc${string}` +>c1 : string +>`abc${s}` : string >s : string const c2 = `abc${n}`; // `abc${number}` ->c2 : `abc${number}` ->`abc${n}` : `abc${number}` +>c2 : string +>`abc${n}` : string >n : number const c3 = `abc${u}`; // "abcfoo" | "abcbar" | "abcbaz" ->c3 : "abcfoo" | "abcbar" | "abcbaz" ->`abc${u}` : "abcfoo" | "abcbar" | "abcbaz" +>c3 : string +>`abc${u}` : string >u : "foo" | "bar" | "baz" const c4 = `abc${t}`; // `abc${T} ->c4 : `abc${T}` ->`abc${t}` : `abc${T}` +>c4 : string +>`abc${t}` : string >t : T const d1: `abc${string}` = `abc${s}`; >d1 : `abc${string}` ->`abc${s}` : `abc${string}` +>`abc${s}` : string >s : string const d2: `abc${number}` = `abc${n}`; >d2 : `abc${number}` ->`abc${n}` : `abc${number}` +>`abc${n}` : string >n : number const d3: `abc${'foo' | 'bar' | 'baz'}` = `abc${u}`; >d3 : "abcfoo" | "abcbar" | "abcbaz" ->`abc${u}` : "abcfoo" | "abcbar" | "abcbaz" +>`abc${u}` : string >u : "foo" | "bar" | "baz" const d4: `abc${T}` = `abc${t}`; >d4 : `abc${T}` ->`abc${t}` : `abc${T}` +>`abc${t}` : string >t : T } function ft2(s: string) { ->ft2 : (s: string) => `abc${string}` +>ft2 : (s: string) => string >s : string return `abc${s}`; ->`abc${s}` : `abc${string}` +>`abc${s}` : string >s : string } @@ -61,25 +61,25 @@ function ft10(s: string) { >s : string const c1 = `abc${s}`; // Widening type `abc${string}` ->c1 : `abc${string}` ->`abc${s}` : `abc${string}` +>c1 : string +>`abc${s}` : string >s : string let v1 = c1; // Type string >v1 : string ->c1 : `abc${string}` +>c1 : string const c2 = c1; // Widening type `abc${string}` ->c2 : `abc${string}` ->c1 : `abc${string}` +>c2 : string +>c1 : string let v2 = c2; // Type string >v2 : string ->c2 : `abc${string}` +>c2 : string const c3: `abc${string}` = `abc${s}`; >c3 : `abc${string}` ->`abc${s}` : `abc${string}` +>`abc${s}` : string >s : string let v3 = c3; // Type `abc${string}` @@ -88,7 +88,7 @@ function ft10(s: string) { const c4: `abc${string}` = c1; // Type `abc${string}` >c4 : `abc${string}` ->c1 : `abc${string}` +>c1 : string let v4 = c4; // Type `abc${string}` >v4 : `abc${string}` @@ -101,52 +101,52 @@ function ft11(s: string, cond: boolean) { >cond : boolean const c1 = cond ? `foo${s}` : `bar${s}`; // widening `foo${string}` | widening `bar${string}` ->c1 : `foo${string}` | `bar${string}` ->cond ? `foo${s}` : `bar${s}` : `foo${string}` | `bar${string}` +>c1 : string +>cond ? `foo${s}` : `bar${s}` : string >cond : boolean ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string ->`bar${s}` : `bar${string}` +>`bar${s}` : string >s : string const c2: `foo${string}` | `bar${string}` = c1; // `foo${string}` | `bar${string}` >c2 : `foo${string}` | `bar${string}` ->c1 : `foo${string}` | `bar${string}` +>c1 : string const c3 = cond ? c1 : c2; // `foo${string}` | `bar${string}` ->c3 : `foo${string}` | `bar${string}` ->cond ? c1 : c2 : `foo${string}` | `bar${string}` +>c3 : string +>cond ? c1 : c2 : string >cond : boolean ->c1 : `foo${string}` | `bar${string}` +>c1 : string >c2 : `foo${string}` | `bar${string}` const c4 = cond ? c3 : `baz${s}`; // `foo${string}` | `bar${string}` | widening `baz${string}` ->c4 : `foo${string}` | `bar${string}` | `baz${string}` ->cond ? c3 : `baz${s}` : `foo${string}` | `bar${string}` | `baz${string}` +>c4 : string +>cond ? c3 : `baz${s}` : string >cond : boolean ->c3 : `foo${string}` | `bar${string}` ->`baz${s}` : `baz${string}` +>c3 : string +>`baz${s}` : string >s : string const c5: `foo${string}` | `bar${string}` | `baz${string}` = c4; // `foo${string}` | `bar${string}` | `baz${string}` >c5 : `foo${string}` | `bar${string}` | `baz${string}` ->c4 : `foo${string}` | `bar${string}` | `baz${string}` +>c4 : string let v1 = c1; // string >v1 : string ->c1 : `foo${string}` | `bar${string}` +>c1 : string let v2 = c2; // `foo${string}` | `bar${string}` >v2 : `foo${string}` | `bar${string}` >c2 : `foo${string}` | `bar${string}` let v3 = c3; // `foo${string}` | `bar${string}` ->v3 : `foo${string}` | `bar${string}` ->c3 : `foo${string}` | `bar${string}` +>v3 : string +>c3 : string let v4 = c4; // string >v4 : string ->c4 : `foo${string}` | `bar${string}` | `baz${string}` +>c4 : string let v5 = c5; // `foo${string}` | `bar${string}` | `baz${string}` >v5 : `foo${string}` | `bar${string}` | `baz${string}` @@ -158,17 +158,17 @@ function ft12(s: string) { >s : string const c1 = `foo${s}`; ->c1 : `foo${string}` ->`foo${s}` : `foo${string}` +>c1 : string +>`foo${s}` : string >s : string let v1 = c1; >v1 : string ->c1 : `foo${string}` +>c1 : string const c2: `foo${string}` = `foo${s}`; >c2 : `foo${string}` ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let v2 = c2; @@ -178,7 +178,7 @@ function ft12(s: string) { const c3 = `foo${s}` as `foo${string}`; >c3 : `foo${string}` >`foo${s}` as `foo${string}` : `foo${string}` ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let v3 = c3; @@ -188,7 +188,7 @@ function ft12(s: string) { const c4 = <`foo${string}`>`foo${s}`; >c4 : `foo${string}` ><`foo${string}`>`foo${s}` : `foo${string}` ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let v4 = c4; @@ -221,41 +221,41 @@ function ft13(s: string, cond: boolean) { let x1 = widening(`foo${s}`); >x1 : string ->widening(`foo${s}`) : `foo${string}` +>widening(`foo${s}`) : string >widening : (x: T) => T ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let x2 = widening(cond ? 'a' : `foo${s}`); >x2 : string ->widening(cond ? 'a' : `foo${s}`) : `foo${string}` | "a" +>widening(cond ? 'a' : `foo${s}`) : string >widening : (x: T) => T ->cond ? 'a' : `foo${s}` : `foo${string}` | "a" +>cond ? 'a' : `foo${s}` : string >cond : boolean >'a' : "a" ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let y1 = nonWidening(`foo${s}`); ->y1 : `foo${string}` ->nonWidening(`foo${s}`) : `foo${string}` +>y1 : string +>nonWidening(`foo${s}`) : string >nonWidening : (x: T) => T ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string let y2 = nonWidening(cond ? 'a' : `foo${s}`); ->y2 : `foo${string}` | "a" ->nonWidening(cond ? 'a' : `foo${s}`) : `foo${string}` | "a" +>y2 : string +>nonWidening(cond ? 'a' : `foo${s}`) : string >nonWidening : (x: T) => T ->cond ? 'a' : `foo${s}` : `foo${string}` | "a" +>cond ? 'a' : `foo${s}` : string >cond : boolean >'a' : "a" ->`foo${s}` : `foo${string}` +>`foo${s}` : string >s : string } type T0 = string | `${number}px`; ->T0 : string +>T0 : T0 function ft14(t: `foo${number}`) { >ft14 : (t: `foo${number}`) => void @@ -309,31 +309,31 @@ declare const someString: string; >someString : string const t3 = takesLiteral(`foo.bar.${someString}`); // string ->t3 : string ->takesLiteral(`foo.bar.${someString}`) : string +>t3 : unknown +>takesLiteral(`foo.bar.${someString}`) : unknown >takesLiteral : (literal: T) => T extends `foo.bar.${infer R}` ? R : unknown ->`foo.bar.${someString}` : `foo.bar.${string}` +>`foo.bar.${someString}` : string >someString : string const id4 = `foo.bar.${someString}`; ->id4 : `foo.bar.${string}` ->`foo.bar.${someString}` : `foo.bar.${string}` +>id4 : string +>`foo.bar.${someString}` : string >someString : string const t4 = takesLiteral(id4); // string ->t4 : string ->takesLiteral(id4) : string +>t4 : unknown +>takesLiteral(id4) : unknown >takesLiteral : (literal: T) => T extends `foo.bar.${infer R}` ? R : unknown ->id4 : `foo.bar.${string}` +>id4 : string declare const someUnion: 'abc' | 'def' | 'ghi'; >someUnion : "abc" | "def" | "ghi" const t5 = takesLiteral(`foo.bar.${someUnion}`); // "abc" | "def" | "ghi" ->t5 : "abc" | "def" | "ghi" ->takesLiteral(`foo.bar.${someUnion}`) : "abc" | "def" | "ghi" +>t5 : unknown +>takesLiteral(`foo.bar.${someUnion}`) : unknown >takesLiteral : (literal: T) => T extends `foo.bar.${infer R}` ? R : unknown ->`foo.bar.${someUnion}` : "foo.bar.abc" | "foo.bar.def" | "foo.bar.ghi" +>`foo.bar.${someUnion}` : string >someUnion : "abc" | "def" | "ghi" // Repro from #41732 @@ -351,6 +351,6 @@ const pixelString: PixelValueType = `22px`; const pixelStringWithTemplate: PixelValueType = `${pixelValue}px`; >pixelStringWithTemplate : `${number}px` ->`${pixelValue}px` : `${number}px` +>`${pixelValue}px` : string >pixelValue : number diff --git a/tests/baselines/reference/templateStringBinaryOperations.types b/tests/baselines/reference/templateStringBinaryOperations.types index f554657502536..01d306487ee01 100644 --- a/tests/baselines/reference/templateStringBinaryOperations.types +++ b/tests/baselines/reference/templateStringBinaryOperations.types @@ -3,55 +3,55 @@ var a = 1 + `${ 3 }`; >a : string >1 + `${ 3 }` : string >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 + `2${ 3 }`; >b : string >1 + `2${ 3 }` : string >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 + `${ 3 }4`; >c : string >1 + `${ 3 }4` : string >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 + `2${ 3 }4`; >d : string >1 + `2${ 3 }4` : string >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` + 5; >e : string >`${ 3 }` + 5 : string ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` + 5; >f : string >`2${ 3 }` + 5 : string ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` + 5; >g : string >`${ 3 }4` + 5 : string ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` + 5; >h : string >`2${ 3 }4` + 5 : string ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -60,7 +60,7 @@ var i = 1 + `${ 3 }` + 5; >1 + `${ 3 }` + 5 : string >1 + `${ 3 }` : string >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 @@ -69,7 +69,7 @@ var j = 1 + `2${ 3 }` + 5; >1 + `2${ 3 }` + 5 : string >1 + `2${ 3 }` : string >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 @@ -78,7 +78,7 @@ var k = 1 + `${ 3 }4` + 5; >1 + `${ 3 }4` + 5 : string >1 + `${ 3 }4` : string >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 @@ -87,7 +87,7 @@ var l = 1 + `2${ 3 }4` + 5; >1 + `2${ 3 }4` + 5 : string >1 + `2${ 3 }4` : string >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -95,7 +95,7 @@ var a2 = 1 + `${ 3 - 4 }`; >a2 : string >1 + `${ 3 - 4 }` : string >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -104,7 +104,7 @@ var b2 = 1 + `2${ 3 - 4 }`; >b2 : string >1 + `2${ 3 - 4 }` : string >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -113,7 +113,7 @@ var c2 = 1 + `${ 3 - 4 }5`; >c2 : string >1 + `${ 3 - 4 }5` : string >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -122,7 +122,7 @@ var d2 = 1 + `2${ 3 - 4 }5`; >d2 : string >1 + `2${ 3 - 4 }5` : string >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -130,7 +130,7 @@ var d2 = 1 + `2${ 3 - 4 }5`; var e2 = `${ 3 - 4 }` + 6; >e2 : string >`${ 3 - 4 }` + 6 : string ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -139,7 +139,7 @@ var e2 = `${ 3 - 4 }` + 6; var f2 = `2${ 3 - 4 }` + 6; >f2 : string >`2${ 3 - 4 }` + 6 : string ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -148,7 +148,7 @@ var f2 = `2${ 3 - 4 }` + 6; var g2 = `${ 3 - 4 }5` + 6; >g2 : string >`${ 3 - 4 }5` + 6 : string ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -157,7 +157,7 @@ var g2 = `${ 3 - 4 }5` + 6; var h2 = `2${ 3 - 4 }5` + 6; >h2 : string >`2${ 3 - 4 }5` + 6 : string ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -168,7 +168,7 @@ var i2 = 1 + `${ 3 - 4 }` + 6; >1 + `${ 3 - 4 }` + 6 : string >1 + `${ 3 - 4 }` : string >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -179,7 +179,7 @@ var j2 = 1 + `2${ 3 - 4 }` + 6; >1 + `2${ 3 - 4 }` + 6 : string >1 + `2${ 3 - 4 }` : string >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -190,7 +190,7 @@ var k2 = 1 + `${ 3 - 4 }5` + 6; >1 + `${ 3 - 4 }5` + 6 : string >1 + `${ 3 - 4 }5` : string >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -201,7 +201,7 @@ var l2 = 1 + `2${ 3 - 4 }5` + 6; >1 + `2${ 3 - 4 }5` + 6 : string >1 + `2${ 3 - 4 }5` : string >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -211,7 +211,7 @@ var a3 = 1 + `${ 3 * 4 }`; >a3 : string >1 + `${ 3 * 4 }` : string >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -220,7 +220,7 @@ var b3 = 1 + `2${ 3 * 4 }`; >b3 : string >1 + `2${ 3 * 4 }` : string >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -229,7 +229,7 @@ var c3 = 1 + `${ 3 * 4 }5`; >c3 : string >1 + `${ 3 * 4 }5` : string >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -238,7 +238,7 @@ var d3 = 1 + `2${ 3 * 4 }5`; >d3 : string >1 + `2${ 3 * 4 }5` : string >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -246,7 +246,7 @@ var d3 = 1 + `2${ 3 * 4 }5`; var e3 = `${ 3 * 4 }` + 6; >e3 : string >`${ 3 * 4 }` + 6 : string ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -255,7 +255,7 @@ var e3 = `${ 3 * 4 }` + 6; var f3 = `2${ 3 * 4 }` + 6; >f3 : string >`2${ 3 * 4 }` + 6 : string ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -264,7 +264,7 @@ var f3 = `2${ 3 * 4 }` + 6; var g3 = `${ 3 * 4 }5` + 6; >g3 : string >`${ 3 * 4 }5` + 6 : string ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -273,7 +273,7 @@ var g3 = `${ 3 * 4 }5` + 6; var h3 = `2${ 3 * 4 }5` + 6; >h3 : string >`2${ 3 * 4 }5` + 6 : string ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -284,7 +284,7 @@ var i3 = 1 + `${ 3 * 4 }` + 6; >1 + `${ 3 * 4 }` + 6 : string >1 + `${ 3 * 4 }` : string >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -295,7 +295,7 @@ var j3 = 1 + `2${ 3 * 4 }` + 6; >1 + `2${ 3 * 4 }` + 6 : string >1 + `2${ 3 * 4 }` : string >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -306,7 +306,7 @@ var k3 = 1 + `${ 3 * 4 }5` + 6; >1 + `${ 3 * 4 }5` + 6 : string >1 + `${ 3 * 4 }5` : string >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -317,7 +317,7 @@ var l3 = 1 + `2${ 3 * 4 }5` + 6; >1 + `2${ 3 * 4 }5` + 6 : string >1 + `2${ 3 * 4 }5` : string >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -327,7 +327,7 @@ var a4 = 1 + `${ 3 & 4 }`; >a4 : string >1 + `${ 3 & 4 }` : string >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -336,7 +336,7 @@ var b4 = 1 + `2${ 3 & 4 }`; >b4 : string >1 + `2${ 3 & 4 }` : string >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -345,7 +345,7 @@ var c4 = 1 + `${ 3 & 4 }5`; >c4 : string >1 + `${ 3 & 4 }5` : string >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -354,7 +354,7 @@ var d4 = 1 + `2${ 3 & 4 }5`; >d4 : string >1 + `2${ 3 & 4 }5` : string >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -362,7 +362,7 @@ var d4 = 1 + `2${ 3 & 4 }5`; var e4 = `${ 3 & 4 }` + 6; >e4 : string >`${ 3 & 4 }` + 6 : string ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -371,7 +371,7 @@ var e4 = `${ 3 & 4 }` + 6; var f4 = `2${ 3 & 4 }` + 6; >f4 : string >`2${ 3 & 4 }` + 6 : string ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -380,7 +380,7 @@ var f4 = `2${ 3 & 4 }` + 6; var g4 = `${ 3 & 4 }5` + 6; >g4 : string >`${ 3 & 4 }5` + 6 : string ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -389,7 +389,7 @@ var g4 = `${ 3 & 4 }5` + 6; var h4 = `2${ 3 & 4 }5` + 6; >h4 : string >`2${ 3 & 4 }5` + 6 : string ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -400,7 +400,7 @@ var i4 = 1 + `${ 3 & 4 }` + 6; >1 + `${ 3 & 4 }` + 6 : string >1 + `${ 3 & 4 }` : string >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -411,7 +411,7 @@ var j4 = 1 + `2${ 3 & 4 }` + 6; >1 + `2${ 3 & 4 }` + 6 : string >1 + `2${ 3 & 4 }` : string >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -422,7 +422,7 @@ var k4 = 1 + `${ 3 & 4 }5` + 6; >1 + `${ 3 & 4 }5` + 6 : string >1 + `${ 3 & 4 }5` : string >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -433,7 +433,7 @@ var l4 = 1 + `2${ 3 & 4 }5` + 6; >1 + `2${ 3 & 4 }5` + 6 : string >1 + `2${ 3 & 4 }5` : string >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 diff --git a/tests/baselines/reference/templateStringBinaryOperationsES6.types b/tests/baselines/reference/templateStringBinaryOperationsES6.types index ebbc7bcf88c2e..0ac9775a655ab 100644 --- a/tests/baselines/reference/templateStringBinaryOperationsES6.types +++ b/tests/baselines/reference/templateStringBinaryOperationsES6.types @@ -3,55 +3,55 @@ var a = 1 + `${ 3 }`; >a : string >1 + `${ 3 }` : string >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 + `2${ 3 }`; >b : string >1 + `2${ 3 }` : string >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 + `${ 3 }4`; >c : string >1 + `${ 3 }4` : string >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 + `2${ 3 }4`; >d : string >1 + `2${ 3 }4` : string >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` + 5; >e : string >`${ 3 }` + 5 : string ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` + 5; >f : string >`2${ 3 }` + 5 : string ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` + 5; >g : string >`${ 3 }4` + 5 : string ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` + 5; >h : string >`2${ 3 }4` + 5 : string ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -60,7 +60,7 @@ var i = 1 + `${ 3 }` + 5; >1 + `${ 3 }` + 5 : string >1 + `${ 3 }` : string >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 @@ -69,7 +69,7 @@ var j = 1 + `2${ 3 }` + 5; >1 + `2${ 3 }` + 5 : string >1 + `2${ 3 }` : string >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 @@ -78,7 +78,7 @@ var k = 1 + `${ 3 }4` + 5; >1 + `${ 3 }4` + 5 : string >1 + `${ 3 }4` : string >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 @@ -87,7 +87,7 @@ var l = 1 + `2${ 3 }4` + 5; >1 + `2${ 3 }4` + 5 : string >1 + `2${ 3 }4` : string >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -95,7 +95,7 @@ var a2 = 1 + `${ 3 - 4 }`; >a2 : string >1 + `${ 3 - 4 }` : string >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -104,7 +104,7 @@ var b2 = 1 + `2${ 3 - 4 }`; >b2 : string >1 + `2${ 3 - 4 }` : string >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -113,7 +113,7 @@ var c2 = 1 + `${ 3 - 4 }5`; >c2 : string >1 + `${ 3 - 4 }5` : string >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -122,7 +122,7 @@ var d2 = 1 + `2${ 3 - 4 }5`; >d2 : string >1 + `2${ 3 - 4 }5` : string >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -130,7 +130,7 @@ var d2 = 1 + `2${ 3 - 4 }5`; var e2 = `${ 3 - 4 }` + 6; >e2 : string >`${ 3 - 4 }` + 6 : string ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -139,7 +139,7 @@ var e2 = `${ 3 - 4 }` + 6; var f2 = `2${ 3 - 4 }` + 6; >f2 : string >`2${ 3 - 4 }` + 6 : string ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -148,7 +148,7 @@ var f2 = `2${ 3 - 4 }` + 6; var g2 = `${ 3 - 4 }5` + 6; >g2 : string >`${ 3 - 4 }5` + 6 : string ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -157,7 +157,7 @@ var g2 = `${ 3 - 4 }5` + 6; var h2 = `2${ 3 - 4 }5` + 6; >h2 : string >`2${ 3 - 4 }5` + 6 : string ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -168,7 +168,7 @@ var i2 = 1 + `${ 3 - 4 }` + 6; >1 + `${ 3 - 4 }` + 6 : string >1 + `${ 3 - 4 }` : string >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -179,7 +179,7 @@ var j2 = 1 + `2${ 3 - 4 }` + 6; >1 + `2${ 3 - 4 }` + 6 : string >1 + `2${ 3 - 4 }` : string >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -190,7 +190,7 @@ var k2 = 1 + `${ 3 - 4 }5` + 6; >1 + `${ 3 - 4 }5` + 6 : string >1 + `${ 3 - 4 }5` : string >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -201,7 +201,7 @@ var l2 = 1 + `2${ 3 - 4 }5` + 6; >1 + `2${ 3 - 4 }5` + 6 : string >1 + `2${ 3 - 4 }5` : string >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -211,7 +211,7 @@ var a3 = 1 + `${ 3 * 4 }`; >a3 : string >1 + `${ 3 * 4 }` : string >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -220,7 +220,7 @@ var b3 = 1 + `2${ 3 * 4 }`; >b3 : string >1 + `2${ 3 * 4 }` : string >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -229,7 +229,7 @@ var c3 = 1 + `${ 3 * 4 }5`; >c3 : string >1 + `${ 3 * 4 }5` : string >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -238,7 +238,7 @@ var d3 = 1 + `2${ 3 * 4 }5`; >d3 : string >1 + `2${ 3 * 4 }5` : string >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -246,7 +246,7 @@ var d3 = 1 + `2${ 3 * 4 }5`; var e3 = `${ 3 * 4 }` + 6; >e3 : string >`${ 3 * 4 }` + 6 : string ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -255,7 +255,7 @@ var e3 = `${ 3 * 4 }` + 6; var f3 = `2${ 3 * 4 }` + 6; >f3 : string >`2${ 3 * 4 }` + 6 : string ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -264,7 +264,7 @@ var f3 = `2${ 3 * 4 }` + 6; var g3 = `${ 3 * 4 }5` + 6; >g3 : string >`${ 3 * 4 }5` + 6 : string ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -273,7 +273,7 @@ var g3 = `${ 3 * 4 }5` + 6; var h3 = `2${ 3 * 4 }5` + 6; >h3 : string >`2${ 3 * 4 }5` + 6 : string ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -284,7 +284,7 @@ var i3 = 1 + `${ 3 * 4 }` + 6; >1 + `${ 3 * 4 }` + 6 : string >1 + `${ 3 * 4 }` : string >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -295,7 +295,7 @@ var j3 = 1 + `2${ 3 * 4 }` + 6; >1 + `2${ 3 * 4 }` + 6 : string >1 + `2${ 3 * 4 }` : string >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -306,7 +306,7 @@ var k3 = 1 + `${ 3 * 4 }5` + 6; >1 + `${ 3 * 4 }5` + 6 : string >1 + `${ 3 * 4 }5` : string >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -317,7 +317,7 @@ var l3 = 1 + `2${ 3 * 4 }5` + 6; >1 + `2${ 3 * 4 }5` + 6 : string >1 + `2${ 3 * 4 }5` : string >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -327,7 +327,7 @@ var a4 = 1 + `${ 3 & 4 }`; >a4 : string >1 + `${ 3 & 4 }` : string >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -336,7 +336,7 @@ var b4 = 1 + `2${ 3 & 4 }`; >b4 : string >1 + `2${ 3 & 4 }` : string >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -345,7 +345,7 @@ var c4 = 1 + `${ 3 & 4 }5`; >c4 : string >1 + `${ 3 & 4 }5` : string >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -354,7 +354,7 @@ var d4 = 1 + `2${ 3 & 4 }5`; >d4 : string >1 + `2${ 3 & 4 }5` : string >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -362,7 +362,7 @@ var d4 = 1 + `2${ 3 & 4 }5`; var e4 = `${ 3 & 4 }` + 6; >e4 : string >`${ 3 & 4 }` + 6 : string ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -371,7 +371,7 @@ var e4 = `${ 3 & 4 }` + 6; var f4 = `2${ 3 & 4 }` + 6; >f4 : string >`2${ 3 & 4 }` + 6 : string ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -380,7 +380,7 @@ var f4 = `2${ 3 & 4 }` + 6; var g4 = `${ 3 & 4 }5` + 6; >g4 : string >`${ 3 & 4 }5` + 6 : string ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -389,7 +389,7 @@ var g4 = `${ 3 & 4 }5` + 6; var h4 = `2${ 3 & 4 }5` + 6; >h4 : string >`2${ 3 & 4 }5` + 6 : string ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -400,7 +400,7 @@ var i4 = 1 + `${ 3 & 4 }` + 6; >1 + `${ 3 & 4 }` + 6 : string >1 + `${ 3 & 4 }` : string >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -411,7 +411,7 @@ var j4 = 1 + `2${ 3 & 4 }` + 6; >1 + `2${ 3 & 4 }` + 6 : string >1 + `2${ 3 & 4 }` : string >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -422,7 +422,7 @@ var k4 = 1 + `${ 3 & 4 }5` + 6; >1 + `${ 3 & 4 }5` + 6 : string >1 + `${ 3 & 4 }5` : string >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -433,7 +433,7 @@ var l4 = 1 + `2${ 3 & 4 }5` + 6; >1 + `2${ 3 & 4 }5` + 6 : string >1 + `2${ 3 & 4 }5` : string >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 diff --git a/tests/baselines/reference/templateStringBinaryOperationsES6Invalid.types b/tests/baselines/reference/templateStringBinaryOperationsES6Invalid.types index 4c859c9108be6..8782991b7106c 100644 --- a/tests/baselines/reference/templateStringBinaryOperationsES6Invalid.types +++ b/tests/baselines/reference/templateStringBinaryOperationsES6Invalid.types @@ -3,55 +3,55 @@ var a = 1 - `${ 3 }`; >a : number >1 - `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 - `2${ 3 }`; >b : number >1 - `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 - `${ 3 }4`; >c : number >1 - `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 - `2${ 3 }4`; >d : number >1 - `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` - 5; >e : number >`${ 3 }` - 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` - 5; >f : number >`2${ 3 }` - 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` - 5; >g : number >`${ 3 }4` - 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` - 5; >h : number >`2${ 3 }4` - 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -59,55 +59,55 @@ var a2 = 1 * `${ 3 }`; >a2 : number >1 * `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b2 = 1 * `2${ 3 }`; >b2 : number >1 * `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c2 = 1 * `${ 3 }4`; >c2 : number >1 * `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d2 = 1 * `2${ 3 }4`; >d2 : number >1 * `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e2 = `${ 3 }` * 5; >e2 : number >`${ 3 }` * 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f2 = `2${ 3 }` * 5; >f2 : number >`2${ 3 }` * 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g2 = `${ 3 }4` * 5; >g2 : number >`${ 3 }4` * 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h2 = `2${ 3 }4` * 5; >h2 : number >`2${ 3 }4` * 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -115,55 +115,55 @@ var a3 = 1 & `${ 3 }`; >a3 : number >1 & `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b3 = 1 & `2${ 3 }`; >b3 : number >1 & `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c3 = 1 & `${ 3 }4`; >c3 : number >1 & `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d3 = 1 & `2${ 3 }4`; >d3 : number >1 & `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e3 = `${ 3 }` & 5; >e3 : number >`${ 3 }` & 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f3 = `2${ 3 }` & 5; >f3 : number >`2${ 3 }` & 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g3 = `${ 3 }4` & 5; >g3 : number >`${ 3 }4` & 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h3 = `2${ 3 }4` & 5; >h3 : number >`2${ 3 }4` & 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -171,7 +171,7 @@ var a4 = 1 - `${ 3 - 4 }`; >a4 : number >1 - `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -180,7 +180,7 @@ var b4 = 1 - `2${ 3 - 4 }`; >b4 : number >1 - `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -189,7 +189,7 @@ var c4 = 1 - `${ 3 - 4 }5`; >c4 : number >1 - `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -198,7 +198,7 @@ var d4 = 1 - `2${ 3 - 4 }5`; >d4 : number >1 - `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -206,7 +206,7 @@ var d4 = 1 - `2${ 3 - 4 }5`; var e4 = `${ 3 - 4 }` - 6; >e4 : number >`${ 3 - 4 }` - 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -215,7 +215,7 @@ var e4 = `${ 3 - 4 }` - 6; var f4 = `2${ 3 - 4 }` - 6; >f4 : number >`2${ 3 - 4 }` - 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -224,7 +224,7 @@ var f4 = `2${ 3 - 4 }` - 6; var g4 = `${ 3 - 4 }5` - 6; >g4 : number >`${ 3 - 4 }5` - 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -233,7 +233,7 @@ var g4 = `${ 3 - 4 }5` - 6; var h4 = `2${ 3 - 4 }5` - 6; >h4 : number >`2${ 3 - 4 }5` - 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -243,7 +243,7 @@ var a5 = 1 - `${ 3 * 4 }`; >a5 : number >1 - `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -252,7 +252,7 @@ var b5 = 1 - `2${ 3 * 4 }`; >b5 : number >1 - `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -261,7 +261,7 @@ var c5 = 1 - `${ 3 * 4 }5`; >c5 : number >1 - `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -270,7 +270,7 @@ var d5 = 1 - `2${ 3 * 4 }5`; >d5 : number >1 - `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -278,7 +278,7 @@ var d5 = 1 - `2${ 3 * 4 }5`; var e5 = `${ 3 * 4 }` - 6; >e5 : number >`${ 3 * 4 }` - 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -287,7 +287,7 @@ var e5 = `${ 3 * 4 }` - 6; var f5 = `2${ 3 * 4 }` - 6; >f5 : number >`2${ 3 * 4 }` - 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -296,7 +296,7 @@ var f5 = `2${ 3 * 4 }` - 6; var g5 = `${ 3 * 4 }5` - 6; >g5 : number >`${ 3 * 4 }5` - 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -305,7 +305,7 @@ var g5 = `${ 3 * 4 }5` - 6; var h5 = `2${ 3 * 4 }5` - 6; >h5 : number >`2${ 3 * 4 }5` - 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -315,7 +315,7 @@ var a6 = 1 - `${ 3 & 4 }`; >a6 : number >1 - `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -324,7 +324,7 @@ var b6 = 1 - `2${ 3 & 4 }`; >b6 : number >1 - `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -333,7 +333,7 @@ var c6 = 1 - `${ 3 & 4 }5`; >c6 : number >1 - `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -342,7 +342,7 @@ var d6 = 1 - `2${ 3 & 4 }5`; >d6 : number >1 - `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -350,7 +350,7 @@ var d6 = 1 - `2${ 3 & 4 }5`; var e6 = `${ 3 & 4 }` - 6; >e6 : number >`${ 3 & 4 }` - 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -359,7 +359,7 @@ var e6 = `${ 3 & 4 }` - 6; var f6 = `2${ 3 & 4 }` - 6; >f6 : number >`2${ 3 & 4 }` - 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -368,7 +368,7 @@ var f6 = `2${ 3 & 4 }` - 6; var g6 = `${ 3 & 4 }5` - 6; >g6 : number >`${ 3 & 4 }5` - 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -377,7 +377,7 @@ var g6 = `${ 3 & 4 }5` - 6; var h6 = `2${ 3 & 4 }5` - 6; >h6 : number >`2${ 3 & 4 }5` - 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -387,7 +387,7 @@ var a7 = 1 * `${ 3 - 4 }`; >a7 : number >1 * `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -396,7 +396,7 @@ var b7 = 1 * `2${ 3 - 4 }`; >b7 : number >1 * `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -405,7 +405,7 @@ var c7 = 1 * `${ 3 - 4 }5`; >c7 : number >1 * `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -414,7 +414,7 @@ var d7 = 1 * `2${ 3 - 4 }5`; >d7 : number >1 * `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -422,7 +422,7 @@ var d7 = 1 * `2${ 3 - 4 }5`; var e7 = `${ 3 - 4 }` * 6; >e7 : number >`${ 3 - 4 }` * 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -431,7 +431,7 @@ var e7 = `${ 3 - 4 }` * 6; var f7 = `2${ 3 - 4 }` * 6; >f7 : number >`2${ 3 - 4 }` * 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -440,7 +440,7 @@ var f7 = `2${ 3 - 4 }` * 6; var g7 = `${ 3 - 4 }5` * 6; >g7 : number >`${ 3 - 4 }5` * 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -449,7 +449,7 @@ var g7 = `${ 3 - 4 }5` * 6; var h7 = `2${ 3 - 4 }5` * 6; >h7 : number >`2${ 3 - 4 }5` * 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -459,7 +459,7 @@ var a8 = 1 * `${ 3 * 4 }`; >a8 : number >1 * `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -468,7 +468,7 @@ var b8 = 1 * `2${ 3 * 4 }`; >b8 : number >1 * `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -477,7 +477,7 @@ var c8 = 1 * `${ 3 * 4 }5`; >c8 : number >1 * `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -486,7 +486,7 @@ var d8 = 1 * `2${ 3 * 4 }5`; >d8 : number >1 * `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -494,7 +494,7 @@ var d8 = 1 * `2${ 3 * 4 }5`; var e8 = `${ 3 * 4 }` * 6; >e8 : number >`${ 3 * 4 }` * 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -503,7 +503,7 @@ var e8 = `${ 3 * 4 }` * 6; var f8 = `2${ 3 * 4 }` * 6; >f8 : number >`2${ 3 * 4 }` * 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -512,7 +512,7 @@ var f8 = `2${ 3 * 4 }` * 6; var g8 = `${ 3 * 4 }5` * 6; >g8 : number >`${ 3 * 4 }5` * 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -521,7 +521,7 @@ var g8 = `${ 3 * 4 }5` * 6; var h8 = `2${ 3 * 4 }5` * 6; >h8 : number >`2${ 3 * 4 }5` * 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -531,7 +531,7 @@ var a9 = 1 * `${ 3 & 4 }`; >a9 : number >1 * `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -540,7 +540,7 @@ var b9 = 1 * `2${ 3 & 4 }`; >b9 : number >1 * `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -549,7 +549,7 @@ var c9 = 1 * `${ 3 & 4 }5`; >c9 : number >1 * `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -558,7 +558,7 @@ var d9 = 1 * `2${ 3 & 4 }5`; >d9 : number >1 * `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -566,7 +566,7 @@ var d9 = 1 * `2${ 3 & 4 }5`; var e9 = `${ 3 & 4 }` * 6; >e9 : number >`${ 3 & 4 }` * 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -575,7 +575,7 @@ var e9 = `${ 3 & 4 }` * 6; var f9 = `2${ 3 & 4 }` * 6; >f9 : number >`2${ 3 & 4 }` * 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -584,7 +584,7 @@ var f9 = `2${ 3 & 4 }` * 6; var g9 = `${ 3 & 4 }5` * 6; >g9 : number >`${ 3 & 4 }5` * 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -593,7 +593,7 @@ var g9 = `${ 3 & 4 }5` * 6; var h9 = `2${ 3 & 4 }5` * 6; >h9 : number >`2${ 3 & 4 }5` * 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -603,7 +603,7 @@ var aa = 1 & `${ 3 - 4 }`; >aa : number >1 & `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -612,7 +612,7 @@ var ba = 1 & `2${ 3 - 4 }`; >ba : number >1 & `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -621,7 +621,7 @@ var ca = 1 & `${ 3 - 4 }5`; >ca : number >1 & `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -630,7 +630,7 @@ var da = 1 & `2${ 3 - 4 }5`; >da : number >1 & `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -638,7 +638,7 @@ var da = 1 & `2${ 3 - 4 }5`; var ea = `${ 3 - 4 }` & 6; >ea : number >`${ 3 - 4 }` & 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -647,7 +647,7 @@ var ea = `${ 3 - 4 }` & 6; var fa = `2${ 3 - 4 }` & 6; >fa : number >`2${ 3 - 4 }` & 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -656,7 +656,7 @@ var fa = `2${ 3 - 4 }` & 6; var ga = `${ 3 - 4 }5` & 6; >ga : number >`${ 3 - 4 }5` & 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -665,7 +665,7 @@ var ga = `${ 3 - 4 }5` & 6; var ha = `2${ 3 - 4 }5` & 6; >ha : number >`2${ 3 - 4 }5` & 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -675,7 +675,7 @@ var ab = 1 & `${ 3 * 4 }`; >ab : number >1 & `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -684,7 +684,7 @@ var bb = 1 & `2${ 3 * 4 }`; >bb : number >1 & `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -693,7 +693,7 @@ var cb = 1 & `${ 3 * 4 }5`; >cb : number >1 & `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -702,7 +702,7 @@ var db = 1 & `2${ 3 * 4 }5`; >db : number >1 & `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -710,7 +710,7 @@ var db = 1 & `2${ 3 * 4 }5`; var eb = `${ 3 * 4 }` & 6; >eb : number >`${ 3 * 4 }` & 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -719,7 +719,7 @@ var eb = `${ 3 * 4 }` & 6; var fb = `2${ 3 * 4 }` & 6; >fb : number >`2${ 3 * 4 }` & 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -728,7 +728,7 @@ var fb = `2${ 3 * 4 }` & 6; var gb = `${ 3 * 4 }5` & 6; >gb : number >`${ 3 * 4 }5` & 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -737,7 +737,7 @@ var gb = `${ 3 * 4 }5` & 6; var hb = `2${ 3 * 4 }5` & 6; >hb : number >`2${ 3 * 4 }5` & 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -747,7 +747,7 @@ var ac = 1 & `${ 3 & 4 }`; >ac : number >1 & `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -756,7 +756,7 @@ var bc = 1 & `2${ 3 & 4 }`; >bc : number >1 & `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -765,7 +765,7 @@ var cc = 1 & `${ 3 & 4 }5`; >cc : number >1 & `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -774,7 +774,7 @@ var dc = 1 & `2${ 3 & 4 }5`; >dc : number >1 & `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -782,7 +782,7 @@ var dc = 1 & `2${ 3 & 4 }5`; var ec = `${ 3 & 4 }` & 6; >ec : number >`${ 3 & 4 }` & 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -791,7 +791,7 @@ var ec = `${ 3 & 4 }` & 6; var fc = `2${ 3 & 4 }` & 6; >fc : number >`2${ 3 & 4 }` & 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -800,7 +800,7 @@ var fc = `2${ 3 & 4 }` & 6; var gc = `${ 3 & 4 }5` & 6; >gc : number >`${ 3 & 4 }5` & 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -809,7 +809,7 @@ var gc = `${ 3 & 4 }5` & 6; var hc = `2${ 3 & 4 }5` & 6; >hc : number >`2${ 3 & 4 }5` & 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 diff --git a/tests/baselines/reference/templateStringBinaryOperationsInvalid.types b/tests/baselines/reference/templateStringBinaryOperationsInvalid.types index 2bfb626146530..37f0149ad74db 100644 --- a/tests/baselines/reference/templateStringBinaryOperationsInvalid.types +++ b/tests/baselines/reference/templateStringBinaryOperationsInvalid.types @@ -3,55 +3,55 @@ var a = 1 - `${ 3 }`; >a : number >1 - `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b = 1 - `2${ 3 }`; >b : number >1 - `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c = 1 - `${ 3 }4`; >c : number >1 - `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d = 1 - `2${ 3 }4`; >d : number >1 - `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e = `${ 3 }` - 5; >e : number >`${ 3 }` - 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f = `2${ 3 }` - 5; >f : number >`2${ 3 }` - 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g = `${ 3 }4` - 5; >g : number >`${ 3 }4` - 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h = `2${ 3 }4` - 5; >h : number >`2${ 3 }4` - 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -59,55 +59,55 @@ var a2 = 1 * `${ 3 }`; >a2 : number >1 * `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b2 = 1 * `2${ 3 }`; >b2 : number >1 * `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c2 = 1 * `${ 3 }4`; >c2 : number >1 * `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d2 = 1 * `2${ 3 }4`; >d2 : number >1 * `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e2 = `${ 3 }` * 5; >e2 : number >`${ 3 }` * 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f2 = `2${ 3 }` * 5; >f2 : number >`2${ 3 }` * 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g2 = `${ 3 }4` * 5; >g2 : number >`${ 3 }4` * 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h2 = `2${ 3 }4` * 5; >h2 : number >`2${ 3 }4` * 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -115,55 +115,55 @@ var a3 = 1 & `${ 3 }`; >a3 : number >1 & `${ 3 }` : number >1 : 1 ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 var b3 = 1 & `2${ 3 }`; >b3 : number >1 & `2${ 3 }` : number >1 : 1 ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 var c3 = 1 & `${ 3 }4`; >c3 : number >1 & `${ 3 }4` : number >1 : 1 ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 var d3 = 1 & `2${ 3 }4`; >d3 : number >1 & `2${ 3 }4` : number >1 : 1 ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 var e3 = `${ 3 }` & 5; >e3 : number >`${ 3 }` & 5 : number ->`${ 3 }` : "3" +>`${ 3 }` : string >3 : 3 >5 : 5 var f3 = `2${ 3 }` & 5; >f3 : number >`2${ 3 }` & 5 : number ->`2${ 3 }` : "23" +>`2${ 3 }` : string >3 : 3 >5 : 5 var g3 = `${ 3 }4` & 5; >g3 : number >`${ 3 }4` & 5 : number ->`${ 3 }4` : "34" +>`${ 3 }4` : string >3 : 3 >5 : 5 var h3 = `2${ 3 }4` & 5; >h3 : number >`2${ 3 }4` & 5 : number ->`2${ 3 }4` : "234" +>`2${ 3 }4` : string >3 : 3 >5 : 5 @@ -171,7 +171,7 @@ var a4 = 1 - `${ 3 - 4 }`; >a4 : number >1 - `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -180,7 +180,7 @@ var b4 = 1 - `2${ 3 - 4 }`; >b4 : number >1 - `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -189,7 +189,7 @@ var c4 = 1 - `${ 3 - 4 }5`; >c4 : number >1 - `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -198,7 +198,7 @@ var d4 = 1 - `2${ 3 - 4 }5`; >d4 : number >1 - `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -206,7 +206,7 @@ var d4 = 1 - `2${ 3 - 4 }5`; var e4 = `${ 3 - 4 }` - 6; >e4 : number >`${ 3 - 4 }` - 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -215,7 +215,7 @@ var e4 = `${ 3 - 4 }` - 6; var f4 = `2${ 3 - 4 }` - 6; >f4 : number >`2${ 3 - 4 }` - 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -224,7 +224,7 @@ var f4 = `2${ 3 - 4 }` - 6; var g4 = `${ 3 - 4 }5` - 6; >g4 : number >`${ 3 - 4 }5` - 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -233,7 +233,7 @@ var g4 = `${ 3 - 4 }5` - 6; var h4 = `2${ 3 - 4 }5` - 6; >h4 : number >`2${ 3 - 4 }5` - 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -243,7 +243,7 @@ var a5 = 1 - `${ 3 * 4 }`; >a5 : number >1 - `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -252,7 +252,7 @@ var b5 = 1 - `2${ 3 * 4 }`; >b5 : number >1 - `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -261,7 +261,7 @@ var c5 = 1 - `${ 3 * 4 }5`; >c5 : number >1 - `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -270,7 +270,7 @@ var d5 = 1 - `2${ 3 * 4 }5`; >d5 : number >1 - `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -278,7 +278,7 @@ var d5 = 1 - `2${ 3 * 4 }5`; var e5 = `${ 3 * 4 }` - 6; >e5 : number >`${ 3 * 4 }` - 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -287,7 +287,7 @@ var e5 = `${ 3 * 4 }` - 6; var f5 = `2${ 3 * 4 }` - 6; >f5 : number >`2${ 3 * 4 }` - 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -296,7 +296,7 @@ var f5 = `2${ 3 * 4 }` - 6; var g5 = `${ 3 * 4 }5` - 6; >g5 : number >`${ 3 * 4 }5` - 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -305,7 +305,7 @@ var g5 = `${ 3 * 4 }5` - 6; var h5 = `2${ 3 * 4 }5` - 6; >h5 : number >`2${ 3 * 4 }5` - 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -315,7 +315,7 @@ var a6 = 1 - `${ 3 & 4 }`; >a6 : number >1 - `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -324,7 +324,7 @@ var b6 = 1 - `2${ 3 & 4 }`; >b6 : number >1 - `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -333,7 +333,7 @@ var c6 = 1 - `${ 3 & 4 }5`; >c6 : number >1 - `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -342,7 +342,7 @@ var d6 = 1 - `2${ 3 & 4 }5`; >d6 : number >1 - `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -350,7 +350,7 @@ var d6 = 1 - `2${ 3 & 4 }5`; var e6 = `${ 3 & 4 }` - 6; >e6 : number >`${ 3 & 4 }` - 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -359,7 +359,7 @@ var e6 = `${ 3 & 4 }` - 6; var f6 = `2${ 3 & 4 }` - 6; >f6 : number >`2${ 3 & 4 }` - 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -368,7 +368,7 @@ var f6 = `2${ 3 & 4 }` - 6; var g6 = `${ 3 & 4 }5` - 6; >g6 : number >`${ 3 & 4 }5` - 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -377,7 +377,7 @@ var g6 = `${ 3 & 4 }5` - 6; var h6 = `2${ 3 & 4 }5` - 6; >h6 : number >`2${ 3 & 4 }5` - 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -387,7 +387,7 @@ var a7 = 1 * `${ 3 - 4 }`; >a7 : number >1 * `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -396,7 +396,7 @@ var b7 = 1 * `2${ 3 - 4 }`; >b7 : number >1 * `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -405,7 +405,7 @@ var c7 = 1 * `${ 3 - 4 }5`; >c7 : number >1 * `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -414,7 +414,7 @@ var d7 = 1 * `2${ 3 - 4 }5`; >d7 : number >1 * `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -422,7 +422,7 @@ var d7 = 1 * `2${ 3 - 4 }5`; var e7 = `${ 3 - 4 }` * 6; >e7 : number >`${ 3 - 4 }` * 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -431,7 +431,7 @@ var e7 = `${ 3 - 4 }` * 6; var f7 = `2${ 3 - 4 }` * 6; >f7 : number >`2${ 3 - 4 }` * 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -440,7 +440,7 @@ var f7 = `2${ 3 - 4 }` * 6; var g7 = `${ 3 - 4 }5` * 6; >g7 : number >`${ 3 - 4 }5` * 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -449,7 +449,7 @@ var g7 = `${ 3 - 4 }5` * 6; var h7 = `2${ 3 - 4 }5` * 6; >h7 : number >`2${ 3 - 4 }5` * 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -459,7 +459,7 @@ var a8 = 1 * `${ 3 * 4 }`; >a8 : number >1 * `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -468,7 +468,7 @@ var b8 = 1 * `2${ 3 * 4 }`; >b8 : number >1 * `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -477,7 +477,7 @@ var c8 = 1 * `${ 3 * 4 }5`; >c8 : number >1 * `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -486,7 +486,7 @@ var d8 = 1 * `2${ 3 * 4 }5`; >d8 : number >1 * `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -494,7 +494,7 @@ var d8 = 1 * `2${ 3 * 4 }5`; var e8 = `${ 3 * 4 }` * 6; >e8 : number >`${ 3 * 4 }` * 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -503,7 +503,7 @@ var e8 = `${ 3 * 4 }` * 6; var f8 = `2${ 3 * 4 }` * 6; >f8 : number >`2${ 3 * 4 }` * 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -512,7 +512,7 @@ var f8 = `2${ 3 * 4 }` * 6; var g8 = `${ 3 * 4 }5` * 6; >g8 : number >`${ 3 * 4 }5` * 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -521,7 +521,7 @@ var g8 = `${ 3 * 4 }5` * 6; var h8 = `2${ 3 * 4 }5` * 6; >h8 : number >`2${ 3 * 4 }5` * 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -531,7 +531,7 @@ var a9 = 1 * `${ 3 & 4 }`; >a9 : number >1 * `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -540,7 +540,7 @@ var b9 = 1 * `2${ 3 & 4 }`; >b9 : number >1 * `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -549,7 +549,7 @@ var c9 = 1 * `${ 3 & 4 }5`; >c9 : number >1 * `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -558,7 +558,7 @@ var d9 = 1 * `2${ 3 & 4 }5`; >d9 : number >1 * `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -566,7 +566,7 @@ var d9 = 1 * `2${ 3 & 4 }5`; var e9 = `${ 3 & 4 }` * 6; >e9 : number >`${ 3 & 4 }` * 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -575,7 +575,7 @@ var e9 = `${ 3 & 4 }` * 6; var f9 = `2${ 3 & 4 }` * 6; >f9 : number >`2${ 3 & 4 }` * 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -584,7 +584,7 @@ var f9 = `2${ 3 & 4 }` * 6; var g9 = `${ 3 & 4 }5` * 6; >g9 : number >`${ 3 & 4 }5` * 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -593,7 +593,7 @@ var g9 = `${ 3 & 4 }5` * 6; var h9 = `2${ 3 & 4 }5` * 6; >h9 : number >`2${ 3 & 4 }5` * 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -603,7 +603,7 @@ var aa = 1 & `${ 3 - 4 }`; >aa : number >1 & `${ 3 - 4 }` : number >1 : 1 ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -612,7 +612,7 @@ var ba = 1 & `2${ 3 - 4 }`; >ba : number >1 & `2${ 3 - 4 }` : number >1 : 1 ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -621,7 +621,7 @@ var ca = 1 & `${ 3 - 4 }5`; >ca : number >1 & `${ 3 - 4 }5` : number >1 : 1 ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -630,7 +630,7 @@ var da = 1 & `2${ 3 - 4 }5`; >da : number >1 & `2${ 3 - 4 }5` : number >1 : 1 ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -638,7 +638,7 @@ var da = 1 & `2${ 3 - 4 }5`; var ea = `${ 3 - 4 }` & 6; >ea : number >`${ 3 - 4 }` & 6 : number ->`${ 3 - 4 }` : `${number}` +>`${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -647,7 +647,7 @@ var ea = `${ 3 - 4 }` & 6; var fa = `2${ 3 - 4 }` & 6; >fa : number >`2${ 3 - 4 }` & 6 : number ->`2${ 3 - 4 }` : `2${number}` +>`2${ 3 - 4 }` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -656,7 +656,7 @@ var fa = `2${ 3 - 4 }` & 6; var ga = `${ 3 - 4 }5` & 6; >ga : number >`${ 3 - 4 }5` & 6 : number ->`${ 3 - 4 }5` : `${number}5` +>`${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -665,7 +665,7 @@ var ga = `${ 3 - 4 }5` & 6; var ha = `2${ 3 - 4 }5` & 6; >ha : number >`2${ 3 - 4 }5` & 6 : number ->`2${ 3 - 4 }5` : `2${number}5` +>`2${ 3 - 4 }5` : string >3 - 4 : number >3 : 3 >4 : 4 @@ -675,7 +675,7 @@ var ab = 1 & `${ 3 * 4 }`; >ab : number >1 & `${ 3 * 4 }` : number >1 : 1 ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -684,7 +684,7 @@ var bb = 1 & `2${ 3 * 4 }`; >bb : number >1 & `2${ 3 * 4 }` : number >1 : 1 ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -693,7 +693,7 @@ var cb = 1 & `${ 3 * 4 }5`; >cb : number >1 & `${ 3 * 4 }5` : number >1 : 1 ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -702,7 +702,7 @@ var db = 1 & `2${ 3 * 4 }5`; >db : number >1 & `2${ 3 * 4 }5` : number >1 : 1 ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -710,7 +710,7 @@ var db = 1 & `2${ 3 * 4 }5`; var eb = `${ 3 * 4 }` & 6; >eb : number >`${ 3 * 4 }` & 6 : number ->`${ 3 * 4 }` : `${number}` +>`${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -719,7 +719,7 @@ var eb = `${ 3 * 4 }` & 6; var fb = `2${ 3 * 4 }` & 6; >fb : number >`2${ 3 * 4 }` & 6 : number ->`2${ 3 * 4 }` : `2${number}` +>`2${ 3 * 4 }` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -728,7 +728,7 @@ var fb = `2${ 3 * 4 }` & 6; var gb = `${ 3 * 4 }5` & 6; >gb : number >`${ 3 * 4 }5` & 6 : number ->`${ 3 * 4 }5` : `${number}5` +>`${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -737,7 +737,7 @@ var gb = `${ 3 * 4 }5` & 6; var hb = `2${ 3 * 4 }5` & 6; >hb : number >`2${ 3 * 4 }5` & 6 : number ->`2${ 3 * 4 }5` : `2${number}5` +>`2${ 3 * 4 }5` : string >3 * 4 : number >3 : 3 >4 : 4 @@ -747,7 +747,7 @@ var ac = 1 & `${ 3 & 4 }`; >ac : number >1 & `${ 3 & 4 }` : number >1 : 1 ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -756,7 +756,7 @@ var bc = 1 & `2${ 3 & 4 }`; >bc : number >1 & `2${ 3 & 4 }` : number >1 : 1 ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -765,7 +765,7 @@ var cc = 1 & `${ 3 & 4 }5`; >cc : number >1 & `${ 3 & 4 }5` : number >1 : 1 ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -774,7 +774,7 @@ var dc = 1 & `2${ 3 & 4 }5`; >dc : number >1 & `2${ 3 & 4 }5` : number >1 : 1 ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -782,7 +782,7 @@ var dc = 1 & `2${ 3 & 4 }5`; var ec = `${ 3 & 4 }` & 6; >ec : number >`${ 3 & 4 }` & 6 : number ->`${ 3 & 4 }` : `${number}` +>`${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -791,7 +791,7 @@ var ec = `${ 3 & 4 }` & 6; var fc = `2${ 3 & 4 }` & 6; >fc : number >`2${ 3 & 4 }` & 6 : number ->`2${ 3 & 4 }` : `2${number}` +>`2${ 3 & 4 }` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -800,7 +800,7 @@ var fc = `2${ 3 & 4 }` & 6; var gc = `${ 3 & 4 }5` & 6; >gc : number >`${ 3 & 4 }5` & 6 : number ->`${ 3 & 4 }5` : `${number}5` +>`${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 @@ -809,7 +809,7 @@ var gc = `${ 3 & 4 }5` & 6; var hc = `2${ 3 & 4 }5` & 6; >hc : number >`2${ 3 & 4 }5` & 6 : number ->`2${ 3 & 4 }5` : `2${number}5` +>`2${ 3 & 4 }5` : string >3 & 4 : number >3 : 3 >4 : 4 diff --git a/tests/baselines/reference/templateStringInArray.types b/tests/baselines/reference/templateStringInArray.types index 220b0b923d1f6..03271a5dcd7c0 100644 --- a/tests/baselines/reference/templateStringInArray.types +++ b/tests/baselines/reference/templateStringInArray.types @@ -4,6 +4,6 @@ var x = [1, 2, `abc${ 123 }def`]; >[1, 2, `abc${ 123 }def`] : (string | number)[] >1 : 1 >2 : 2 ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInArrowFunction.types b/tests/baselines/reference/templateStringInArrowFunction.types index 326e20d62255f..a059e440d5a84 100644 --- a/tests/baselines/reference/templateStringInArrowFunction.types +++ b/tests/baselines/reference/templateStringInArrowFunction.types @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts === var x = x => `abc${ x }def`; ->x : (x: any) => `abc${any}def` ->x => `abc${ x }def` : (x: any) => `abc${any}def` +>x : (x: any) => string +>x => `abc${ x }def` : (x: any) => string >x : any ->`abc${ x }def` : `abc${any}def` +>`abc${ x }def` : string >x : any diff --git a/tests/baselines/reference/templateStringInArrowFunctionES6.types b/tests/baselines/reference/templateStringInArrowFunctionES6.types index 67b82c570f05a..72611067793df 100644 --- a/tests/baselines/reference/templateStringInArrowFunctionES6.types +++ b/tests/baselines/reference/templateStringInArrowFunctionES6.types @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts === var x = x => `abc${ x }def`; ->x : (x: any) => `abc${any}def` ->x => `abc${ x }def` : (x: any) => `abc${any}def` +>x : (x: any) => string +>x => `abc${ x }def` : (x: any) => string >x : any ->`abc${ x }def` : `abc${any}def` +>`abc${ x }def` : string >x : any diff --git a/tests/baselines/reference/templateStringInCallExpression.types b/tests/baselines/reference/templateStringInCallExpression.types index 4f77d60947ef5..ef1bcca2fa4da 100644 --- a/tests/baselines/reference/templateStringInCallExpression.types +++ b/tests/baselines/reference/templateStringInCallExpression.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInCallExpression.ts === `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); >`abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`) : any ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 ->`hello ${0} world` : "hello 0 world" +>`hello ${0} world` : string >0 : 0 >` ` : " " ->`1${2}3` : "123" +>`1${2}3` : string >2 : 2 diff --git a/tests/baselines/reference/templateStringInCallExpressionES6.types b/tests/baselines/reference/templateStringInCallExpressionES6.types index 6878494406edf..f0c75c7828db5 100644 --- a/tests/baselines/reference/templateStringInCallExpressionES6.types +++ b/tests/baselines/reference/templateStringInCallExpressionES6.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInCallExpressionES6.ts === `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); >`abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`) : any ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 ->`hello ${0} world` : "hello 0 world" +>`hello ${0} world` : string >0 : 0 >` ` : " " ->`1${2}3` : "123" +>`1${2}3` : string >2 : 2 diff --git a/tests/baselines/reference/templateStringInConditional.types b/tests/baselines/reference/templateStringInConditional.types index 07419cc1e8913..a375d572a5df1 100644 --- a/tests/baselines/reference/templateStringInConditional.types +++ b/tests/baselines/reference/templateStringInConditional.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInConditional.ts === var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; >x : string ->`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : "abc def" ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string +>`abc${ " " }def` : string >" " : " " ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` : string >" " : " " ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` : string >" " : " " diff --git a/tests/baselines/reference/templateStringInConditionalES6.types b/tests/baselines/reference/templateStringInConditionalES6.types index 25a00f77091b3..0f65ab2297743 100644 --- a/tests/baselines/reference/templateStringInConditionalES6.types +++ b/tests/baselines/reference/templateStringInConditionalES6.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts === var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; >x : string ->`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : "abc def" ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string +>`abc${ " " }def` : string >" " : " " ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` : string >" " : " " ->`abc${ " " }def` : "abc def" +>`abc${ " " }def` : string >" " : " " diff --git a/tests/baselines/reference/templateStringInDeleteExpression.types b/tests/baselines/reference/templateStringInDeleteExpression.types index 5abeb123965d6..1ae84e4e2ff53 100644 --- a/tests/baselines/reference/templateStringInDeleteExpression.types +++ b/tests/baselines/reference/templateStringInDeleteExpression.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts === delete `abc${0}abc`; >delete `abc${0}abc` : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInDeleteExpressionES6.types b/tests/baselines/reference/templateStringInDeleteExpressionES6.types index e3ed5d4fd47dd..80569e533e42b 100644 --- a/tests/baselines/reference/templateStringInDeleteExpressionES6.types +++ b/tests/baselines/reference/templateStringInDeleteExpressionES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts === delete `abc${0}abc`; >delete `abc${0}abc` : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInDivision.types b/tests/baselines/reference/templateStringInDivision.types index b6d2a45c4b38e..1afbd71fda1b4 100644 --- a/tests/baselines/reference/templateStringInDivision.types +++ b/tests/baselines/reference/templateStringInDivision.types @@ -2,7 +2,7 @@ var x = `abc${ 1 }def` / 1; >x : number >`abc${ 1 }def` / 1 : number ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 >1 : 1 diff --git a/tests/baselines/reference/templateStringInEqualityChecks.errors.txt b/tests/baselines/reference/templateStringInEqualityChecks.errors.txt deleted file mode 100644 index 6d765999b43d4..0000000000000 --- a/tests/baselines/reference/templateStringInEqualityChecks.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts(1,9): error TS2367: This condition will always return 'false' since the types '"abc0abc"' and '"abc"' have no overlap. -tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts(2,9): error TS2367: This condition will always return 'true' since the types '"abc"' and '"abc0abc"' have no overlap. - - -==== tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts (2 errors) ==== - var x = `abc${0}abc` === `abc` || - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"abc0abc"' and '"abc"' have no overlap. - `abc` !== `abc${0}abc` && - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"abc"' and '"abc0abc"' have no overlap. - `abc${0}abc` == "abc0abc" && - "abc0abc" !== `abc${0}abc`; \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInEqualityChecks.types b/tests/baselines/reference/templateStringInEqualityChecks.types index 3cf7469e28dcd..cddc533a23947 100644 --- a/tests/baselines/reference/templateStringInEqualityChecks.types +++ b/tests/baselines/reference/templateStringInEqualityChecks.types @@ -3,7 +3,7 @@ var x = `abc${0}abc` === `abc` || >x : boolean >`abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean >`abc${0}abc` === `abc` : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >`abc` : "abc" @@ -12,18 +12,18 @@ var x = `abc${0}abc` === `abc` || >`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" : boolean >`abc` !== `abc${0}abc` : boolean >`abc` : "abc" ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `abc${0}abc` == "abc0abc" && >`abc${0}abc` == "abc0abc" : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >"abc0abc" : "abc0abc" "abc0abc" !== `abc${0}abc`; >"abc0abc" !== `abc${0}abc` : boolean >"abc0abc" : "abc0abc" ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.errors.txt b/tests/baselines/reference/templateStringInEqualityChecksES6.errors.txt deleted file mode 100644 index 095914c97be00..0000000000000 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts(1,9): error TS2367: This condition will always return 'false' since the types '"abc0abc"' and '"abc"' have no overlap. -tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts(2,9): error TS2367: This condition will always return 'true' since the types '"abc"' and '"abc0abc"' have no overlap. - - -==== tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts (2 errors) ==== - var x = `abc${0}abc` === `abc` || - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"abc0abc"' and '"abc"' have no overlap. - `abc` !== `abc${0}abc` && - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"abc"' and '"abc0abc"' have no overlap. - `abc${0}abc` == "abc0abc" && - "abc0abc" !== `abc${0}abc`; \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.types b/tests/baselines/reference/templateStringInEqualityChecksES6.types index f67cb61cbcaff..58a243007256e 100644 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.types +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.types @@ -3,7 +3,7 @@ var x = `abc${0}abc` === `abc` || >x : boolean >`abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean >`abc${0}abc` === `abc` : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >`abc` : "abc" @@ -12,18 +12,18 @@ var x = `abc${0}abc` === `abc` || >`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" : boolean >`abc` !== `abc${0}abc` : boolean >`abc` : "abc" ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `abc${0}abc` == "abc0abc" && >`abc${0}abc` == "abc0abc" : boolean ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >"abc0abc" : "abc0abc" "abc0abc" !== `abc${0}abc`; >"abc0abc" !== `abc${0}abc` : boolean >"abc0abc" : "abc0abc" ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInFunctionExpression.types b/tests/baselines/reference/templateStringInFunctionExpression.types index 7c32e1e5858cb..af92d867acd70 100644 --- a/tests/baselines/reference/templateStringInFunctionExpression.types +++ b/tests/baselines/reference/templateStringInFunctionExpression.types @@ -5,11 +5,11 @@ var x = function y() { >y : () => string `abc${ 0 }def` ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 return `abc${ 0 }def`; ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 }; diff --git a/tests/baselines/reference/templateStringInFunctionExpressionES6.types b/tests/baselines/reference/templateStringInFunctionExpressionES6.types index e7a310a7f0607..2ab90b9e37404 100644 --- a/tests/baselines/reference/templateStringInFunctionExpressionES6.types +++ b/tests/baselines/reference/templateStringInFunctionExpressionES6.types @@ -5,11 +5,11 @@ var x = function y() { >y : () => string `abc${ 0 }def` ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 return `abc${ 0 }def`; ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 }; diff --git a/tests/baselines/reference/templateStringInInOperator.types b/tests/baselines/reference/templateStringInInOperator.types index 2c00b2f40a1e3..5ed944af49626 100644 --- a/tests/baselines/reference/templateStringInInOperator.types +++ b/tests/baselines/reference/templateStringInInOperator.types @@ -2,7 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; >x : boolean >`${ "hi" }` in { hi: 10, hello: 20} : boolean ->`${ "hi" }` : "hi" +>`${ "hi" }` : string >"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number diff --git a/tests/baselines/reference/templateStringInInOperatorES6.types b/tests/baselines/reference/templateStringInInOperatorES6.types index c78a128a28f3c..335b77380c2ad 100644 --- a/tests/baselines/reference/templateStringInInOperatorES6.types +++ b/tests/baselines/reference/templateStringInInOperatorES6.types @@ -2,7 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; >x : boolean >`${ "hi" }` in { hi: 10, hello: 20} : boolean ->`${ "hi" }` : "hi" +>`${ "hi" }` : string >"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } >hi : number diff --git a/tests/baselines/reference/templateStringInIndexExpression.types b/tests/baselines/reference/templateStringInIndexExpression.types index 5d05878b17cf7..9ad6b1e141db0 100644 --- a/tests/baselines/reference/templateStringInIndexExpression.types +++ b/tests/baselines/reference/templateStringInIndexExpression.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts === `abc${0}abc`[`0`]; >`abc${0}abc`[`0`] : error ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >`0` : "0" diff --git a/tests/baselines/reference/templateStringInIndexExpressionES6.types b/tests/baselines/reference/templateStringInIndexExpressionES6.types index aef018ff0f927..d86fb2309e72b 100644 --- a/tests/baselines/reference/templateStringInIndexExpressionES6.types +++ b/tests/baselines/reference/templateStringInIndexExpressionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts === `abc${0}abc`[`0`]; >`abc${0}abc`[`0`] : error ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >`0` : "0" diff --git a/tests/baselines/reference/templateStringInInstanceOf.types b/tests/baselines/reference/templateStringInInstanceOf.types index a551448dd38e9..244d008da5252 100644 --- a/tests/baselines/reference/templateStringInInstanceOf.types +++ b/tests/baselines/reference/templateStringInInstanceOf.types @@ -2,7 +2,7 @@ var x = `abc${ 0 }def` instanceof String; >x : boolean >`abc${ 0 }def` instanceof String : boolean ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 >String : StringConstructor diff --git a/tests/baselines/reference/templateStringInInstanceOfES6.types b/tests/baselines/reference/templateStringInInstanceOfES6.types index 396c6da8e9d0c..c93393def3831 100644 --- a/tests/baselines/reference/templateStringInInstanceOfES6.types +++ b/tests/baselines/reference/templateStringInInstanceOfES6.types @@ -2,7 +2,7 @@ var x = `abc${ 0 }def` instanceof String; >x : boolean >`abc${ 0 }def` instanceof String : boolean ->`abc${ 0 }def` : "abc0def" +>`abc${ 0 }def` : string >0 : 0 >String : StringConstructor diff --git a/tests/baselines/reference/templateStringInModuleName.types b/tests/baselines/reference/templateStringInModuleName.types index 9258b48d4dd34..8ebf16e05d2f8 100644 --- a/tests/baselines/reference/templateStringInModuleName.types +++ b/tests/baselines/reference/templateStringInModuleName.types @@ -10,6 +10,6 @@ declare module `M${2}` { >declare : any >module `M${2}` : any >module : any ->`M${2}` : "M2" +>`M${2}` : string >2 : 2 } diff --git a/tests/baselines/reference/templateStringInModuleNameES6.types b/tests/baselines/reference/templateStringInModuleNameES6.types index 0efaf18adfbab..9e7aaafd9ea93 100644 --- a/tests/baselines/reference/templateStringInModuleNameES6.types +++ b/tests/baselines/reference/templateStringInModuleNameES6.types @@ -10,6 +10,6 @@ declare module `M${2}` { >declare : any >module `M${2}` : any >module : any ->`M${2}` : "M2" +>`M${2}` : string >2 : 2 } diff --git a/tests/baselines/reference/templateStringInModulo.types b/tests/baselines/reference/templateStringInModulo.types index 77413a081d2fc..c348299718224 100644 --- a/tests/baselines/reference/templateStringInModulo.types +++ b/tests/baselines/reference/templateStringInModulo.types @@ -3,6 +3,6 @@ var x = 1 % `abc${ 1 }def`; >x : number >1 % `abc${ 1 }def` : number >1 : 1 ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInModuloES6.types b/tests/baselines/reference/templateStringInModuloES6.types index a4052ee2acd0d..8d515d3f4444b 100644 --- a/tests/baselines/reference/templateStringInModuloES6.types +++ b/tests/baselines/reference/templateStringInModuloES6.types @@ -3,6 +3,6 @@ var x = 1 % `abc${ 1 }def`; >x : number >1 % `abc${ 1 }def` : number >1 : 1 ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInMultiplication.types b/tests/baselines/reference/templateStringInMultiplication.types index 3cc2aaa075afd..133330698e55e 100644 --- a/tests/baselines/reference/templateStringInMultiplication.types +++ b/tests/baselines/reference/templateStringInMultiplication.types @@ -3,6 +3,6 @@ var x = 1 * `abc${ 1 }def`; >x : number >1 * `abc${ 1 }def` : number >1 : 1 ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInMultiplicationES6.types b/tests/baselines/reference/templateStringInMultiplicationES6.types index 2e4513a2c054d..7bc4663bfc5d4 100644 --- a/tests/baselines/reference/templateStringInMultiplicationES6.types +++ b/tests/baselines/reference/templateStringInMultiplicationES6.types @@ -3,6 +3,6 @@ var x = 1 * `abc${ 1 }def`; >x : number >1 * `abc${ 1 }def` : number >1 : 1 ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInNewExpression.types b/tests/baselines/reference/templateStringInNewExpression.types index 1c58cec14d9ff..c4bc213db14b9 100644 --- a/tests/baselines/reference/templateStringInNewExpression.types +++ b/tests/baselines/reference/templateStringInNewExpression.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInNewExpression.ts === new `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); >new `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`) : any ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 ->`hello ${0} world` : "hello 0 world" +>`hello ${0} world` : string >0 : 0 >` ` : " " ->`1${2}3` : "123" +>`1${2}3` : string >2 : 2 diff --git a/tests/baselines/reference/templateStringInNewExpressionES6.types b/tests/baselines/reference/templateStringInNewExpressionES6.types index ef18f9a3b748e..284f59bab1d12 100644 --- a/tests/baselines/reference/templateStringInNewExpressionES6.types +++ b/tests/baselines/reference/templateStringInNewExpressionES6.types @@ -1,11 +1,11 @@ === tests/cases/conformance/es6/templates/templateStringInNewExpressionES6.ts === new `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); >new `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`) : any ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 ->`hello ${0} world` : "hello 0 world" +>`hello ${0} world` : string >0 : 0 >` ` : " " ->`1${2}3` : "123" +>`1${2}3` : string >2 : 2 diff --git a/tests/baselines/reference/templateStringInNewOperator.types b/tests/baselines/reference/templateStringInNewOperator.types index e35f6d8fa03a2..c3853ed431e6c 100644 --- a/tests/baselines/reference/templateStringInNewOperator.types +++ b/tests/baselines/reference/templateStringInNewOperator.types @@ -2,6 +2,6 @@ var x = new `abc${ 1 }def`; >x : any >new `abc${ 1 }def` : any ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInNewOperatorES6.types b/tests/baselines/reference/templateStringInNewOperatorES6.types index fccea6b14c983..ff6a9dbfb2924 100644 --- a/tests/baselines/reference/templateStringInNewOperatorES6.types +++ b/tests/baselines/reference/templateStringInNewOperatorES6.types @@ -2,6 +2,6 @@ var x = new `abc${ 1 }def`; >x : any >new `abc${ 1 }def` : any ->`abc${ 1 }def` : "abc1def" +>`abc${ 1 }def` : string >1 : 1 diff --git a/tests/baselines/reference/templateStringInObjectLiteral.types b/tests/baselines/reference/templateStringInObjectLiteral.types index c796962283c3f..e0ebb07e8b9e1 100644 --- a/tests/baselines/reference/templateStringInObjectLiteral.types +++ b/tests/baselines/reference/templateStringInObjectLiteral.types @@ -6,7 +6,7 @@ var x = { a: `abc${ 123 }def`, >a : string ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 `b`: 321 diff --git a/tests/baselines/reference/templateStringInObjectLiteralES6.types b/tests/baselines/reference/templateStringInObjectLiteralES6.types index ae46359177bda..30797e78c6b76 100644 --- a/tests/baselines/reference/templateStringInObjectLiteralES6.types +++ b/tests/baselines/reference/templateStringInObjectLiteralES6.types @@ -6,7 +6,7 @@ var x = { a: `abc${ 123 }def`, >a : string ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 `b`: 321 diff --git a/tests/baselines/reference/templateStringInParentheses.types b/tests/baselines/reference/templateStringInParentheses.types index c69dce0b49e73..ca9b328d5b5a1 100644 --- a/tests/baselines/reference/templateStringInParentheses.types +++ b/tests/baselines/reference/templateStringInParentheses.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringInParentheses.ts === var x = (`abc${0}abc`); >x : string ->(`abc${0}abc`) : "abc0abc" ->`abc${0}abc` : "abc0abc" +>(`abc${0}abc`) : string +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInParenthesesES6.types b/tests/baselines/reference/templateStringInParenthesesES6.types index 5b0986aee052c..518ad88091865 100644 --- a/tests/baselines/reference/templateStringInParenthesesES6.types +++ b/tests/baselines/reference/templateStringInParenthesesES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts === var x = (`abc${0}abc`); >x : string ->(`abc${0}abc`) : "abc0abc" ->`abc${0}abc` : "abc0abc" +>(`abc${0}abc`) : string +>`abc${0}abc` : string >0 : 0 diff --git a/tests/baselines/reference/templateStringInPropertyAssignment.types b/tests/baselines/reference/templateStringInPropertyAssignment.types index 6850229d1ef16..c47a921e94117 100644 --- a/tests/baselines/reference/templateStringInPropertyAssignment.types +++ b/tests/baselines/reference/templateStringInPropertyAssignment.types @@ -5,7 +5,7 @@ var x = { a: `abc${ 123 }def${ 456 }ghi` >a : string ->`abc${ 123 }def${ 456 }ghi` : "abc123def456ghi" +>`abc${ 123 }def${ 456 }ghi` : string >123 : 123 >456 : 456 } diff --git a/tests/baselines/reference/templateStringInPropertyAssignmentES6.types b/tests/baselines/reference/templateStringInPropertyAssignmentES6.types index a0dafd6663899..43a9e0f5507ff 100644 --- a/tests/baselines/reference/templateStringInPropertyAssignmentES6.types +++ b/tests/baselines/reference/templateStringInPropertyAssignmentES6.types @@ -5,7 +5,7 @@ var x = { a: `abc${ 123 }def${ 456 }ghi` >a : string ->`abc${ 123 }def${ 456 }ghi` : "abc123def456ghi" +>`abc${ 123 }def${ 456 }ghi` : string >123 : 123 >456 : 456 } diff --git a/tests/baselines/reference/templateStringInPropertyName2.types b/tests/baselines/reference/templateStringInPropertyName2.types index 5e3652e3e9ae2..627abc040c022 100644 --- a/tests/baselines/reference/templateStringInPropertyName2.types +++ b/tests/baselines/reference/templateStringInPropertyName2.types @@ -5,7 +5,7 @@ var x = { >{ : {} `abc${ 123 }def${ 456 }ghi`: 321 ->`abc${ 123 }def${ 456 }ghi` : "abc123def456ghi" +>`abc${ 123 }def${ 456 }ghi` : string >123 : 123 >456 : 456 >321 : 321 diff --git a/tests/baselines/reference/templateStringInPropertyNameES6_2.types b/tests/baselines/reference/templateStringInPropertyNameES6_2.types index 92868155b71ac..ff96d8155db6a 100644 --- a/tests/baselines/reference/templateStringInPropertyNameES6_2.types +++ b/tests/baselines/reference/templateStringInPropertyNameES6_2.types @@ -5,7 +5,7 @@ var x = { >{ : {} `abc${ 123 }def${ 456 }ghi`: 321 ->`abc${ 123 }def${ 456 }ghi` : "abc123def456ghi" +>`abc${ 123 }def${ 456 }ghi` : string >123 : 123 >456 : 456 >321 : 321 diff --git a/tests/baselines/reference/templateStringInSwitchAndCase.errors.txt b/tests/baselines/reference/templateStringInSwitchAndCase.errors.txt deleted file mode 100644 index 5c7ea1e95376d..0000000000000 --- a/tests/baselines/reference/templateStringInSwitchAndCase.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts(2,10): error TS2678: Type '"abc"' is not comparable to type '"abc0abc"'. -tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts(3,10): error TS2678: Type '"123"' is not comparable to type '"abc0abc"'. - - -==== tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts (2 errors) ==== - switch (`abc${0}abc`) { - case `abc`: - ~~~~~ -!!! error TS2678: Type '"abc"' is not comparable to type '"abc0abc"'. - case `123`: - ~~~~~ -!!! error TS2678: Type '"123"' is not comparable to type '"abc0abc"'. - case `abc${0}abc`: - `def${1}def`; - } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInSwitchAndCase.types b/tests/baselines/reference/templateStringInSwitchAndCase.types index b7b148cc77066..d54891ff05159 100644 --- a/tests/baselines/reference/templateStringInSwitchAndCase.types +++ b/tests/baselines/reference/templateStringInSwitchAndCase.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts === switch (`abc${0}abc`) { ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 case `abc`: @@ -10,10 +10,10 @@ switch (`abc${0}abc`) { >`123` : "123" case `abc${0}abc`: ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `def${1}def`; ->`def${1}def` : "def1def" +>`def${1}def` : string >1 : 1 } diff --git a/tests/baselines/reference/templateStringInSwitchAndCaseES6.errors.txt b/tests/baselines/reference/templateStringInSwitchAndCaseES6.errors.txt deleted file mode 100644 index ef11779c794cf..0000000000000 --- a/tests/baselines/reference/templateStringInSwitchAndCaseES6.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts(2,10): error TS2678: Type '"abc"' is not comparable to type '"abc0abc"'. -tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts(3,10): error TS2678: Type '"123"' is not comparable to type '"abc0abc"'. - - -==== tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts (2 errors) ==== - switch (`abc${0}abc`) { - case `abc`: - ~~~~~ -!!! error TS2678: Type '"abc"' is not comparable to type '"abc0abc"'. - case `123`: - ~~~~~ -!!! error TS2678: Type '"123"' is not comparable to type '"abc0abc"'. - case `abc${0}abc`: - `def${1}def`; - } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInSwitchAndCaseES6.types b/tests/baselines/reference/templateStringInSwitchAndCaseES6.types index 80afd347a9892..8c7c4fee2c1b0 100644 --- a/tests/baselines/reference/templateStringInSwitchAndCaseES6.types +++ b/tests/baselines/reference/templateStringInSwitchAndCaseES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts === switch (`abc${0}abc`) { ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 case `abc`: @@ -10,10 +10,10 @@ switch (`abc${0}abc`) { >`123` : "123" case `abc${0}abc`: ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `def${1}def`; ->`def${1}def` : "def1def" +>`def${1}def` : string >1 : 1 } diff --git a/tests/baselines/reference/templateStringInTaggedTemplate.types b/tests/baselines/reference/templateStringInTaggedTemplate.types index f1eead3fb9d8d..6c4a059bed3b1 100644 --- a/tests/baselines/reference/templateStringInTaggedTemplate.types +++ b/tests/baselines/reference/templateStringInTaggedTemplate.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringInTaggedTemplate.ts === `I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION` >`I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION` : any ->`I AM THE ${ `${ `TAG` } ` } PORTION` : "I AM THE TAG PORTION" ->`${ `TAG` } ` : "TAG " +>`I AM THE ${ `${ `TAG` } ` } PORTION` : string +>`${ `TAG` } ` : string >`TAG` : "TAG" ->`I ${ "AM" } THE TEMPLATE PORTION` : "I AM THE TEMPLATE PORTION" +>`I ${ "AM" } THE TEMPLATE PORTION` : string >"AM" : "AM" diff --git a/tests/baselines/reference/templateStringInTaggedTemplateES6.types b/tests/baselines/reference/templateStringInTaggedTemplateES6.types index aeead5bb5d4ae..dd2a4898a906c 100644 --- a/tests/baselines/reference/templateStringInTaggedTemplateES6.types +++ b/tests/baselines/reference/templateStringInTaggedTemplateES6.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringInTaggedTemplateES6.ts === `I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION` >`I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION` : any ->`I AM THE ${ `${ `TAG` } ` } PORTION` : "I AM THE TAG PORTION" ->`${ `TAG` } ` : "TAG " +>`I AM THE ${ `${ `TAG` } ` } PORTION` : string +>`${ `TAG` } ` : string >`TAG` : "TAG" ->`I ${ "AM" } THE TEMPLATE PORTION` : "I AM THE TEMPLATE PORTION" +>`I ${ "AM" } THE TEMPLATE PORTION` : string >"AM" : "AM" diff --git a/tests/baselines/reference/templateStringInTypeAssertion.types b/tests/baselines/reference/templateStringInTypeAssertion.types index a219f97b65b4d..c8950634a36ee 100644 --- a/tests/baselines/reference/templateStringInTypeAssertion.types +++ b/tests/baselines/reference/templateStringInTypeAssertion.types @@ -2,6 +2,6 @@ var x = `abc${ 123 }def`; >x : any >`abc${ 123 }def` : any ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInTypeAssertionES6.types b/tests/baselines/reference/templateStringInTypeAssertionES6.types index 523eeede88363..becccd7373803 100644 --- a/tests/baselines/reference/templateStringInTypeAssertionES6.types +++ b/tests/baselines/reference/templateStringInTypeAssertionES6.types @@ -2,6 +2,6 @@ var x = `abc${ 123 }def`; >x : any >`abc${ 123 }def` : any ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInTypeOf.types b/tests/baselines/reference/templateStringInTypeOf.types index a1f9d200ac20a..195150c6aa8b8 100644 --- a/tests/baselines/reference/templateStringInTypeOf.types +++ b/tests/baselines/reference/templateStringInTypeOf.types @@ -2,6 +2,6 @@ var x = typeof `abc${ 123 }def`; >x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >typeof `abc${ 123 }def` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInTypeOfES6.types b/tests/baselines/reference/templateStringInTypeOfES6.types index 959ce7decb597..27aab9cc9d981 100644 --- a/tests/baselines/reference/templateStringInTypeOfES6.types +++ b/tests/baselines/reference/templateStringInTypeOfES6.types @@ -2,6 +2,6 @@ var x = typeof `abc${ 123 }def`; >x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >typeof `abc${ 123 }def` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInUnaryPlus.types b/tests/baselines/reference/templateStringInUnaryPlus.types index 5683220783405..aa2b4fe4f2d63 100644 --- a/tests/baselines/reference/templateStringInUnaryPlus.types +++ b/tests/baselines/reference/templateStringInUnaryPlus.types @@ -2,6 +2,6 @@ var x = +`abc${ 123 }def`; >x : number >+`abc${ 123 }def` : number ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInUnaryPlusES6.types b/tests/baselines/reference/templateStringInUnaryPlusES6.types index 1858a309b5496..8286fa8b6c142 100644 --- a/tests/baselines/reference/templateStringInUnaryPlusES6.types +++ b/tests/baselines/reference/templateStringInUnaryPlusES6.types @@ -2,6 +2,6 @@ var x = +`abc${ 123 }def`; >x : number >+`abc${ 123 }def` : number ->`abc${ 123 }def` : "abc123def" +>`abc${ 123 }def` : string >123 : 123 diff --git a/tests/baselines/reference/templateStringInWhile.types b/tests/baselines/reference/templateStringInWhile.types index e21beddf2b8c2..c0914ee771c9c 100644 --- a/tests/baselines/reference/templateStringInWhile.types +++ b/tests/baselines/reference/templateStringInWhile.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringInWhile.ts === while (`abc${0}abc`) { ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `def${1}def`; ->`def${1}def` : "def1def" +>`def${1}def` : string >1 : 1 } diff --git a/tests/baselines/reference/templateStringInWhileES6.types b/tests/baselines/reference/templateStringInWhileES6.types index fc09ced07b9f8..29119d7f77ede 100644 --- a/tests/baselines/reference/templateStringInWhileES6.types +++ b/tests/baselines/reference/templateStringInWhileES6.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringInWhileES6.ts === while (`abc${0}abc`) { ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 `def${1}def`; ->`def${1}def` : "def1def" +>`def${1}def` : string >1 : 1 } diff --git a/tests/baselines/reference/templateStringInYieldKeyword.types b/tests/baselines/reference/templateStringInYieldKeyword.types index 96d966acf0803..71cce7b74eb1b 100644 --- a/tests/baselines/reference/templateStringInYieldKeyword.types +++ b/tests/baselines/reference/templateStringInYieldKeyword.types @@ -1,12 +1,12 @@ === tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts === function* gen() { ->gen : () => Generator<`abc${any}def`, void, unknown> +>gen : () => Generator // Once this is supported, the inner expression does not need to be parenthesized. var x = yield `abc${ x }def`; >x : any >yield `abc${ x }def` : any ->`abc${ x }def` : `abc${any}def` +>`abc${ x }def` : string >x : any } diff --git a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types index 63caabdceeaf1..7d78d7f29fb65 100644 --- a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types +++ b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02.ts === `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` : "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 >" " : " " >" " : " " >" " : " " diff --git a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types index beaa6f39fc78e..ee2b0b3600d34 100644 --- a/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types +++ b/tests/baselines/reference/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.ts === `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` : "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 >" " : " " >" " : " " >" " : " " diff --git a/tests/baselines/reference/templateStringWithEmbeddedAddition.types b/tests/baselines/reference/templateStringWithEmbeddedAddition.types index 17dfa769857a3..56bc197c37764 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedAddition.types +++ b/tests/baselines/reference/templateStringWithEmbeddedAddition.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts === var x = `abc${ 10 + 10 }def`; >x : string ->`abc${ 10 + 10 }def` : `abc${number}def` +>`abc${ 10 + 10 }def` : string >10 + 10 : number >10 : 10 >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types index 50e43d4edfc56..6ee46c39f57c1 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts === var x = `abc${ 10 + 10 }def`; >x : string ->`abc${ 10 + 10 }def` : `abc${number}def` +>`abc${ 10 + 10 }def` : string >10 + 10 : number >10 : 10 >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedArray.types b/tests/baselines/reference/templateStringWithEmbeddedArray.types index 1c50d92da7581..b82fa26d40049 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArray.types +++ b/tests/baselines/reference/templateStringWithEmbeddedArray.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts === var x = `abc${ [1,2,3] }def`; >x : string ->`abc${ [1,2,3] }def` : `abc${string}def` +>`abc${ [1,2,3] }def` : string >[1,2,3] : number[] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types index b9d23edf7ef66..e8701a7f4c30a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts === var x = `abc${ [1,2,3] }def`; >x : string ->`abc${ [1,2,3] }def` : `abc${string}def` +>`abc${ [1,2,3] }def` : string >[1,2,3] : number[] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types index c2bf5c8adf7f7..9e8d81e7ab8a6 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts === var x = `abc${ x => x }def`; >x : string ->`abc${ x => x }def` : `abc${string}def` +>`abc${ x => x }def` : string >x => x : (x: any) => any >x : any >x : any diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types index 04cde9c573f36..a7adad631302f 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts === var x = `abc${ x => x }def`; >x : string ->`abc${ x => x }def` : `abc${string}def` +>`abc${ x => x }def` : string >x => x : (x: any) => any >x : any >x : any diff --git a/tests/baselines/reference/templateStringWithEmbeddedComments.types b/tests/baselines/reference/templateStringWithEmbeddedComments.types index 508149c3144d8..f948a8bdaaf10 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedComments.types +++ b/tests/baselines/reference/templateStringWithEmbeddedComments.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts === `head${ // single line comment ->`head${ // single line comment10}middle${/* Multi- * line * comment */ 20 // closing comment}tail` : "head10\nmiddle20\ntail" +>`head${ // single line comment10}middle${/* Multi- * line * comment */ 20 // closing comment}tail` : string 10 >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types index f8c5c0e6921cd..cd2e0b23441a7 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts === `head${ // single line comment ->`head${ // single line comment10}middle${/* Multi- * line * comment */ 20 // closing comment}tail` : "head10\nmiddle20\ntail" +>`head${ // single line comment10}middle${/* Multi- * line * comment */ 20 // closing comment}tail` : string 10 >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditional.types b/tests/baselines/reference/templateStringWithEmbeddedConditional.types index e70cf84f45e36..d79433e7b8aa3 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedConditional.types +++ b/tests/baselines/reference/templateStringWithEmbeddedConditional.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts === var x = `abc${ true ? false : " " }def`; ->x : "abcfalsedef" | "abc def" ->`abc${ true ? false : " " }def` : "abcfalsedef" | "abc def" +>x : string +>`abc${ true ? false : " " }def` : string >true ? false : " " : false | " " >true : true >false : false diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types index 58e7770cbbcb4..1ddc81a19e701 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts === var x = `abc${ true ? false : " " }def`; ->x : "abcfalsedef" | "abc def" ->`abc${ true ? false : " " }def` : "abcfalsedef" | "abc def" +>x : string +>`abc${ true ? false : " " }def` : string >true ? false : " " : false | " " >true : true >false : false diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivision.types b/tests/baselines/reference/templateStringWithEmbeddedDivision.types index 500ff08ec8388..6f8913756246c 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedDivision.types +++ b/tests/baselines/reference/templateStringWithEmbeddedDivision.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts === var x = `abc${ 1 / 1 }def`; >x : string ->`abc${ 1 / 1 }def` : `abc${number}def` +>`abc${ 1 / 1 }def` : string >1 / 1 : number >1 : 1 >1 : 1 diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types index 292f9c082000e..f91b3a27639ee 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts === var x = `abc${ 1 / 1 }def`; >x : string ->`abc${ 1 / 1 }def` : `abc${number}def` +>`abc${ 1 / 1 }def` : string >1 / 1 : number >1 : 1 >1 : 1 diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types index d3a6abdfc0d3e..19a37ae86f414 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts === var x = `abc${ function y() { return y; } }def`; >x : string ->`abc${ function y() { return y; } }def` : `abc${string}def` +>`abc${ function y() { return y; } }def` : string >function y() { return y; } : () => any >y : () => any >y : () => any diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types index 5f23f58e2a625..c7a4f2e2bc403 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts === var x = `abc${ function y() { return y; } }def`; >x : string ->`abc${ function y() { return y; } }def` : `abc${string}def` +>`abc${ function y() { return y; } }def` : string >function y() { return y; } : () => any >y : () => any >y : () => any diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.types b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types index 617dc58c92041..f97ca55b63364 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts === var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; ->x : "abcfalsedef" | "abctruedef" ->`abc${ "hi" in { hi: 10, hello: 20} }def` : "abcfalsedef" | "abctruedef" +>x : string +>`abc${ "hi" in { hi: 10, hello: 20} }def` : string >"hi" in { hi: 10, hello: 20} : boolean >"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types index ccd38d6cabc58..a1346c2ce6d6c 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts === var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; ->x : "abcfalsedef" | "abctruedef" ->`abc${ "hi" in { hi: 10, hello: 20} }def` : "abcfalsedef" | "abctruedef" +>x : string +>`abc${ "hi" in { hi: 10, hello: 20} }def` : string >"hi" in { hi: 10, hello: 20} : boolean >"hi" : "hi" >{ hi: 10, hello: 20} : { hi: number; hello: number; } diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.types b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.types index 28e3f8b60880d..fea4b20d90446 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts === var x = `abc${ "hello" instanceof String }def`; ->x : "abcfalsedef" | "abctruedef" ->`abc${ "hello" instanceof String }def` : "abcfalsedef" | "abctruedef" +>x : string +>`abc${ "hello" instanceof String }def` : string >"hello" instanceof String : boolean >"hello" : "hello" >String : StringConstructor diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.types b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.types index 729a9fdab7d4e..8fbe2994c65a1 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts === var x = `abc${ "hello" instanceof String }def`; ->x : "abcfalsedef" | "abctruedef" ->`abc${ "hello" instanceof String }def` : "abcfalsedef" | "abctruedef" +>x : string +>`abc${ "hello" instanceof String }def` : string >"hello" instanceof String : boolean >"hello" : "hello" >String : StringConstructor diff --git a/tests/baselines/reference/templateStringWithEmbeddedModulo.types b/tests/baselines/reference/templateStringWithEmbeddedModulo.types index 5b71d6c355475..c471180956327 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedModulo.types +++ b/tests/baselines/reference/templateStringWithEmbeddedModulo.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts === var x = `abc${ 1 % 1 }def`; >x : string ->`abc${ 1 % 1 }def` : `abc${number}def` +>`abc${ 1 % 1 }def` : string >1 % 1 : number >1 : 1 >1 : 1 diff --git a/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types index f160811ed7273..2a1e6b602e2cb 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts === var x = `abc${ 1 % 1 }def`; >x : string ->`abc${ 1 % 1 }def` : `abc${number}def` +>`abc${ 1 % 1 }def` : string >1 % 1 : number >1 : 1 >1 : 1 diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types index 9d74b404fc617..f442ab3165bbc 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts === var x = `abc${ 7 * 6 }def`; >x : string ->`abc${ 7 * 6 }def` : `abc${number}def` +>`abc${ 7 * 6 }def` : string >7 * 6 : number >7 : 7 >6 : 6 diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types index 24927520c237d..3e9f15773efba 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts === var x = `abc${ 7 * 6 }def`; >x : string ->`abc${ 7 * 6 }def` : `abc${number}def` +>`abc${ 7 * 6 }def` : string >7 * 6 : number >7 : 7 >6 : 6 diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types index 6b1c12b81bc3e..1e358a571b3ac 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts === var x = `abc${ new String("Hi") }def`; >x : string ->`abc${ new String("Hi") }def` : `abc${string}def` +>`abc${ new String("Hi") }def` : string >new String("Hi") : String >String : StringConstructor >"Hi" : "Hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types index b96cdfbbe71a9..4939c6f867f3a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : string ->`abc${ new String("Hi") }def` : `abc${string}def` +>`abc${ new String("Hi") }def` : string >new String("Hi") : String >String : StringConstructor >"Hi" : "Hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types index 537ed7b76c3b8..9854e4e905632 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts === var x = `abc${ { x: 10, y: 20 } }def`; >x : string ->`abc${ { x: 10, y: 20 } }def` : `abc${string}def` +>`abc${ { x: 10, y: 20 } }def` : string >{ x: 10, y: 20 } : { x: number; y: number; } >x : number >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types index 286ea752a0947..db086517791dd 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts === var x = `abc${ { x: 10, y: 20 } }def`; >x : string ->`abc${ { x: 10, y: 20 } }def` : `abc${string}def` +>`abc${ { x: 10, y: 20 } }def` : string >{ x: 10, y: 20 } : { x: number; y: number; } >x : number >10 : 10 diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types index ccc38f4e12f8b..cef4f69c0a959 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts === var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; >x : string ->`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : "123456 | 654321 123456 | 654321" ->`456 ${ " | " } 654` : "456 | 654" +>`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : string +>`456 ${ " | " } 654` : string >" | " : " | " ->`456 ${ " | " } 654` : "456 | 654" +>`456 ${ " | " } 654` : string >" | " : " | " diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types index 05dd538b9667b..12532c8402e48 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts === var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; >x : string ->`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : "123456 | 654321 123456 | 654321" ->`456 ${ " | " } 654` : "456 | 654" +>`123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321` : string +>`456 ${ " | " } 654` : string >" | " : " | " ->`456 ${ " | " } 654` : "456 | 654" +>`456 ${ " | " } 654` : string >" | " : " | " diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types index d6e8a4aaedc25..898263825af3a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts === var x = `abc${ (10 + 10) }def`; >x : string ->`abc${ (10 + 10) }def` : `abc${any}def` +>`abc${ (10 + 10) }def` : string >(10 + 10) : any >(10 + 10) : number >10 + 10 : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types index 4e006b001a3c8..e9e81a2d097d5 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts === var x = `abc${ (10 + 10) }def`; >x : string ->`abc${ (10 + 10) }def` : `abc${any}def` +>`abc${ (10 + 10) }def` : string >(10 + 10) : any >(10 + 10) : number >10 + 10 : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types index 7e1879ddfa380..3069fbb80f3f0 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts === var x = `abc${ typeof "hi" }def`; ->x : "abcstringdef" | "abcnumberdef" | "abcbigintdef" | "abcbooleandef" | "abcsymboldef" | "abcundefineddef" | "abcobjectdef" | "abcfunctiondef" ->`abc${ typeof "hi" }def` : "abcstringdef" | "abcnumberdef" | "abcbigintdef" | "abcbooleandef" | "abcsymboldef" | "abcundefineddef" | "abcobjectdef" | "abcfunctiondef" +>x : string +>`abc${ typeof "hi" }def` : string >typeof "hi" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >"hi" : "hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types index 3e645795ceab1..35608d6f6049f 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts === var x = `abc${ typeof "hi" }def`; ->x : "abcstringdef" | "abcnumberdef" | "abcbigintdef" | "abcbooleandef" | "abcsymboldef" | "abcundefineddef" | "abcobjectdef" | "abcfunctiondef" ->`abc${ typeof "hi" }def` : "abcstringdef" | "abcnumberdef" | "abcbigintdef" | "abcbooleandef" | "abcsymboldef" | "abcundefineddef" | "abcobjectdef" | "abcfunctiondef" +>x : string +>`abc${ typeof "hi" }def` : string >typeof "hi" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >"hi" : "hi" diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types index 5e7a765637fc2..9c6c4bc921367 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts === var x = `abc${ +Infinity }def`; >x : string ->`abc${ +Infinity }def` : `abc${number}def` +>`abc${ +Infinity }def` : string >+Infinity : number >Infinity : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types index 79267e084c9a4..4a957f636e6de 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts === var x = `abc${ +Infinity }def`; >x : string ->`abc${ +Infinity }def` : `abc${number}def` +>`abc${ +Infinity }def` : string >+Infinity : number >Infinity : number diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.types b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.types index 43637582d6234..901d91ecb377d 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.types +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.types @@ -5,7 +5,7 @@ function* gen { // Once this is supported, yield *must* be parenthesized. var x = `abc${ yield 10 }def`; >x : string ->`abc${ yield 10 }def` : `abc${any}def` +>`abc${ yield 10 }def` : string >yield 10 : any >10 : 10 } diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.types b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.types index 84e4804e38416..a4226bc3f4400 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.types @@ -5,7 +5,7 @@ function* gen() { // Once this is supported, yield *must* be parenthesized. var x = `abc${ yield 10 }def`; >x : string ->`abc${ yield 10 }def` : `abc${any}def` +>`abc${ yield 10 }def` : string >yield 10 : any >10 : 10 } diff --git a/tests/baselines/reference/templateStringWithEmptyLiteralPortions.types b/tests/baselines/reference/templateStringWithEmptyLiteralPortions.types index fbe6b30e84487..efc2723c270d2 100644 --- a/tests/baselines/reference/templateStringWithEmptyLiteralPortions.types +++ b/tests/baselines/reference/templateStringWithEmptyLiteralPortions.types @@ -5,69 +5,69 @@ var a = ``; var b = `${ 0 }`; >b : string ->`${ 0 }` : "0" +>`${ 0 }` : string >0 : 0 var c = `1${ 0 }`; >c : string ->`1${ 0 }` : "10" +>`1${ 0 }` : string >0 : 0 var d = `${ 0 }2`; >d : string ->`${ 0 }2` : "02" +>`${ 0 }2` : string >0 : 0 var e = `1${ 0 }2`; >e : string ->`1${ 0 }2` : "102" +>`1${ 0 }2` : string >0 : 0 var f = `${ 0 }${ 0 }`; >f : string ->`${ 0 }${ 0 }` : "00" +>`${ 0 }${ 0 }` : string >0 : 0 >0 : 0 var g = `1${ 0 }${ 0 }`; >g : string ->`1${ 0 }${ 0 }` : "100" +>`1${ 0 }${ 0 }` : string >0 : 0 >0 : 0 var h = `${ 0 }2${ 0 }`; >h : string ->`${ 0 }2${ 0 }` : "020" +>`${ 0 }2${ 0 }` : string >0 : 0 >0 : 0 var i = `1${ 0 }2${ 0 }`; >i : string ->`1${ 0 }2${ 0 }` : "1020" +>`1${ 0 }2${ 0 }` : string >0 : 0 >0 : 0 var j = `${ 0 }${ 0 }3`; >j : string ->`${ 0 }${ 0 }3` : "003" +>`${ 0 }${ 0 }3` : string >0 : 0 >0 : 0 var k = `1${ 0 }${ 0 }3`; >k : string ->`1${ 0 }${ 0 }3` : "1003" +>`1${ 0 }${ 0 }3` : string >0 : 0 >0 : 0 var l = `${ 0 }2${ 0 }3`; >l : string ->`${ 0 }2${ 0 }3` : "0203" +>`${ 0 }2${ 0 }3` : string >0 : 0 >0 : 0 var m = `1${ 0 }2${ 0 }3`; >m : string ->`1${ 0 }2${ 0 }3` : "10203" +>`1${ 0 }2${ 0 }3` : string >0 : 0 >0 : 0 diff --git a/tests/baselines/reference/templateStringWithEmptyLiteralPortionsES6.types b/tests/baselines/reference/templateStringWithEmptyLiteralPortionsES6.types index a0c680135c6e2..aad4f1eb09518 100644 --- a/tests/baselines/reference/templateStringWithEmptyLiteralPortionsES6.types +++ b/tests/baselines/reference/templateStringWithEmptyLiteralPortionsES6.types @@ -5,69 +5,69 @@ var a = ``; var b = `${ 0 }`; >b : string ->`${ 0 }` : "0" +>`${ 0 }` : string >0 : 0 var c = `1${ 0 }`; >c : string ->`1${ 0 }` : "10" +>`1${ 0 }` : string >0 : 0 var d = `${ 0 }2`; >d : string ->`${ 0 }2` : "02" +>`${ 0 }2` : string >0 : 0 var e = `1${ 0 }2`; >e : string ->`1${ 0 }2` : "102" +>`1${ 0 }2` : string >0 : 0 var f = `${ 0 }${ 0 }`; >f : string ->`${ 0 }${ 0 }` : "00" +>`${ 0 }${ 0 }` : string >0 : 0 >0 : 0 var g = `1${ 0 }${ 0 }`; >g : string ->`1${ 0 }${ 0 }` : "100" +>`1${ 0 }${ 0 }` : string >0 : 0 >0 : 0 var h = `${ 0 }2${ 0 }`; >h : string ->`${ 0 }2${ 0 }` : "020" +>`${ 0 }2${ 0 }` : string >0 : 0 >0 : 0 var i = `1${ 0 }2${ 0 }`; >i : string ->`1${ 0 }2${ 0 }` : "1020" +>`1${ 0 }2${ 0 }` : string >0 : 0 >0 : 0 var j = `${ 0 }${ 0 }3`; >j : string ->`${ 0 }${ 0 }3` : "003" +>`${ 0 }${ 0 }3` : string >0 : 0 >0 : 0 var k = `1${ 0 }${ 0 }3`; >k : string ->`1${ 0 }${ 0 }3` : "1003" +>`1${ 0 }${ 0 }3` : string >0 : 0 >0 : 0 var l = `${ 0 }2${ 0 }3`; >l : string ->`${ 0 }2${ 0 }3` : "0203" +>`${ 0 }2${ 0 }3` : string >0 : 0 >0 : 0 var m = `1${ 0 }2${ 0 }3`; >m : string ->`1${ 0 }2${ 0 }3` : "10203" +>`1${ 0 }2${ 0 }3` : string >0 : 0 >0 : 0 diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types index b0d90076ef429..8c6d4dc2e79ba 100644 --- a/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts === ` /**head ${ 10 } // still middle ${ 20 } /* still tail ` ->` /**head ${ 10 } // still middle ${ 20 } /* still tail ` : " /**head 10 // still middle 20 /* still tail " +>` /**head ${ 10 } // still middle ${ 20 } /* still tail ` : string >10 : 10 >20 : 20 diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types index 3f27bda84688f..fa9ede6976b3f 100644 --- a/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts === ` /**head ${ 10 } // still middle ${ 20 } /* still tail ` ->` /**head ${ 10 } // still middle ${ 20 } /* still tail ` : " /**head 10 // still middle 20 /* still tail " +>` /**head ${ 10 } // still middle ${ 20 } /* still tail ` : string >10 : 10 >20 : 20 diff --git a/tests/baselines/reference/templateStringWithPropertyAccess.types b/tests/baselines/reference/templateStringWithPropertyAccess.types index 65f006c430c55..faa2fda38889e 100644 --- a/tests/baselines/reference/templateStringWithPropertyAccess.types +++ b/tests/baselines/reference/templateStringWithPropertyAccess.types @@ -2,7 +2,7 @@ `abc${0}abc`.indexOf(`abc`); >`abc${0}abc`.indexOf(`abc`) : number >`abc${0}abc`.indexOf : (searchString: string, position?: number) => number ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >indexOf : (searchString: string, position?: number) => number >`abc` : "abc" diff --git a/tests/baselines/reference/templateStringWithPropertyAccessES6.types b/tests/baselines/reference/templateStringWithPropertyAccessES6.types index 4ffce701c4098..36a84452808e9 100644 --- a/tests/baselines/reference/templateStringWithPropertyAccessES6.types +++ b/tests/baselines/reference/templateStringWithPropertyAccessES6.types @@ -2,7 +2,7 @@ `abc${0}abc`.indexOf(`abc`); >`abc${0}abc`.indexOf(`abc`) : number >`abc${0}abc`.indexOf : (searchString: string, position?: number) => number ->`abc${0}abc` : "abc0abc" +>`abc${0}abc` : string >0 : 0 >indexOf : (searchString: string, position?: number) => number >`abc` : "abc" diff --git a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.types b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.types index 902b87f52cbc5..1ffd2e8305e72 100644 --- a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.types +++ b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.types @@ -20,7 +20,7 @@ f({}, 10, 10); f `abcdef${ 1234 }${ 5678 }ghijkl`; >f `abcdef${ 1234 }${ 5678 }ghijkl` : void >f : (x: TemplateStringsArray, y: number, z: number) => void ->`abcdef${ 1234 }${ 5678 }ghijkl` : "abcdef12345678ghijkl" +>`abcdef${ 1234 }${ 5678 }ghijkl` : string >1234 : 1234 >5678 : 5678 diff --git a/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.types b/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.types index 2ef3d21cacdfb..5deba77862b6b 100644 --- a/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.types +++ b/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.types @@ -16,7 +16,7 @@ f({}, 10, 10); f `abcdef${ 1234 }${ 5678 }ghijkl`; >f `abcdef${ 1234 }${ 5678 }ghijkl` : void >f : (x: TemplateStringsArray, y: number, z: number) => void ->`abcdef${ 1234 }${ 5678 }ghijkl` : "abcdef12345678ghijkl" +>`abcdef${ 1234 }${ 5678 }ghijkl` : string >1234 : 1234 >5678 : 5678 diff --git a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.types b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.types index 38ba746f76891..6fca2974a3dab 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.types +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.types @@ -20,7 +20,7 @@ f({}, 10, 10); f `abcdef${ 1234 }${ 5678 }ghijkl`; >f `abcdef${ 1234 }${ 5678 }ghijkl` : void >f : (x: TemplateStringsArray, y: number, z: number) => void ->`abcdef${ 1234 }${ 5678 }ghijkl` : "abcdef12345678ghijkl" +>`abcdef${ 1234 }${ 5678 }ghijkl` : string >1234 : 1234 >5678 : 5678 diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.types b/tests/baselines/reference/truthinessCallExpressionCoercion.types index e54295cb3ee03..21c2328455c74 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.types @@ -192,7 +192,7 @@ function A(stats: StatsBase) { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->`[Directory] ${stats.ctime}` : `[Directory] ${number}` +>`[Directory] ${stats.ctime}` : string >stats.ctime : number >stats : StatsBase >ctime : number diff --git a/tests/baselines/reference/typeGuardIntersectionTypes.types b/tests/baselines/reference/typeGuardIntersectionTypes.types index 6d9d0f47ac470..bf119d5743c6e 100644 --- a/tests/baselines/reference/typeGuardIntersectionTypes.types +++ b/tests/baselines/reference/typeGuardIntersectionTypes.types @@ -196,7 +196,7 @@ function identifyBeast(beast: Beast) { log(`unknown - ${beast.legs} legs, wings`); >log(`unknown - ${beast.legs} legs, wings`) : void >log : (s: string) => void ->`unknown - ${beast.legs} legs, wings` : `unknown - ${number} legs, wings` +>`unknown - ${beast.legs} legs, wings` : string >beast.legs : number >beast : Beast & Legged & Winged >legs : number @@ -208,7 +208,7 @@ function identifyBeast(beast: Beast) { log(`manbearpig - ${beast.legs} legs, no wings`); >log(`manbearpig - ${beast.legs} legs, no wings`) : void >log : (s: string) => void ->`manbearpig - ${beast.legs} legs, no wings` : `manbearpig - ${number} legs, no wings` +>`manbearpig - ${beast.legs} legs, no wings` : string >beast.legs : number >beast : Beast & Legged >legs : number diff --git a/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES5.types b/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES5.types index 90cebfc3043c2..ddb24f5de937a 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES5.types +++ b/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES5.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates20_ES5.ts === var x = `\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}`; >x : string ->`\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}` : "Hello world" +>`\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}` : string >`\u{20}\u{020}\u{0020}\u{000020}` : " " diff --git a/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES6.types b/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES6.types index f8ae16d4a4cd1..8244bc5b7fd71 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES6.types +++ b/tests/baselines/reference/unicodeExtendedEscapesInTemplates20_ES6.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates20_ES6.ts === var x = `\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}`; >x : string ->`\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}` : "Hello world" +>`\u{48}\u{65}\u{6c}\u{6c}\u{6f}${`\u{20}\u{020}\u{0020}\u{000020}`}\u{77}\u{6f}\u{72}\u{6c}\u{64}` : string >`\u{20}\u{020}\u{0020}\u{000020}` : " "