diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index d02c6cfcf98b0..266fad21549fe 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -28,6 +28,7 @@ namespace ts { ["es2018", "lib.es2018.d.ts"], ["es2019", "lib.es2019.d.ts"], ["es2020", "lib.es2020.d.ts"], + ["es2021", "lib.es2021.d.ts"], ["esnext", "lib.esnext.d.ts"], // Host only ["dom", "lib.dom.d.ts"], @@ -67,14 +68,17 @@ namespace ts { ["es2020.string", "lib.es2020.string.d.ts"], ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], ["es2020.intl", "lib.es2020.intl.d.ts"], + ["es2021.promise", "lib.es2021.promise.d.ts"], + ["es2021.string", "lib.es2021.string.d.ts"], + ["es2021.weakref", "lib.es2021.weakref.d.ts"], ["esnext.array", "lib.es2019.array.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], - ["esnext.string", "lib.esnext.string.d.ts"], - ["esnext.promise", "lib.esnext.promise.d.ts"], - ["esnext.weakref", "lib.esnext.weakref.d.ts"] + ["esnext.string", "lib.es2021.string.d.ts"], + ["esnext.promise", "lib.es2021.promise.d.ts"], + ["esnext.weakref", "lib.es2021.weakref.d.ts"] ]; /** @@ -290,6 +294,7 @@ namespace ts { es2018: ScriptTarget.ES2018, es2019: ScriptTarget.ES2019, es2020: ScriptTarget.ES2020, + es2021: ScriptTarget.ES2021, esnext: ScriptTarget.ESNext, })), affectsSourceFile: true, @@ -298,7 +303,7 @@ namespace ts { paramType: Diagnostics.VERSION, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, - description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_ESNEXT, + description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_ES2021_or_ESNEXT, }; /* @internal */ diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ee537d6a1fa1b..0744d85cf1b19 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3915,7 +3915,7 @@ "category": "Message", "code": 6014 }, - "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.": { + "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'.": { "category": "Message", "code": 6015 }, diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index ddb8c8cf59ea7..99425c2f29653 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -2713,7 +2713,7 @@ namespace ts { node.transformFlags |= TransformFlags.ContainsES2016; } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { - node.transformFlags |= TransformFlags.ContainsESNext; + node.transformFlags |= TransformFlags.ContainsES2021; } return node; } diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 4de469afc5724..82cd7f10604ec 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -54,6 +54,10 @@ namespace ts { transformers.push(transformESNext); } + if (languageVersion < ScriptTarget.ES2021) { + transformers.push(transformES2021); + } + if (languageVersion < ScriptTarget.ES2020) { transformers.push(transformES2020); } diff --git a/src/compiler/transformers/es2021.ts b/src/compiler/transformers/es2021.ts new file mode 100644 index 0000000000000..271ee58e7f214 --- /dev/null +++ b/src/compiler/transformers/es2021.ts @@ -0,0 +1,91 @@ +/*@internal*/ +namespace ts { + export function transformES2021(context: TransformationContext) { + const { + hoistVariableDeclaration, + factory + } = context; + return chainBundle(context, transformSourceFile); + + function transformSourceFile(node: SourceFile) { + if (node.isDeclarationFile) { + return node; + } + + return visitEachChild(node, visitor, context); + } + + function visitor(node: Node): VisitResult { + if ((node.transformFlags & TransformFlags.ContainsES2021) === 0) { + return node; + } + switch (node.kind) { + case SyntaxKind.BinaryExpression: + const binaryExpression = node; + if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { + return transformLogicalAssignment(binaryExpression); + } + // falls through + default: + return visitEachChild(node, visitor, context); + } + } + + function transformLogicalAssignment(binaryExpression: AssignmentExpression>): VisitResult { + const operator = binaryExpression.operatorToken; + const nonAssignmentOperator = getNonAssignmentOperatorForCompoundAssignment(operator.kind); + let left = skipParentheses(visitNode(binaryExpression.left, visitor, isLeftHandSideExpression)); + let assignmentTarget = left; + const right = skipParentheses(visitNode(binaryExpression.right, visitor, isExpression)); + + if (isAccessExpression(left)) { + const propertyAccessTargetSimpleCopiable = isSimpleCopiableExpression(left.expression); + const propertyAccessTarget = propertyAccessTargetSimpleCopiable ? left.expression : + factory.createTempVariable(hoistVariableDeclaration); + const propertyAccessTargetAssignment = propertyAccessTargetSimpleCopiable ? left.expression : factory.createAssignment( + propertyAccessTarget, + left.expression + ); + + if (isPropertyAccessExpression(left)) { + assignmentTarget = factory.createPropertyAccessExpression( + propertyAccessTarget, + left.name + ); + left = factory.createPropertyAccessExpression( + propertyAccessTargetAssignment, + left.name + ); + } + else { + const elementAccessArgumentSimpleCopiable = isSimpleCopiableExpression(left.argumentExpression); + const elementAccessArgument = elementAccessArgumentSimpleCopiable ? left.argumentExpression : + factory.createTempVariable(hoistVariableDeclaration); + + assignmentTarget = factory.createElementAccessExpression( + propertyAccessTarget, + elementAccessArgument + ); + left = factory.createElementAccessExpression( + propertyAccessTargetAssignment, + elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory.createAssignment( + elementAccessArgument, + left.argumentExpression + ) + ); + } + } + + return factory.createBinaryExpression( + left, + nonAssignmentOperator, + factory.createParenthesizedExpression( + factory.createAssignment( + assignmentTarget, + right + ) + ) + ); + } + } +} diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 09b68d57e25b5..d210ed472f34e 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -1,91 +1,24 @@ /*@internal*/ namespace ts { - export function transformESNext(context: TransformationContext) { - const { - hoistVariableDeclaration, - factory - } = context; - return chainBundle(context, transformSourceFile); - - function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile) { - return node; - } - - return visitEachChild(node, visitor, context); - } - - function visitor(node: Node): VisitResult { - if ((node.transformFlags & TransformFlags.ContainsESNext) === 0) { - return node; - } - switch (node.kind) { - case SyntaxKind.BinaryExpression: - const binaryExpression = node; - if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { - return transformLogicalAssignment(binaryExpression); - } - // falls through - default: - return visitEachChild(node, visitor, context); - } - } - - function transformLogicalAssignment(binaryExpression: AssignmentExpression>): VisitResult { - const operator = binaryExpression.operatorToken; - const nonAssignmentOperator = getNonAssignmentOperatorForCompoundAssignment(operator.kind); - let left = skipParentheses(visitNode(binaryExpression.left, visitor, isLeftHandSideExpression)); - let assignmentTarget = left; - const right = skipParentheses(visitNode(binaryExpression.right, visitor, isExpression)); - - if (isAccessExpression(left)) { - const propertyAccessTargetSimpleCopiable = isSimpleCopiableExpression(left.expression); - const propertyAccessTarget = propertyAccessTargetSimpleCopiable ? left.expression : - factory.createTempVariable(hoistVariableDeclaration); - const propertyAccessTargetAssignment = propertyAccessTargetSimpleCopiable ? left.expression : factory.createAssignment( - propertyAccessTarget, - left.expression - ); - - if (isPropertyAccessExpression(left)) { - assignmentTarget = factory.createPropertyAccessExpression( - propertyAccessTarget, - left.name - ); - left = factory.createPropertyAccessExpression( - propertyAccessTargetAssignment, - left.name - ); - } - else { - const elementAccessArgumentSimpleCopiable = isSimpleCopiableExpression(left.argumentExpression); - const elementAccessArgument = elementAccessArgumentSimpleCopiable ? left.argumentExpression : - factory.createTempVariable(hoistVariableDeclaration); - - assignmentTarget = factory.createElementAccessExpression( - propertyAccessTarget, - elementAccessArgument - ); - left = factory.createElementAccessExpression( - propertyAccessTargetAssignment, - elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory.createAssignment( - elementAccessArgument, - left.argumentExpression - ) - ); - } - } - - return factory.createBinaryExpression( - left, - nonAssignmentOperator, - factory.createParenthesizedExpression( - factory.createAssignment( - assignmentTarget, - right - ) - ) - ); - } - } + export function transformESNext(context: TransformationContext) { + return chainBundle(context, transformSourceFile); + + function transformSourceFile(node: SourceFile) { + if (node.isDeclarationFile) { + return node; + } + + return visitEachChild(node, visitor, context); + } + + function visitor(node: Node): VisitResult { + if ((node.transformFlags & TransformFlags.ContainsESNext) === 0) { + return node; + } + switch (node.kind) { + default: + return visitEachChild(node, visitor, context); + } + } + } } diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index ed64c2c26d593..5f118cf1e47bd 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -53,6 +53,7 @@ "transformers/es2018.ts", "transformers/es2019.ts", "transformers/es2020.ts", + "transformers/es2021.ts", "transformers/esnext.ts", "transformers/jsx.ts", "transformers/es2016.ts", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 091987c17c967..51040e3a87cdf 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -6032,6 +6032,7 @@ namespace ts { ES2018 = 5, ES2019 = 6, ES2020 = 7, + ES2021 = 8, ESNext = 99, JSON = 100, Latest = ESNext, @@ -6443,30 +6444,31 @@ namespace ts { ContainsTypeScript = 1 << 0, ContainsJsx = 1 << 1, ContainsESNext = 1 << 2, - ContainsES2020 = 1 << 3, - ContainsES2019 = 1 << 4, - ContainsES2018 = 1 << 5, - ContainsES2017 = 1 << 6, - ContainsES2016 = 1 << 7, - ContainsES2015 = 1 << 8, - ContainsGenerator = 1 << 9, - ContainsDestructuringAssignment = 1 << 10, + ContainsES2021 = 1 << 3, + ContainsES2020 = 1 << 4, + ContainsES2019 = 1 << 5, + ContainsES2018 = 1 << 6, + ContainsES2017 = 1 << 7, + ContainsES2016 = 1 << 8, + ContainsES2015 = 1 << 9, + ContainsGenerator = 1 << 10, + ContainsDestructuringAssignment = 1 << 11, // Markers // - Flags used to indicate that a subtree contains a specific transformation. - ContainsTypeScriptClassSyntax = 1 << 11, // Decorators, Property Initializers, Parameter Property Initializers - ContainsLexicalThis = 1 << 12, - ContainsRestOrSpread = 1 << 13, - ContainsObjectRestOrSpread = 1 << 14, - ContainsComputedPropertyName = 1 << 15, - ContainsBlockScopedBinding = 1 << 16, - ContainsBindingPattern = 1 << 17, - ContainsYield = 1 << 18, - ContainsAwait = 1 << 19, - ContainsHoistedDeclarationOrCompletion = 1 << 20, - ContainsDynamicImport = 1 << 21, - ContainsClassFields = 1 << 22, - ContainsPossibleTopLevelAwait = 1 << 23, + ContainsTypeScriptClassSyntax = 1 << 12, // Decorators, Property Initializers, Parameter Property Initializers + ContainsLexicalThis = 1 << 13, + ContainsRestOrSpread = 1 << 14, + ContainsObjectRestOrSpread = 1 << 15, + ContainsComputedPropertyName = 1 << 16, + ContainsBlockScopedBinding = 1 << 17, + ContainsBindingPattern = 1 << 18, + ContainsYield = 1 << 19, + ContainsAwait = 1 << 20, + ContainsHoistedDeclarationOrCompletion = 1 << 21, + ContainsDynamicImport = 1 << 22, + ContainsClassFields = 1 << 23, + ContainsPossibleTopLevelAwait = 1 << 24, // Please leave this as 1 << 29. // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system. @@ -6478,6 +6480,7 @@ namespace ts { AssertTypeScript = ContainsTypeScript, AssertJsx = ContainsJsx, AssertESNext = ContainsESNext, + AssertES2021 = ContainsES2021, AssertES2020 = ContainsES2020, AssertES2019 = ContainsES2019, AssertES2018 = ContainsES2018, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 71e382fe5ed1e..b6365f4329238 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -603,9 +603,11 @@ namespace ts { DataView: ["setBigInt64", "setBigUint64", "getBigInt64", "getBigUint64"], RelativeTimeFormat: ["format", "formatToParts", "resolvedOptions"] }, - esnext: { + es2021: { PromiseConstructor: ["any"], - String: ["replaceAll"], + String: ["replaceAll"] + }, + esnext: { NumberFormat: ["formatToParts"] } }; diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 2b9e259b8334f..12cf6652ad71c 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -14,6 +14,8 @@ namespace ts { switch (options.target) { case ScriptTarget.ESNext: return "lib.esnext.full.d.ts"; + case ScriptTarget.ES2021: + return "lib.es2021.full.d.ts"; case ScriptTarget.ES2020: return "lib.es2020.full.d.ts"; case ScriptTarget.ES2019: diff --git a/src/lib/es2021.d.ts b/src/lib/es2021.d.ts new file mode 100644 index 0000000000000..b36544589153c --- /dev/null +++ b/src/lib/es2021.d.ts @@ -0,0 +1,4 @@ +/// +/// +/// +/// diff --git a/src/lib/es2021.full.d.ts b/src/lib/es2021.full.d.ts new file mode 100644 index 0000000000000..c62d63ca7a13d --- /dev/null +++ b/src/lib/es2021.full.d.ts @@ -0,0 +1,5 @@ +/// +/// +/// +/// +/// diff --git a/src/lib/esnext.promise.d.ts b/src/lib/es2021.promise.d.ts similarity index 100% rename from src/lib/esnext.promise.d.ts rename to src/lib/es2021.promise.d.ts diff --git a/src/lib/esnext.string.d.ts b/src/lib/es2021.string.d.ts similarity index 100% rename from src/lib/esnext.string.d.ts rename to src/lib/es2021.string.d.ts diff --git a/src/lib/esnext.weakref.d.ts b/src/lib/es2021.weakref.d.ts similarity index 100% rename from src/lib/esnext.weakref.d.ts rename to src/lib/es2021.weakref.d.ts diff --git a/src/lib/esnext.d.ts b/src/lib/esnext.d.ts index d42e73cad9f1e..4a3ac819c1900 100644 --- a/src/lib/esnext.d.ts +++ b/src/lib/esnext.d.ts @@ -1,5 +1,2 @@ -/// +/// /// -/// -/// -/// diff --git a/src/lib/libs.json b/src/lib/libs.json index 0de9568bd4a85..0eb3d7b657a34 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -8,6 +8,7 @@ "es2018", "es2019", "es2020", + "es2021", "esnext", // Host only "dom.generated", @@ -47,10 +48,10 @@ "es2020.string", "es2020.symbol.wellknown", "es2020.intl", + "es2021.string", + "es2021.promise", + "es2021.weakref", "esnext.intl", - "esnext.string", - "esnext.promise", - "esnext.weakref", // Default libraries "es5.full", "es2015.full", @@ -59,6 +60,7 @@ "es2018.full", "es2019.full", "es2020.full", + "es2021.full", "esnext.full" ], "paths": { diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 68d46ea7de217..fc6c86453bbe6 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -3415,6 +3415,7 @@ namespace ts.server.protocol { ES2018 = "ES2018", ES2019 = "ES2019", ES2020 = "ES2020", + ES2021 = "ES2021", ESNext = "ESNext" } diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 923a36ddea2a1..79a4715b7996b 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -194,7 +194,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'esnext'.", + messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'esnext'.", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 894bddd0aa61c..a84490a5a5a0f 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2961,6 +2961,7 @@ declare namespace ts { ES2018 = 5, ES2019 = 6, ES2020 = 7, + ES2021 = 8, ESNext = 99, JSON = 100, Latest = 99 @@ -9265,6 +9266,7 @@ declare namespace ts.server.protocol { ES2018 = "ES2018", ES2019 = "ES2019", ES2020 = "ES2020", + ES2021 = "ES2021", ESNext = "ESNext" } enum ClassificationType { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 2d5dcc6f245f1..1c70ee038d237 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2961,6 +2961,7 @@ declare namespace ts { ES2018 = 5, ES2019 = 6, ES2020 = 7, + ES2021 = 8, ESNext = 99, JSON = 100, Latest = 99 diff --git a/tests/baselines/reference/callChainWithSuper(target=es2021).js b/tests/baselines/reference/callChainWithSuper(target=es2021).js new file mode 100644 index 0000000000000..30e1ad3886dc5 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2021).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.errors.txt b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.errors.txt index f557dfe6d9caa..7946c1de2a8c6 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.errors.txt +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.errors.txt @@ -28,9 +28,9 @@ tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(36,39): err tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(37,31): error TS2550: Property 'matchAll' does not exist on type '""'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2020' or later. tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(38,47): error TS2550: Property 'matchAll' does not exist on type 'SymbolConstructor'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2020' or later. tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(39,20): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2020' or later. -tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(42,32): error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. -tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(43,33): error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. -tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,70): error TS2550: Property 'formatToParts' does not exist on type 'NumberFormat'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. +tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(42,32): error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2021' or later. +tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(43,33): error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2021' or later. +tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(46,70): error TS2550: Property 'formatToParts' does not exist on type 'NumberFormat'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. ==== tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts (33 errors) ==== @@ -134,13 +134,16 @@ tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,70): err ~~~~~~ !!! error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2020' or later. - // esnext + // es2021 const testPromiseAny = Promise.any([]); ~~~ -!!! error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. +!!! error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2021' or later. const testStringReplaceAll = "".replaceAll(); ~~~~~~~~~~ -!!! error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. +!!! error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2021' or later. + + // esnext const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); ~~~~~~~~~~~~~ -!!! error TS2550: Property 'formatToParts' does not exist on type 'NumberFormat'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. \ No newline at end of file +!!! error TS2550: Property 'formatToParts' does not exist on type 'NumberFormat'. Do you need to change your target library? Try changing the `lib` compiler option to 'esnext' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js index 3acfb2e08f465..0a4f15227b782 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js @@ -39,10 +39,13 @@ const testStringMatchAll = "".matchAll(); const testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); const testBigInt = BigInt(123); -// esnext +// es2021 const testPromiseAny = Promise.any([]); const testStringReplaceAll = "".replaceAll(); -const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); + +// esnext +const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); + //// [doYouNeedToChangeYourTargetLibraryES2016Plus.js] // es2016 @@ -80,7 +83,8 @@ var testPromiseAllSettled = Promise.allSettled([]); var testStringMatchAll = "".matchAll(); var testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); var testBigInt = BigInt(123); -// esnext +// es2021 var testPromiseAny = Promise.any([]); var testStringReplaceAll = "".replaceAll(); +// esnext var testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols index 228d943e2247b..060c494e30149 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols @@ -111,7 +111,7 @@ const testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); const testBigInt = BigInt(123); >testBigInt : Symbol(testBigInt, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 38, 5)) -// esnext +// es2021 const testPromiseAny = Promise.any([]); >testPromiseAny : Symbol(testPromiseAny, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 41, 5)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) @@ -119,8 +119,9 @@ const testPromiseAny = Promise.any([]); const testStringReplaceAll = "".replaceAll(); >testStringReplaceAll : Symbol(testStringReplaceAll, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 42, 5)) +// esnext const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); ->testNumberFormatFormatToParts : Symbol(testNumberFormatFormatToParts, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 43, 5)) +>testNumberFormatFormatToParts : Symbol(testNumberFormatFormatToParts, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 45, 5)) >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --)) >NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.types b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.types index fb0578caf230e..95bd9e9fb15b6 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.types +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.types @@ -238,7 +238,7 @@ const testBigInt = BigInt(123); >BigInt : any >123 : 123 -// esnext +// es2021 const testPromiseAny = Promise.any([]); >testPromiseAny : any >Promise.any([]) : any @@ -254,6 +254,7 @@ const testStringReplaceAll = "".replaceAll(); >"" : "" >replaceAll : any +// esnext const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); >testNumberFormatFormatToParts : any >new Intl.NumberFormat("en-US").formatToParts() : any diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.symbols b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.symbols index d07a23075625c..be0559bfe5251 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.symbols +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.symbols @@ -7,12 +7,12 @@ const IterableWeakMap_cleanup = ({ ref, set }: { readonly ref: WeakRef; >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 1, 48)) ->WeakRef : Symbol(WeakRef, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) readonly set: Set>; >set : Symbol(set, Decl(esNextWeakRefs_IterableWeakMap.ts, 2, 34)) >Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->WeakRef : Symbol(WeakRef, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) }) => { set.delete(ref); @@ -43,7 +43,7 @@ export class IterableWeakMap implements WeakMap { >WeakMap : Symbol(WeakMap, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >K : Symbol(K, Decl(esNextWeakRefs_IterableWeakMap.ts, 9, 29)) >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 12, 31)) ->WeakRef : Symbol(WeakRef, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) >K : Symbol(K, Decl(esNextWeakRefs_IterableWeakMap.ts, 9, 29)) >value : Symbol(value, Decl(esNextWeakRefs_IterableWeakMap.ts, 12, 57)) >V : Symbol(V, Decl(esNextWeakRefs_IterableWeakMap.ts, 9, 46)) @@ -51,12 +51,12 @@ export class IterableWeakMap implements WeakMap { #refSet = new Set>(); >#refSet : Symbol(IterableWeakMap.#refSet, Decl(esNextWeakRefs_IterableWeakMap.ts, 12, 72)) >Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->WeakRef : Symbol(WeakRef, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) >K : Symbol(K, Decl(esNextWeakRefs_IterableWeakMap.ts, 9, 29)) #finalizationGroup = new FinalizationRegistry(IterableWeakMap_cleanup); >#finalizationGroup : Symbol(IterableWeakMap.#finalizationGroup, Decl(esNextWeakRefs_IterableWeakMap.ts, 13, 36)) ->FinalizationRegistry : Symbol(FinalizationRegistry, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>FinalizationRegistry : Symbol(FinalizationRegistry, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) >IterableWeakMap_cleanup : Symbol(IterableWeakMap_cleanup, Decl(esNextWeakRefs_IterableWeakMap.ts, 1, 5)) constructor(iterable: Iterable<[key: K, value: V]> | null = null) { @@ -111,7 +111,7 @@ export class IterableWeakMap implements WeakMap { } else { const ref = new WeakRef(key); >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 29, 17)) ->WeakRef : Symbol(WeakRef, Decl(lib.esnext.weakref.d.ts, --, --), Decl(lib.esnext.weakref.d.ts, --, --)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) >key : Symbol(key, Decl(esNextWeakRefs_IterableWeakMap.ts, 24, 8)) this.#weakMap.set(key, { ref, value }); @@ -131,10 +131,10 @@ export class IterableWeakMap implements WeakMap { >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 29, 17)) this.#finalizationGroup.register(key, { ->this.#finalizationGroup.register : Symbol(FinalizationRegistry.register, Decl(lib.esnext.weakref.d.ts, --, --)) +>this.#finalizationGroup.register : Symbol(FinalizationRegistry.register, Decl(lib.es2021.weakref.d.ts, --, --)) >this.#finalizationGroup : Symbol(IterableWeakMap.#finalizationGroup, Decl(esNextWeakRefs_IterableWeakMap.ts, 13, 36)) >this : Symbol(IterableWeakMap, Decl(esNextWeakRefs_IterableWeakMap.ts, 6, 2)) ->register : Symbol(FinalizationRegistry.register, Decl(lib.esnext.weakref.d.ts, --, --)) +>register : Symbol(FinalizationRegistry.register, Decl(lib.es2021.weakref.d.ts, --, --)) >key : Symbol(key, Decl(esNextWeakRefs_IterableWeakMap.ts, 24, 8)) set: this.#refSet, @@ -220,10 +220,10 @@ export class IterableWeakMap implements WeakMap { >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 55, 15)) this.#finalizationGroup.unregister(ref); ->this.#finalizationGroup.unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.esnext.weakref.d.ts, --, --)) +>this.#finalizationGroup.unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.es2021.weakref.d.ts, --, --)) >this.#finalizationGroup : Symbol(IterableWeakMap.#finalizationGroup, Decl(esNextWeakRefs_IterableWeakMap.ts, 13, 36)) >this : Symbol(IterableWeakMap, Decl(esNextWeakRefs_IterableWeakMap.ts, 6, 2)) ->unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.esnext.weakref.d.ts, --, --)) +>unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.es2021.weakref.d.ts, --, --)) >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 55, 15)) return true; @@ -248,9 +248,9 @@ export class IterableWeakMap implements WeakMap { const key = ref.deref(); >key : Symbol(key, Decl(esNextWeakRefs_IterableWeakMap.ts, 65, 17)) ->ref.deref : Symbol(WeakRef.deref, Decl(lib.esnext.weakref.d.ts, --, --)) +>ref.deref : Symbol(WeakRef.deref, Decl(lib.es2021.weakref.d.ts, --, --)) >ref : Symbol(ref, Decl(esNextWeakRefs_IterableWeakMap.ts, 64, 18)) ->deref : Symbol(WeakRef.deref, Decl(lib.esnext.weakref.d.ts, --, --)) +>deref : Symbol(WeakRef.deref, Decl(lib.es2021.weakref.d.ts, --, --)) if (key === undefined) continue; >key : Symbol(key, Decl(esNextWeakRefs_IterableWeakMap.ts, 65, 17)) diff --git a/tests/baselines/reference/logicalAssignment1(target=es2015).symbols b/tests/baselines/reference/logicalAssignment1(target=es2015).symbols index 5705fc2d1042a..b40892b937605 100644 --- a/tests/baselines/reference/logicalAssignment1(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment1(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : Symbol(a, Decl(logicalAssignment1.ts, 0, 11)) diff --git a/tests/baselines/reference/logicalAssignment1(target=es2015).types b/tests/baselines/reference/logicalAssignment1(target=es2015).types index 29a224ecef79b..2d0f9f25f7cb8 100644 --- a/tests/baselines/reference/logicalAssignment1(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment1(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : string | undefined diff --git a/tests/baselines/reference/logicalAssignment1(target=es2020).symbols b/tests/baselines/reference/logicalAssignment1(target=es2020).symbols index 5705fc2d1042a..b40892b937605 100644 --- a/tests/baselines/reference/logicalAssignment1(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment1(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : Symbol(a, Decl(logicalAssignment1.ts, 0, 11)) diff --git a/tests/baselines/reference/logicalAssignment1(target=es2020).types b/tests/baselines/reference/logicalAssignment1(target=es2020).types index 29a224ecef79b..2d0f9f25f7cb8 100644 --- a/tests/baselines/reference/logicalAssignment1(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment1(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : string | undefined diff --git a/tests/baselines/reference/logicalAssignment1(target=es2021).js b/tests/baselines/reference/logicalAssignment1(target=es2021).js new file mode 100644 index 0000000000000..4adf005014e39 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment1(target=es2021).js @@ -0,0 +1,39 @@ +//// [logicalAssignment1.ts] +declare let a: string | undefined +declare let b: string | undefined +declare let c: string | undefined + +declare let d: number | undefined +declare let e: number | undefined +declare let f: number | undefined + +declare let g: 0 | 1 | 42 +declare let h: 0 | 1 | 42 +declare let i: 0 | 1 | 42 + + +a &&= "foo" +b ||= "foo" +c ??= "foo" + + +d &&= 42 +e ||= 42 +f ??= 42 + +g &&= 42 +h ||= 42 +i ??= 42 + + +//// [logicalAssignment1.js] +"use strict"; +a &&= "foo"; +b ||= "foo"; +c ??= "foo"; +d &&= 42; +e ||= 42; +f ??= 42; +g &&= 42; +h ||= 42; +i ??= 42; diff --git a/tests/baselines/reference/logicalAssignment1(target=es2021).symbols b/tests/baselines/reference/logicalAssignment1(target=es2021).symbols new file mode 100644 index 0000000000000..b40892b937605 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment1(target=es2021).symbols @@ -0,0 +1,57 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === +declare let a: string | undefined +>a : Symbol(a, Decl(logicalAssignment1.ts, 0, 11)) + +declare let b: string | undefined +>b : Symbol(b, Decl(logicalAssignment1.ts, 1, 11)) + +declare let c: string | undefined +>c : Symbol(c, Decl(logicalAssignment1.ts, 2, 11)) + +declare let d: number | undefined +>d : Symbol(d, Decl(logicalAssignment1.ts, 4, 11)) + +declare let e: number | undefined +>e : Symbol(e, Decl(logicalAssignment1.ts, 5, 11)) + +declare let f: number | undefined +>f : Symbol(f, Decl(logicalAssignment1.ts, 6, 11)) + +declare let g: 0 | 1 | 42 +>g : Symbol(g, Decl(logicalAssignment1.ts, 8, 11)) + +declare let h: 0 | 1 | 42 +>h : Symbol(h, Decl(logicalAssignment1.ts, 9, 11)) + +declare let i: 0 | 1 | 42 +>i : Symbol(i, Decl(logicalAssignment1.ts, 10, 11)) + + +a &&= "foo" +>a : Symbol(a, Decl(logicalAssignment1.ts, 0, 11)) + +b ||= "foo" +>b : Symbol(b, Decl(logicalAssignment1.ts, 1, 11)) + +c ??= "foo" +>c : Symbol(c, Decl(logicalAssignment1.ts, 2, 11)) + + +d &&= 42 +>d : Symbol(d, Decl(logicalAssignment1.ts, 4, 11)) + +e ||= 42 +>e : Symbol(e, Decl(logicalAssignment1.ts, 5, 11)) + +f ??= 42 +>f : Symbol(f, Decl(logicalAssignment1.ts, 6, 11)) + +g &&= 42 +>g : Symbol(g, Decl(logicalAssignment1.ts, 8, 11)) + +h ||= 42 +>h : Symbol(h, Decl(logicalAssignment1.ts, 9, 11)) + +i ??= 42 +>i : Symbol(i, Decl(logicalAssignment1.ts, 10, 11)) + diff --git a/tests/baselines/reference/logicalAssignment1(target=es2021).types b/tests/baselines/reference/logicalAssignment1(target=es2021).types new file mode 100644 index 0000000000000..2d0f9f25f7cb8 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment1(target=es2021).types @@ -0,0 +1,75 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === +declare let a: string | undefined +>a : string | undefined + +declare let b: string | undefined +>b : string | undefined + +declare let c: string | undefined +>c : string | undefined + +declare let d: number | undefined +>d : number | undefined + +declare let e: number | undefined +>e : number | undefined + +declare let f: number | undefined +>f : number | undefined + +declare let g: 0 | 1 | 42 +>g : 0 | 1 | 42 + +declare let h: 0 | 1 | 42 +>h : 0 | 1 | 42 + +declare let i: 0 | 1 | 42 +>i : 0 | 1 | 42 + + +a &&= "foo" +>a &&= "foo" : "" | "foo" | undefined +>a : string | undefined +>"foo" : "foo" + +b ||= "foo" +>b ||= "foo" : string +>b : string | undefined +>"foo" : "foo" + +c ??= "foo" +>c ??= "foo" : string +>c : string | undefined +>"foo" : "foo" + + +d &&= 42 +>d &&= 42 : 0 | 42 | undefined +>d : number | undefined +>42 : 42 + +e ||= 42 +>e ||= 42 : number +>e : number | undefined +>42 : 42 + +f ??= 42 +>f ??= 42 : number +>f : number | undefined +>42 : 42 + +g &&= 42 +>g &&= 42 : 0 | 42 +>g : 0 | 1 | 42 +>42 : 42 + +h ||= 42 +>h ||= 42 : 1 | 42 +>h : 0 | 1 | 42 +>42 : 42 + +i ??= 42 +>i ??= 42 : 0 | 1 | 42 +>i : 0 | 1 | 42 +>42 : 42 + diff --git a/tests/baselines/reference/logicalAssignment1(target=esnext).symbols b/tests/baselines/reference/logicalAssignment1(target=esnext).symbols index 5705fc2d1042a..b40892b937605 100644 --- a/tests/baselines/reference/logicalAssignment1(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment1(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : Symbol(a, Decl(logicalAssignment1.ts, 0, 11)) diff --git a/tests/baselines/reference/logicalAssignment1(target=esnext).types b/tests/baselines/reference/logicalAssignment1(target=esnext).types index 29a224ecef79b..2d0f9f25f7cb8 100644 --- a/tests/baselines/reference/logicalAssignment1(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment1(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts === declare let a: string | undefined >a : string | undefined diff --git a/tests/baselines/reference/logicalAssignment10(target=es2015).symbols b/tests/baselines/reference/logicalAssignment10(target=es2015).symbols index d9a4e30998b71..5a8027f95260e 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment10(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : Symbol(count, Decl(logicalAssignment10.ts, 0, 3)) diff --git a/tests/baselines/reference/logicalAssignment10(target=es2015).types b/tests/baselines/reference/logicalAssignment10(target=es2015).types index d62c3c671087f..6f1f60e854fe2 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment10(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : number >0 : 0 diff --git a/tests/baselines/reference/logicalAssignment10(target=es2020).symbols b/tests/baselines/reference/logicalAssignment10(target=es2020).symbols index d9a4e30998b71..5a8027f95260e 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment10(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : Symbol(count, Decl(logicalAssignment10.ts, 0, 3)) diff --git a/tests/baselines/reference/logicalAssignment10(target=es2020).types b/tests/baselines/reference/logicalAssignment10(target=es2020).types index d62c3c671087f..6f1f60e854fe2 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment10(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : number >0 : 0 diff --git a/tests/baselines/reference/logicalAssignment10(target=es2021).js b/tests/baselines/reference/logicalAssignment10(target=es2021).js new file mode 100644 index 0000000000000..40b2ed7c09556 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment10(target=es2021).js @@ -0,0 +1,26 @@ +//// [logicalAssignment10.ts] +var count = 0; +var obj = {}; +function incr() { + return ++count; +} + +const oobj = { + obj +} + +obj[incr()] ??= incr(); +oobj["obj"][incr()] ??= incr(); + + +//// [logicalAssignment10.js] +var count = 0; +var obj = {}; +function incr() { + return ++count; +} +const oobj = { + obj +}; +obj[incr()] ??= incr(); +oobj["obj"][incr()] ??= incr(); diff --git a/tests/baselines/reference/logicalAssignment10(target=es2021).symbols b/tests/baselines/reference/logicalAssignment10(target=es2021).symbols new file mode 100644 index 0000000000000..5a8027f95260e --- /dev/null +++ b/tests/baselines/reference/logicalAssignment10(target=es2021).symbols @@ -0,0 +1,32 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === +var count = 0; +>count : Symbol(count, Decl(logicalAssignment10.ts, 0, 3)) + +var obj = {}; +>obj : Symbol(obj, Decl(logicalAssignment10.ts, 1, 3)) + +function incr() { +>incr : Symbol(incr, Decl(logicalAssignment10.ts, 1, 13)) + + return ++count; +>count : Symbol(count, Decl(logicalAssignment10.ts, 0, 3)) +} + +const oobj = { +>oobj : Symbol(oobj, Decl(logicalAssignment10.ts, 6, 5)) + + obj +>obj : Symbol(obj, Decl(logicalAssignment10.ts, 6, 14)) +} + +obj[incr()] ??= incr(); +>obj : Symbol(obj, Decl(logicalAssignment10.ts, 1, 3)) +>incr : Symbol(incr, Decl(logicalAssignment10.ts, 1, 13)) +>incr : Symbol(incr, Decl(logicalAssignment10.ts, 1, 13)) + +oobj["obj"][incr()] ??= incr(); +>oobj : Symbol(oobj, Decl(logicalAssignment10.ts, 6, 5)) +>"obj" : Symbol(obj, Decl(logicalAssignment10.ts, 6, 14)) +>incr : Symbol(incr, Decl(logicalAssignment10.ts, 1, 13)) +>incr : Symbol(incr, Decl(logicalAssignment10.ts, 1, 13)) + diff --git a/tests/baselines/reference/logicalAssignment10(target=es2021).types b/tests/baselines/reference/logicalAssignment10(target=es2021).types new file mode 100644 index 0000000000000..6f1f60e854fe2 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment10(target=es2021).types @@ -0,0 +1,45 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === +var count = 0; +>count : number +>0 : 0 + +var obj = {}; +>obj : {} +>{} : {} + +function incr() { +>incr : () => number + + return ++count; +>++count : number +>count : number +} + +const oobj = { +>oobj : { obj: {}; } +>{ obj} : { obj: {}; } + + obj +>obj : {} +} + +obj[incr()] ??= incr(); +>obj[incr()] ??= incr() : any +>obj[incr()] : error +>obj : {} +>incr() : number +>incr : () => number +>incr() : number +>incr : () => number + +oobj["obj"][incr()] ??= incr(); +>oobj["obj"][incr()] ??= incr() : any +>oobj["obj"][incr()] : error +>oobj["obj"] : {} +>oobj : { obj: {}; } +>"obj" : "obj" +>incr() : number +>incr : () => number +>incr() : number +>incr : () => number + diff --git a/tests/baselines/reference/logicalAssignment10(target=esnext).symbols b/tests/baselines/reference/logicalAssignment10(target=esnext).symbols index d9a4e30998b71..5a8027f95260e 100644 --- a/tests/baselines/reference/logicalAssignment10(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment10(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : Symbol(count, Decl(logicalAssignment10.ts, 0, 3)) diff --git a/tests/baselines/reference/logicalAssignment10(target=esnext).types b/tests/baselines/reference/logicalAssignment10(target=esnext).types index d62c3c671087f..6f1f60e854fe2 100644 --- a/tests/baselines/reference/logicalAssignment10(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment10(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts === var count = 0; >count : number >0 : 0 diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).symbols b/tests/baselines/reference/logicalAssignment2(target=es2015).symbols index 503996af38772..528505b74346b 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { >A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).types b/tests/baselines/reference/logicalAssignment2(target=es2015).types index 7f1a58aa3222e..478affebc58a8 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { foo: { >foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).symbols b/tests/baselines/reference/logicalAssignment2(target=es2020).symbols index 503996af38772..528505b74346b 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { >A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).types b/tests/baselines/reference/logicalAssignment2(target=es2020).types index 7f1a58aa3222e..478affebc58a8 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { foo: { >foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).js b/tests/baselines/reference/logicalAssignment2(target=es2021).js new file mode 100644 index 0000000000000..028fd724bc151 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).js @@ -0,0 +1,41 @@ +//// [logicalAssignment2.ts] +interface A { + foo: { + bar(): { + baz: 0 | 1 | 42 | undefined | '' + } + baz: 0 | 1 | 42 | undefined | '' + } + baz: 0 | 1 | 42 | undefined | '' +} + +declare const result: A +declare const a: A +declare const b: A +declare const c: A + +a.baz &&= result.baz +b.baz ||= result.baz +c.baz ??= result.baz + +a.foo["baz"] &&= result.foo.baz +b.foo["baz"] ||= result.foo.baz +c.foo["baz"] ??= result.foo.baz + +a.foo.bar().baz &&= result.foo.bar().baz +b.foo.bar().baz ||= result.foo.bar().baz +c.foo.bar().baz ??= result.foo.bar().baz + + + +//// [logicalAssignment2.js] +"use strict"; +a.baz &&= result.baz; +b.baz ||= result.baz; +c.baz ??= result.baz; +a.foo["baz"] &&= result.foo.baz; +b.foo["baz"] ||= result.foo.baz; +c.foo["baz"] ??= result.foo.baz; +a.foo.bar().baz &&= result.foo.bar().baz; +b.foo.bar().baz ||= result.foo.bar().baz; +c.foo.bar().baz ??= result.foo.bar().baz; diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).symbols b/tests/baselines/reference/logicalAssignment2(target=es2021).symbols new file mode 100644 index 0000000000000..528505b74346b --- /dev/null +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).symbols @@ -0,0 +1,142 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === +interface A { +>A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) + + foo: { +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) + + bar(): { +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) + + baz: 0 | 1 | 42 | undefined | '' +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) + } + baz: 0 | 1 | 42 | undefined | '' +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) + } + baz: 0 | 1 | 42 | undefined | '' +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +} + +declare const result: A +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) + +declare const a: A +>a : Symbol(a, Decl(logicalAssignment2.ts, 11, 13)) +>A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) + +declare const b: A +>b : Symbol(b, Decl(logicalAssignment2.ts, 12, 13)) +>A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) + +declare const c: A +>c : Symbol(c, Decl(logicalAssignment2.ts, 13, 13)) +>A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) + +a.baz &&= result.baz +>a.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>a : Symbol(a, Decl(logicalAssignment2.ts, 11, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) + +b.baz ||= result.baz +>b.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>b : Symbol(b, Decl(logicalAssignment2.ts, 12, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) + +c.baz ??= result.baz +>c.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>c : Symbol(c, Decl(logicalAssignment2.ts, 13, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment2.ts, 6, 5)) + +a.foo["baz"] &&= result.foo.baz +>a.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>a : Symbol(a, Decl(logicalAssignment2.ts, 11, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>"baz" : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo.baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) + +b.foo["baz"] ||= result.foo.baz +>b.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>b : Symbol(b, Decl(logicalAssignment2.ts, 12, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>"baz" : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo.baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) + +c.foo["baz"] ??= result.foo.baz +>c.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>c : Symbol(c, Decl(logicalAssignment2.ts, 13, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>"baz" : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo.baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 4, 9)) + +a.foo.bar().baz &&= result.foo.bar().baz +>a.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>a.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>a.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>a : Symbol(a, Decl(logicalAssignment2.ts, 11, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) + +b.foo.bar().baz ||= result.foo.bar().baz +>b.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>b.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>b.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>b : Symbol(b, Decl(logicalAssignment2.ts, 12, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) + +c.foo.bar().baz ??= result.foo.bar().baz +>c.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>c.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>c.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>c : Symbol(c, Decl(logicalAssignment2.ts, 13, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar().baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) +>result.foo.bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>result.foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment2.ts, 10, 13)) +>foo : Symbol(A.foo, Decl(logicalAssignment2.ts, 0, 13)) +>bar : Symbol(bar, Decl(logicalAssignment2.ts, 1, 10)) +>baz : Symbol(baz, Decl(logicalAssignment2.ts, 2, 16)) + + diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).types b/tests/baselines/reference/logicalAssignment2(target=es2021).types new file mode 100644 index 0000000000000..478affebc58a8 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).types @@ -0,0 +1,154 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === +interface A { + foo: { +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } + + bar(): { +>bar : () => { baz: 0 | 1 | 42 | undefined | '';} + + baz: 0 | 1 | 42 | undefined | '' +>baz : "" | 0 | 1 | 42 | undefined + } + baz: 0 | 1 | 42 | undefined | '' +>baz : "" | 0 | 1 | 42 | undefined + } + baz: 0 | 1 | 42 | undefined | '' +>baz : "" | 0 | 1 | 42 | undefined +} + +declare const result: A +>result : A + +declare const a: A +>a : A + +declare const b: A +>b : A + +declare const c: A +>c : A + +a.baz &&= result.baz +>a.baz &&= result.baz : "" | 0 | 1 | 42 | undefined +>a.baz : "" | 0 | 1 | 42 | undefined +>a : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + +b.baz ||= result.baz +>b.baz ||= result.baz : "" | 0 | 1 | 42 | undefined +>b.baz : "" | 0 | 1 | 42 | undefined +>b : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + +c.baz ??= result.baz +>c.baz ??= result.baz : "" | 0 | 1 | 42 | undefined +>c.baz : "" | 0 | 1 | 42 | undefined +>c : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + +a.foo["baz"] &&= result.foo.baz +>a.foo["baz"] &&= result.foo.baz : "" | 0 | 1 | 42 | undefined +>a.foo["baz"] : "" | 0 | 1 | 42 | undefined +>a.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>a : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>"baz" : "baz" +>result.foo.baz : "" | 0 | 1 | 42 | undefined +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + +b.foo["baz"] ||= result.foo.baz +>b.foo["baz"] ||= result.foo.baz : "" | 0 | 1 | 42 | undefined +>b.foo["baz"] : "" | 0 | 1 | 42 | undefined +>b.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>b : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>"baz" : "baz" +>result.foo.baz : "" | 0 | 1 | 42 | undefined +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + +c.foo["baz"] ??= result.foo.baz +>c.foo["baz"] ??= result.foo.baz : "" | 0 | 1 | 42 | undefined +>c.foo["baz"] : "" | 0 | 1 | 42 | undefined +>c.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>c : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>"baz" : "baz" +>result.foo.baz : "" | 0 | 1 | 42 | undefined +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + +a.foo.bar().baz &&= result.foo.bar().baz +>a.foo.bar().baz &&= result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>a.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>a.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>a.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>a.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>a : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + +b.foo.bar().baz ||= result.foo.bar().baz +>b.foo.bar().baz ||= result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>b.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>b.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>b.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>b.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>b : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + +c.foo.bar().baz ??= result.foo.bar().baz +>c.foo.bar().baz ??= result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>c.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>c.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>c.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>c.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>c : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar().baz : "" | 0 | 1 | 42 | undefined +>result.foo.bar() : { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo.bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>result.foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>result : A +>foo : { bar(): { baz: "" | 0 | 1 | 42 | undefined; }; baz: "" | 0 | 1 | 42 | undefined; } +>bar : () => { baz: "" | 0 | 1 | 42 | undefined; } +>baz : "" | 0 | 1 | 42 | undefined + + diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).symbols b/tests/baselines/reference/logicalAssignment2(target=esnext).symbols index 503996af38772..528505b74346b 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { >A : Symbol(A, Decl(logicalAssignment2.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).types b/tests/baselines/reference/logicalAssignment2(target=esnext).types index 7f1a58aa3222e..478affebc58a8 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts === interface A { foo: { >foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } diff --git a/tests/baselines/reference/logicalAssignment3(target=es2015).symbols b/tests/baselines/reference/logicalAssignment3(target=es2015).symbols index 5d17ac406b683..d2270b90b9427 100644 --- a/tests/baselines/reference/logicalAssignment3(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment3(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { >A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment3(target=es2015).types b/tests/baselines/reference/logicalAssignment3(target=es2015).types index 34ee2dc390129..48678ec0341d1 100644 --- a/tests/baselines/reference/logicalAssignment3(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment3(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment3(target=es2020).symbols b/tests/baselines/reference/logicalAssignment3(target=es2020).symbols index 5d17ac406b683..d2270b90b9427 100644 --- a/tests/baselines/reference/logicalAssignment3(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment3(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { >A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment3(target=es2020).types b/tests/baselines/reference/logicalAssignment3(target=es2020).types index 34ee2dc390129..48678ec0341d1 100644 --- a/tests/baselines/reference/logicalAssignment3(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment3(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment3(target=es2021).js b/tests/baselines/reference/logicalAssignment3(target=es2021).js new file mode 100644 index 0000000000000..113bdd39d3f19 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment3(target=es2021).js @@ -0,0 +1,21 @@ +//// [logicalAssignment3.ts] +interface A { + baz: 0 | 1 | 42 | undefined | '' +} + +declare const result: A; +declare const a: A; +declare const b: A; +declare const c: A; + +(a.baz) &&= result.baz; +(b.baz) ||= result.baz; +(c.baz) ??= result.baz; + + + +//// [logicalAssignment3.js] +"use strict"; +(a.baz) &&= result.baz; +(b.baz) ||= result.baz; +(c.baz) ??= result.baz; diff --git a/tests/baselines/reference/logicalAssignment3(target=es2021).symbols b/tests/baselines/reference/logicalAssignment3(target=es2021).symbols new file mode 100644 index 0000000000000..d2270b90b9427 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment3(target=es2021).symbols @@ -0,0 +1,49 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === +interface A { +>A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) + + baz: 0 | 1 | 42 | undefined | '' +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +} + +declare const result: A; +>result : Symbol(result, Decl(logicalAssignment3.ts, 4, 13)) +>A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) + +declare const a: A; +>a : Symbol(a, Decl(logicalAssignment3.ts, 5, 13)) +>A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) + +declare const b: A; +>b : Symbol(b, Decl(logicalAssignment3.ts, 6, 13)) +>A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) + +declare const c: A; +>c : Symbol(c, Decl(logicalAssignment3.ts, 7, 13)) +>A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) + +(a.baz) &&= result.baz; +>a.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>a : Symbol(a, Decl(logicalAssignment3.ts, 5, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment3.ts, 4, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) + +(b.baz) ||= result.baz; +>b.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>b : Symbol(b, Decl(logicalAssignment3.ts, 6, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment3.ts, 4, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) + +(c.baz) ??= result.baz; +>c.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>c : Symbol(c, Decl(logicalAssignment3.ts, 7, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result.baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) +>result : Symbol(result, Decl(logicalAssignment3.ts, 4, 13)) +>baz : Symbol(A.baz, Decl(logicalAssignment3.ts, 0, 13)) + + diff --git a/tests/baselines/reference/logicalAssignment3(target=es2021).types b/tests/baselines/reference/logicalAssignment3(target=es2021).types new file mode 100644 index 0000000000000..48678ec0341d1 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment3(target=es2021).types @@ -0,0 +1,49 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === +interface A { + baz: 0 | 1 | 42 | undefined | '' +>baz : "" | 0 | 1 | 42 | undefined +} + +declare const result: A; +>result : A + +declare const a: A; +>a : A + +declare const b: A; +>b : A + +declare const c: A; +>c : A + +(a.baz) &&= result.baz; +>(a.baz) &&= result.baz : "" | 0 | 1 | 42 | undefined +>(a.baz) : "" | 0 | 1 | 42 | undefined +>a.baz : "" | 0 | 1 | 42 | undefined +>a : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + +(b.baz) ||= result.baz; +>(b.baz) ||= result.baz : "" | 0 | 1 | 42 | undefined +>(b.baz) : "" | 0 | 1 | 42 | undefined +>b.baz : "" | 0 | 1 | 42 | undefined +>b : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + +(c.baz) ??= result.baz; +>(c.baz) ??= result.baz : "" | 0 | 1 | 42 | undefined +>(c.baz) : "" | 0 | 1 | 42 | undefined +>c.baz : "" | 0 | 1 | 42 | undefined +>c : A +>baz : "" | 0 | 1 | 42 | undefined +>result.baz : "" | 0 | 1 | 42 | undefined +>result : A +>baz : "" | 0 | 1 | 42 | undefined + + diff --git a/tests/baselines/reference/logicalAssignment3(target=esnext).symbols b/tests/baselines/reference/logicalAssignment3(target=esnext).symbols index 5d17ac406b683..d2270b90b9427 100644 --- a/tests/baselines/reference/logicalAssignment3(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment3(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { >A : Symbol(A, Decl(logicalAssignment3.ts, 0, 0)) diff --git a/tests/baselines/reference/logicalAssignment3(target=esnext).types b/tests/baselines/reference/logicalAssignment3(target=esnext).types index 34ee2dc390129..48678ec0341d1 100644 --- a/tests/baselines/reference/logicalAssignment3(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment3(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts === interface A { baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt index ee34fac607c33..3734386b4d3ff 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== function foo1(results: number[] | undefined) { (results ||= []).push(100); } @@ -54,4 +54,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): e !!! error TS2532: Object is possibly 'undefined'. } } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment4(target=es2015).js b/tests/baselines/reference/logicalAssignment4(target=es2015).js index b54bfb6d48796..f769601172cf9 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2015).js +++ b/tests/baselines/reference/logicalAssignment4(target=es2015).js @@ -46,7 +46,8 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue defaultValue.name; } } -} +} + //// [logicalAssignment4.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment4(target=es2015).symbols b/tests/baselines/reference/logicalAssignment4(target=es2015).symbols index 46a02a4811074..5925942ebee63 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment4(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment4.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment4.ts, 0, 14)) @@ -133,3 +133,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment4(target=es2015).types b/tests/baselines/reference/logicalAssignment4(target=es2015).types index 6a044ae0e1bf2..f27d8255981fa 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment4(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : (results: number[] | undefined) => void >results : number[] | undefined @@ -156,3 +156,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt index ee34fac607c33..3734386b4d3ff 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== function foo1(results: number[] | undefined) { (results ||= []).push(100); } @@ -54,4 +54,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): e !!! error TS2532: Object is possibly 'undefined'. } } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment4(target=es2020).js b/tests/baselines/reference/logicalAssignment4(target=es2020).js index b2dc9ae3ce941..cb956f9a3d16e 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2020).js +++ b/tests/baselines/reference/logicalAssignment4(target=es2020).js @@ -46,7 +46,8 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue defaultValue.name; } } -} +} + //// [logicalAssignment4.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment4(target=es2020).symbols b/tests/baselines/reference/logicalAssignment4(target=es2020).symbols index 46a02a4811074..5925942ebee63 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment4(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment4.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment4.ts, 0, 14)) @@ -133,3 +133,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment4(target=es2020).types b/tests/baselines/reference/logicalAssignment4(target=es2020).types index 6a044ae0e1bf2..f27d8255981fa 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment4(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : (results: number[] | undefined) => void >results : number[] | undefined @@ -156,3 +156,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt new file mode 100644 index 0000000000000..3734386b4d3ff --- /dev/null +++ b/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt @@ -0,0 +1,58 @@ +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. + + +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== + function foo1(results: number[] | undefined) { + (results ||= []).push(100); + } + + function foo2(results: number[] | undefined) { + (results ??= []).push(100); + } + + function foo3(results: number[] | undefined) { + results ||= []; + results.push(100); + } + + function foo4(results: number[] | undefined) { + results ??= []; + results.push(100); + } + + interface ThingWithOriginal { + name: string; + original?: ThingWithOriginal + } + declare const v: number + function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { + if (v === 1) { + if (thing &&= thing.original) { + thing.name; + } + } + else if (v === 2) { + if (thing &&= defaultValue) { + thing.name; + defaultValue.name + } + } + else if (v === 3) { + if (thing ||= defaultValue) { + thing.name; + defaultValue.name; + ~~~~~~~~~~~~ +!!! error TS2532: Object is possibly 'undefined'. + } + } + else { + if (thing ??= defaultValue) { + thing.name; + defaultValue.name; + ~~~~~~~~~~~~ +!!! error TS2532: Object is possibly 'undefined'. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment4(target=es2021).js b/tests/baselines/reference/logicalAssignment4(target=es2021).js new file mode 100644 index 0000000000000..d0ad12a592239 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment4(target=es2021).js @@ -0,0 +1,92 @@ +//// [logicalAssignment4.ts] +function foo1(results: number[] | undefined) { + (results ||= []).push(100); +} + +function foo2(results: number[] | undefined) { + (results ??= []).push(100); +} + +function foo3(results: number[] | undefined) { + results ||= []; + results.push(100); +} + +function foo4(results: number[] | undefined) { + results ??= []; + results.push(100); +} + +interface ThingWithOriginal { + name: string; + original?: ThingWithOriginal +} +declare const v: number +function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { + if (v === 1) { + if (thing &&= thing.original) { + thing.name; + } + } + else if (v === 2) { + if (thing &&= defaultValue) { + thing.name; + defaultValue.name + } + } + else if (v === 3) { + if (thing ||= defaultValue) { + thing.name; + defaultValue.name; + } + } + else { + if (thing ??= defaultValue) { + thing.name; + defaultValue.name; + } + } +} + + +//// [logicalAssignment4.js] +"use strict"; +function foo1(results) { + (results ||= []).push(100); +} +function foo2(results) { + (results ??= []).push(100); +} +function foo3(results) { + results ||= []; + results.push(100); +} +function foo4(results) { + results ??= []; + results.push(100); +} +function doSomethingWithAlias(thing, defaultValue) { + if (v === 1) { + if (thing &&= thing.original) { + thing.name; + } + } + else if (v === 2) { + if (thing &&= defaultValue) { + thing.name; + defaultValue.name; + } + } + else if (v === 3) { + if (thing ||= defaultValue) { + thing.name; + defaultValue.name; + } + } + else { + if (thing ??= defaultValue) { + thing.name; + defaultValue.name; + } + } +} diff --git a/tests/baselines/reference/logicalAssignment4(target=es2021).symbols b/tests/baselines/reference/logicalAssignment4(target=es2021).symbols new file mode 100644 index 0000000000000..5925942ebee63 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment4(target=es2021).symbols @@ -0,0 +1,136 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === +function foo1(results: number[] | undefined) { +>foo1 : Symbol(foo1, Decl(logicalAssignment4.ts, 0, 0)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 0, 14)) + + (results ||= []).push(100); +>(results ||= []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 0, 14)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo2(results: number[] | undefined) { +>foo2 : Symbol(foo2, Decl(logicalAssignment4.ts, 2, 1)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 4, 14)) + + (results ??= []).push(100); +>(results ??= []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 4, 14)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo3(results: number[] | undefined) { +>foo3 : Symbol(foo3, Decl(logicalAssignment4.ts, 6, 1)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 8, 14)) + + results ||= []; +>results : Symbol(results, Decl(logicalAssignment4.ts, 8, 14)) + + results.push(100); +>results.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 8, 14)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo4(results: number[] | undefined) { +>foo4 : Symbol(foo4, Decl(logicalAssignment4.ts, 11, 1)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 13, 14)) + + results ??= []; +>results : Symbol(results, Decl(logicalAssignment4.ts, 13, 14)) + + results.push(100); +>results.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment4.ts, 13, 14)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +interface ThingWithOriginal { +>ThingWithOriginal : Symbol(ThingWithOriginal, Decl(logicalAssignment4.ts, 16, 1)) + + name: string; +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + + original?: ThingWithOriginal +>original : Symbol(ThingWithOriginal.original, Decl(logicalAssignment4.ts, 19, 17)) +>ThingWithOriginal : Symbol(ThingWithOriginal, Decl(logicalAssignment4.ts, 16, 1)) +} +declare const v: number +>v : Symbol(v, Decl(logicalAssignment4.ts, 22, 13)) + +function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { +>doSomethingWithAlias : Symbol(doSomethingWithAlias, Decl(logicalAssignment4.ts, 22, 23)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>ThingWithOriginal : Symbol(ThingWithOriginal, Decl(logicalAssignment4.ts, 16, 1)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) +>ThingWithOriginal : Symbol(ThingWithOriginal, Decl(logicalAssignment4.ts, 16, 1)) + + if (v === 1) { +>v : Symbol(v, Decl(logicalAssignment4.ts, 22, 13)) + + if (thing &&= thing.original) { +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>thing.original : Symbol(ThingWithOriginal.original, Decl(logicalAssignment4.ts, 19, 17)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>original : Symbol(ThingWithOriginal.original, Decl(logicalAssignment4.ts, 19, 17)) + + thing.name; +>thing.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + } + } + else if (v === 2) { +>v : Symbol(v, Decl(logicalAssignment4.ts, 22, 13)) + + if (thing &&= defaultValue) { +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) + + thing.name; +>thing.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + + defaultValue.name +>defaultValue.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + } + } + else if (v === 3) { +>v : Symbol(v, Decl(logicalAssignment4.ts, 22, 13)) + + if (thing ||= defaultValue) { +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) + + thing.name; +>thing.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + + defaultValue.name; +>defaultValue.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + } + } + else { + if (thing ??= defaultValue) { +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) + + thing.name; +>thing.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>thing : Symbol(thing, Decl(logicalAssignment4.ts, 23, 30)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + + defaultValue.name; +>defaultValue.name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) +>defaultValue : Symbol(defaultValue, Decl(logicalAssignment4.ts, 23, 67)) +>name : Symbol(ThingWithOriginal.name, Decl(logicalAssignment4.ts, 18, 29)) + } + } +} + diff --git a/tests/baselines/reference/logicalAssignment4(target=es2021).types b/tests/baselines/reference/logicalAssignment4(target=es2021).types new file mode 100644 index 0000000000000..f27d8255981fa --- /dev/null +++ b/tests/baselines/reference/logicalAssignment4(target=es2021).types @@ -0,0 +1,159 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === +function foo1(results: number[] | undefined) { +>foo1 : (results: number[] | undefined) => void +>results : number[] | undefined + + (results ||= []).push(100); +>(results ||= []).push(100) : number +>(results ||= []).push : (...items: number[]) => number +>(results ||= []) : number[] +>results ||= [] : number[] +>results : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo2(results: number[] | undefined) { +>foo2 : (results: number[] | undefined) => void +>results : number[] | undefined + + (results ??= []).push(100); +>(results ??= []).push(100) : number +>(results ??= []).push : (...items: number[]) => number +>(results ??= []) : number[] +>results ??= [] : number[] +>results : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo3(results: number[] | undefined) { +>foo3 : (results: number[] | undefined) => void +>results : number[] | undefined + + results ||= []; +>results ||= [] : number[] +>results : number[] | undefined +>[] : never[] + + results.push(100); +>results.push(100) : number +>results.push : (...items: number[]) => number +>results : number[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo4(results: number[] | undefined) { +>foo4 : (results: number[] | undefined) => void +>results : number[] | undefined + + results ??= []; +>results ??= [] : number[] +>results : number[] | undefined +>[] : never[] + + results.push(100); +>results.push(100) : number +>results.push : (...items: number[]) => number +>results : number[] +>push : (...items: number[]) => number +>100 : 100 +} + +interface ThingWithOriginal { + name: string; +>name : string + + original?: ThingWithOriginal +>original : ThingWithOriginal | undefined +} +declare const v: number +>v : number + +function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { +>doSomethingWithAlias : (thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) => void +>thing : ThingWithOriginal | undefined +>defaultValue : ThingWithOriginal | undefined + + if (v === 1) { +>v === 1 : boolean +>v : number +>1 : 1 + + if (thing &&= thing.original) { +>thing &&= thing.original : ThingWithOriginal | undefined +>thing : ThingWithOriginal | undefined +>thing.original : ThingWithOriginal | undefined +>thing : ThingWithOriginal +>original : ThingWithOriginal | undefined + + thing.name; +>thing.name : string +>thing : ThingWithOriginal +>name : string + } + } + else if (v === 2) { +>v === 2 : boolean +>v : number +>2 : 2 + + if (thing &&= defaultValue) { +>thing &&= defaultValue : ThingWithOriginal | undefined +>thing : ThingWithOriginal | undefined +>defaultValue : ThingWithOriginal | undefined + + thing.name; +>thing.name : string +>thing : ThingWithOriginal +>name : string + + defaultValue.name +>defaultValue.name : string +>defaultValue : ThingWithOriginal +>name : string + } + } + else if (v === 3) { +>v === 3 : boolean +>v : number +>3 : 3 + + if (thing ||= defaultValue) { +>thing ||= defaultValue : ThingWithOriginal | undefined +>thing : ThingWithOriginal | undefined +>defaultValue : ThingWithOriginal | undefined + + thing.name; +>thing.name : string +>thing : ThingWithOriginal +>name : string + + defaultValue.name; +>defaultValue.name : string +>defaultValue : ThingWithOriginal | undefined +>name : string + } + } + else { + if (thing ??= defaultValue) { +>thing ??= defaultValue : ThingWithOriginal | undefined +>thing : ThingWithOriginal | undefined +>defaultValue : ThingWithOriginal | undefined + + thing.name; +>thing.name : string +>thing : ThingWithOriginal +>name : string + + defaultValue.name; +>defaultValue.name : string +>defaultValue : ThingWithOriginal | undefined +>name : string + } + } +} + diff --git a/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt index ee34fac607c33..3734386b4d3ff 100644 --- a/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== function foo1(results: number[] | undefined) { (results ||= []).push(100); } @@ -54,4 +54,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts(45,13): e !!! error TS2532: Object is possibly 'undefined'. } } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment4(target=esnext).js b/tests/baselines/reference/logicalAssignment4(target=esnext).js index 5724bcaa58b1d..d0ad12a592239 100644 --- a/tests/baselines/reference/logicalAssignment4(target=esnext).js +++ b/tests/baselines/reference/logicalAssignment4(target=esnext).js @@ -46,7 +46,8 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue defaultValue.name; } } -} +} + //// [logicalAssignment4.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment4(target=esnext).symbols b/tests/baselines/reference/logicalAssignment4(target=esnext).symbols index 46a02a4811074..5925942ebee63 100644 --- a/tests/baselines/reference/logicalAssignment4(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment4(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment4.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment4.ts, 0, 14)) @@ -133,3 +133,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment4(target=esnext).types b/tests/baselines/reference/logicalAssignment4(target=esnext).types index 6a044ae0e1bf2..f27d8255981fa 100644 --- a/tests/baselines/reference/logicalAssignment4(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment4(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts === function foo1(results: number[] | undefined) { >foo1 : (results: number[] | undefined) => void >results : number[] | undefined @@ -156,3 +156,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue } } } + diff --git a/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt index 8e9760990b033..4cebb69c82120 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts (4 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts (4 errors) ==== function foo1 (f?: (a: number) => void) { f ??= (a => a) f(42) diff --git a/tests/baselines/reference/logicalAssignment5(target=es2015).symbols b/tests/baselines/reference/logicalAssignment5(target=es2015).symbols index 5862d6b68d406..4d42e5f178c2c 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment5(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : Symbol(foo1, Decl(logicalAssignment5.ts, 0, 0)) >f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) diff --git a/tests/baselines/reference/logicalAssignment5(target=es2015).types b/tests/baselines/reference/logicalAssignment5(target=es2015).types index 6ffb9b65a123e..620d9bc4a6dc5 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment5(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : (f?: ((a: number) => void) | undefined) => void >f : ((a: number) => void) | undefined diff --git a/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt index 8e9760990b033..4cebb69c82120 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts (4 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts (4 errors) ==== function foo1 (f?: (a: number) => void) { f ??= (a => a) f(42) diff --git a/tests/baselines/reference/logicalAssignment5(target=es2020).symbols b/tests/baselines/reference/logicalAssignment5(target=es2020).symbols index 5862d6b68d406..4d42e5f178c2c 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment5(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : Symbol(foo1, Decl(logicalAssignment5.ts, 0, 0)) >f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) diff --git a/tests/baselines/reference/logicalAssignment5(target=es2020).types b/tests/baselines/reference/logicalAssignment5(target=es2020).types index 6ffb9b65a123e..620d9bc4a6dc5 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment5(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : (f?: ((a: number) => void) | undefined) => void >f : ((a: number) => void) | undefined diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt new file mode 100644 index 0000000000000..4cebb69c82120 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. + + +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts (4 errors) ==== + function foo1 (f?: (a: number) => void) { + f ??= (a => a) + f(42) + } + + function foo2 (f?: (a: number) => void) { + f ||= (a => a) + f(42) + } + + function foo3 (f?: (a: number) => void) { + f &&= (a => a) + f(42) + ~ +!!! error TS2722: Cannot invoke an object which is possibly 'undefined'. + } + + function bar1 (f?: (a: number) => void) { + f ??= (f.toString(), (a => a)) + ~ +!!! error TS2532: Object is possibly 'undefined'. + f(42) + } + + function bar2 (f?: (a: number) => void) { + f ||= (f.toString(), (a => a)) + ~ +!!! error TS2532: Object is possibly 'undefined'. + f(42) + } + + function bar3 (f?: (a: number) => void) { + f &&= (f.toString(), (a => a)) + f(42) + ~ +!!! error TS2722: Cannot invoke an object which is possibly 'undefined'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).js b/tests/baselines/reference/logicalAssignment5(target=es2021).js new file mode 100644 index 0000000000000..21d965459dc6f --- /dev/null +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).js @@ -0,0 +1,58 @@ +//// [logicalAssignment5.ts] +function foo1 (f?: (a: number) => void) { + f ??= (a => a) + f(42) +} + +function foo2 (f?: (a: number) => void) { + f ||= (a => a) + f(42) +} + +function foo3 (f?: (a: number) => void) { + f &&= (a => a) + f(42) +} + +function bar1 (f?: (a: number) => void) { + f ??= (f.toString(), (a => a)) + f(42) +} + +function bar2 (f?: (a: number) => void) { + f ||= (f.toString(), (a => a)) + f(42) +} + +function bar3 (f?: (a: number) => void) { + f &&= (f.toString(), (a => a)) + f(42) +} + + +//// [logicalAssignment5.js] +"use strict"; +function foo1(f) { + f ??= (a => a); + f(42); +} +function foo2(f) { + f ||= (a => a); + f(42); +} +function foo3(f) { + f &&= (a => a); + f(42); +} +function bar1(f) { + f ??= (f.toString(), (a => a)); + f(42); +} +function bar2(f) { + f ||= (f.toString(), (a => a)); + f(42); +} +function bar3(f) { + f &&= (f.toString(), (a => a)); + f(42); +} diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).symbols b/tests/baselines/reference/logicalAssignment5(target=es2021).symbols new file mode 100644 index 0000000000000..4d42e5f178c2c --- /dev/null +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).symbols @@ -0,0 +1,90 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === +function foo1 (f?: (a: number) => void) { +>foo1 : Symbol(foo1, Decl(logicalAssignment5.ts, 0, 0)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 0, 20)) + + f ??= (a => a) +>f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 1, 11)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 1, 11)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) +} + +function foo2 (f?: (a: number) => void) { +>foo2 : Symbol(foo2, Decl(logicalAssignment5.ts, 3, 1)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 5, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 5, 20)) + + f ||= (a => a) +>f : Symbol(f, Decl(logicalAssignment5.ts, 5, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 6, 11)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 6, 11)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 5, 15)) +} + +function foo3 (f?: (a: number) => void) { +>foo3 : Symbol(foo3, Decl(logicalAssignment5.ts, 8, 1)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 10, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 10, 20)) + + f &&= (a => a) +>f : Symbol(f, Decl(logicalAssignment5.ts, 10, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 11, 11)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 11, 11)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 10, 15)) +} + +function bar1 (f?: (a: number) => void) { +>bar1 : Symbol(bar1, Decl(logicalAssignment5.ts, 13, 1)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 15, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 15, 20)) + + f ??= (f.toString(), (a => a)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 15, 15)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 15, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 16, 26)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 16, 26)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 15, 15)) +} + +function bar2 (f?: (a: number) => void) { +>bar2 : Symbol(bar2, Decl(logicalAssignment5.ts, 18, 1)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 20, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 20, 20)) + + f ||= (f.toString(), (a => a)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 20, 15)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 20, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 21, 26)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 21, 26)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 20, 15)) +} + +function bar3 (f?: (a: number) => void) { +>bar3 : Symbol(bar3, Decl(logicalAssignment5.ts, 23, 1)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 25, 15)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 25, 20)) + + f &&= (f.toString(), (a => a)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 25, 15)) +>f.toString : Symbol(Function.toString, Decl(lib.es5.d.ts, --, --)) +>f : Symbol(f, Decl(logicalAssignment5.ts, 25, 15)) +>toString : Symbol(Function.toString, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 26, 26)) +>a : Symbol(a, Decl(logicalAssignment5.ts, 26, 26)) + + f(42) +>f : Symbol(f, Decl(logicalAssignment5.ts, 25, 15)) +} + diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).types b/tests/baselines/reference/logicalAssignment5(target=es2021).types new file mode 100644 index 0000000000000..620d9bc4a6dc5 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).types @@ -0,0 +1,133 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === +function foo1 (f?: (a: number) => void) { +>foo1 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f ??= (a => a) +>f ??= (a => a) : (a: number) => void +>f : ((a: number) => void) | undefined +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : (a: number) => void +>42 : 42 +} + +function foo2 (f?: (a: number) => void) { +>foo2 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f ||= (a => a) +>f ||= (a => a) : (a: number) => void +>f : ((a: number) => void) | undefined +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : (a: number) => void +>42 : 42 +} + +function foo3 (f?: (a: number) => void) { +>foo3 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f &&= (a => a) +>f &&= (a => a) : ((a: number) => number) | undefined +>f : ((a: number) => void) | undefined +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : ((a: number) => void) | undefined +>42 : 42 +} + +function bar1 (f?: (a: number) => void) { +>bar1 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f ??= (f.toString(), (a => a)) +>f ??= (f.toString(), (a => a)) : (a: number) => void +>f : ((a: number) => void) | undefined +>(f.toString(), (a => a)) : (a: number) => number +>f.toString(), (a => a) : (a: number) => number +>f.toString() : any +>f.toString : any +>f : undefined +>toString : any +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : (a: number) => void +>42 : 42 +} + +function bar2 (f?: (a: number) => void) { +>bar2 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f ||= (f.toString(), (a => a)) +>f ||= (f.toString(), (a => a)) : (a: number) => void +>f : ((a: number) => void) | undefined +>(f.toString(), (a => a)) : (a: number) => number +>f.toString(), (a => a) : (a: number) => number +>f.toString() : any +>f.toString : any +>f : undefined +>toString : any +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : (a: number) => void +>42 : 42 +} + +function bar3 (f?: (a: number) => void) { +>bar3 : (f?: ((a: number) => void) | undefined) => void +>f : ((a: number) => void) | undefined +>a : number + + f &&= (f.toString(), (a => a)) +>f &&= (f.toString(), (a => a)) : ((a: number) => number) | undefined +>f : ((a: number) => void) | undefined +>(f.toString(), (a => a)) : (a: number) => number +>f.toString(), (a => a) : (a: number) => number +>f.toString() : string +>f.toString : () => string +>f : (a: number) => void +>toString : () => string +>(a => a) : (a: number) => number +>a => a : (a: number) => number +>a : number +>a : number + + f(42) +>f(42) : void +>f : ((a: number) => void) | undefined +>42 : 42 +} + diff --git a/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt index 8e9760990b033..4cebb69c82120 100644 --- a/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts (4 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts (4 errors) ==== function foo1 (f?: (a: number) => void) { f ??= (a => a) f(42) diff --git a/tests/baselines/reference/logicalAssignment5(target=esnext).symbols b/tests/baselines/reference/logicalAssignment5(target=esnext).symbols index 5862d6b68d406..4d42e5f178c2c 100644 --- a/tests/baselines/reference/logicalAssignment5(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment5(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : Symbol(foo1, Decl(logicalAssignment5.ts, 0, 0)) >f : Symbol(f, Decl(logicalAssignment5.ts, 0, 15)) diff --git a/tests/baselines/reference/logicalAssignment5(target=esnext).types b/tests/baselines/reference/logicalAssignment5(target=esnext).types index 6ffb9b65a123e..620d9bc4a6dc5 100644 --- a/tests/baselines/reference/logicalAssignment5(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment5(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { >foo1 : (f?: ((a: number) => void) | undefined) => void >f : ((a: number) => void) | undefined diff --git a/tests/baselines/reference/logicalAssignment6(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment6(target=es2015).errors.txt index 4f9f330f507fb..b91cfd7a857ad 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment6(target=es2015).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= (results1 ||= [])).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment6(target=es2015).js b/tests/baselines/reference/logicalAssignment6(target=es2015).js index 5b002760a2ebc..e412b90f04283 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2015).js +++ b/tests/baselines/reference/logicalAssignment6(target=es2015).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= (results1 &&= [])).push(100); -} +} + //// [logicalAssignment6.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment6(target=es2015).symbols b/tests/baselines/reference/logicalAssignment6(target=es2015).symbols index d91ebbaa4508d..dea02cf71e9f6 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment6(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment6.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment6.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment6.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment6(target=es2015).types b/tests/baselines/reference/logicalAssignment6(target=es2015).types index 3cf295045a6d9..859429027ad83 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment6(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -55,3 +55,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment6(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment6(target=es2020).errors.txt index 4f9f330f507fb..b91cfd7a857ad 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment6(target=es2020).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= (results1 ||= [])).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment6(target=es2020).js b/tests/baselines/reference/logicalAssignment6(target=es2020).js index 4d8032ddb8e2e..3a8eefc044f53 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2020).js +++ b/tests/baselines/reference/logicalAssignment6(target=es2020).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= (results1 &&= [])).push(100); -} +} + //// [logicalAssignment6.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment6(target=es2020).symbols b/tests/baselines/reference/logicalAssignment6(target=es2020).symbols index d91ebbaa4508d..dea02cf71e9f6 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment6(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment6.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment6.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment6.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment6(target=es2020).types b/tests/baselines/reference/logicalAssignment6(target=es2020).types index 3cf295045a6d9..859429027ad83 100644 --- a/tests/baselines/reference/logicalAssignment6(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment6(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -55,3 +55,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment6(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment6(target=es2021).errors.txt new file mode 100644 index 0000000000000..b91cfd7a857ad --- /dev/null +++ b/tests/baselines/reference/logicalAssignment6(target=es2021).errors.txt @@ -0,0 +1,21 @@ +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. + + +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts (2 errors) ==== + function foo1(results: number[] | undefined, results1: number[] | undefined) { + (results ||= (results1 ||= [])).push(100); + } + + function foo2(results: number[] | undefined, results1: number[] | undefined) { + (results ??= (results1 ??= [])).push(100); + } + + function foo3(results: number[] | undefined, results1: number[] | undefined) { + (results &&= (results1 &&= [])).push(100); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2532: Object is possibly 'undefined'. + ~~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment6(target=es2021).js b/tests/baselines/reference/logicalAssignment6(target=es2021).js new file mode 100644 index 0000000000000..9fedbd43dd4b8 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment6(target=es2021).js @@ -0,0 +1,25 @@ +//// [logicalAssignment6.ts] +function foo1(results: number[] | undefined, results1: number[] | undefined) { + (results ||= (results1 ||= [])).push(100); +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { + (results ??= (results1 ??= [])).push(100); +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { + (results &&= (results1 &&= [])).push(100); +} + + +//// [logicalAssignment6.js] +"use strict"; +function foo1(results, results1) { + (results ||= (results1 ||= [])).push(100); +} +function foo2(results, results1) { + (results ??= (results1 ??= [])).push(100); +} +function foo3(results, results1) { + (results &&= (results1 &&= [])).push(100); +} diff --git a/tests/baselines/reference/logicalAssignment6(target=es2021).symbols b/tests/baselines/reference/logicalAssignment6(target=es2021).symbols new file mode 100644 index 0000000000000..dea02cf71e9f6 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment6(target=es2021).symbols @@ -0,0 +1,37 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === +function foo1(results: number[] | undefined, results1: number[] | undefined) { +>foo1 : Symbol(foo1, Decl(logicalAssignment6.ts, 0, 0)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 0, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 0, 44)) + + (results ||= (results1 ||= [])).push(100); +>(results ||= (results1 ||= [])).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 0, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 0, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { +>foo2 : Symbol(foo2, Decl(logicalAssignment6.ts, 2, 1)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 4, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 4, 44)) + + (results ??= (results1 ??= [])).push(100); +>(results ??= (results1 ??= [])).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 4, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 4, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { +>foo3 : Symbol(foo3, Decl(logicalAssignment6.ts, 6, 1)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 8, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 8, 44)) + + (results &&= (results1 &&= [])).push(100); +>(results &&= (results1 &&= [])).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment6.ts, 8, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment6.ts, 8, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + diff --git a/tests/baselines/reference/logicalAssignment6(target=es2021).types b/tests/baselines/reference/logicalAssignment6(target=es2021).types new file mode 100644 index 0000000000000..859429027ad83 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment6(target=es2021).types @@ -0,0 +1,58 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === +function foo1(results: number[] | undefined, results1: number[] | undefined) { +>foo1 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results ||= (results1 ||= [])).push(100); +>(results ||= (results1 ||= [])).push(100) : number +>(results ||= (results1 ||= [])).push : (...items: number[]) => number +>(results ||= (results1 ||= [])) : number[] +>results ||= (results1 ||= []) : number[] +>results : number[] | undefined +>(results1 ||= []) : number[] +>results1 ||= [] : number[] +>results1 : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { +>foo2 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results ??= (results1 ??= [])).push(100); +>(results ??= (results1 ??= [])).push(100) : number +>(results ??= (results1 ??= [])).push : (...items: number[]) => number +>(results ??= (results1 ??= [])) : number[] +>results ??= (results1 ??= []) : number[] +>results : number[] | undefined +>(results1 ??= []) : number[] +>results1 ??= [] : number[] +>results1 : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { +>foo3 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results &&= (results1 &&= [])).push(100); +>(results &&= (results1 &&= [])).push(100) : number +>(results &&= (results1 &&= [])).push : (...items: never[]) => number +>(results &&= (results1 &&= [])) : never[] | undefined +>results &&= (results1 &&= []) : never[] | undefined +>results : number[] | undefined +>(results1 &&= []) : never[] | undefined +>results1 &&= [] : never[] | undefined +>results1 : number[] | undefined +>[] : never[] +>push : (...items: never[]) => number +>100 : 100 +} + diff --git a/tests/baselines/reference/logicalAssignment6(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment6(target=esnext).errors.txt index 4f9f330f507fb..b91cfd7a857ad 100644 --- a/tests/baselines/reference/logicalAssignment6(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment6(target=esnext).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts(10,42): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= (results1 ||= [])).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts(10,42): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment6(target=esnext).js b/tests/baselines/reference/logicalAssignment6(target=esnext).js index 9d209c9e30159..9fedbd43dd4b8 100644 --- a/tests/baselines/reference/logicalAssignment6(target=esnext).js +++ b/tests/baselines/reference/logicalAssignment6(target=esnext).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= (results1 &&= [])).push(100); -} +} + //// [logicalAssignment6.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment6(target=esnext).symbols b/tests/baselines/reference/logicalAssignment6(target=esnext).symbols index d91ebbaa4508d..dea02cf71e9f6 100644 --- a/tests/baselines/reference/logicalAssignment6(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment6(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment6.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment6.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment6.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment6(target=esnext).types b/tests/baselines/reference/logicalAssignment6(target=esnext).types index 3cf295045a6d9..859429027ad83 100644 --- a/tests/baselines/reference/logicalAssignment6(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment6(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -55,3 +55,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment7(target=es2015).errors.txt index a4fb410eef7cc..dcce2596e3448 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment7(target=es2015).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= results1 ||= []).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment7(target=es2015).js b/tests/baselines/reference/logicalAssignment7(target=es2015).js index a0f67c80e53b3..55625d0716a2f 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2015).js +++ b/tests/baselines/reference/logicalAssignment7(target=es2015).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= results1 &&= []).push(100); -} +} + //// [logicalAssignment7.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment7(target=es2015).symbols b/tests/baselines/reference/logicalAssignment7(target=es2015).symbols index 7bde5161df5a7..5e180352f3b41 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment7(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment7.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment7.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment7.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2015).types b/tests/baselines/reference/logicalAssignment7(target=es2015).types index 250fb4072f508..ae1031dcedbd8 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment7(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -52,3 +52,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment7(target=es2020).errors.txt index a4fb410eef7cc..dcce2596e3448 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment7(target=es2020).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= results1 ||= []).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment7(target=es2020).js b/tests/baselines/reference/logicalAssignment7(target=es2020).js index 38a14a64191e4..728a19b816122 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2020).js +++ b/tests/baselines/reference/logicalAssignment7(target=es2020).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= results1 &&= []).push(100); -} +} + //// [logicalAssignment7.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment7(target=es2020).symbols b/tests/baselines/reference/logicalAssignment7(target=es2020).symbols index 7bde5161df5a7..5e180352f3b41 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment7(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment7.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment7.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment7.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2020).types b/tests/baselines/reference/logicalAssignment7(target=es2020).types index 250fb4072f508..ae1031dcedbd8 100644 --- a/tests/baselines/reference/logicalAssignment7(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment7(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -52,3 +52,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment7(target=es2021).errors.txt new file mode 100644 index 0000000000000..dcce2596e3448 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment7(target=es2021).errors.txt @@ -0,0 +1,21 @@ +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. + + +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts (2 errors) ==== + function foo1(results: number[] | undefined, results1: number[] | undefined) { + (results ||= results1 ||= []).push(100); + } + + function foo2(results: number[] | undefined, results1: number[] | undefined) { + (results ??= results1 ??= []).push(100); + } + + function foo3(results: number[] | undefined, results1: number[] | undefined) { + (results &&= results1 &&= []).push(100); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2532: Object is possibly 'undefined'. + ~~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment7(target=es2021).js b/tests/baselines/reference/logicalAssignment7(target=es2021).js new file mode 100644 index 0000000000000..0149f954ec18f --- /dev/null +++ b/tests/baselines/reference/logicalAssignment7(target=es2021).js @@ -0,0 +1,25 @@ +//// [logicalAssignment7.ts] +function foo1(results: number[] | undefined, results1: number[] | undefined) { + (results ||= results1 ||= []).push(100); +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { + (results ??= results1 ??= []).push(100); +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { + (results &&= results1 &&= []).push(100); +} + + +//// [logicalAssignment7.js] +"use strict"; +function foo1(results, results1) { + (results ||= results1 ||= []).push(100); +} +function foo2(results, results1) { + (results ??= results1 ??= []).push(100); +} +function foo3(results, results1) { + (results &&= results1 &&= []).push(100); +} diff --git a/tests/baselines/reference/logicalAssignment7(target=es2021).symbols b/tests/baselines/reference/logicalAssignment7(target=es2021).symbols new file mode 100644 index 0000000000000..5e180352f3b41 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment7(target=es2021).symbols @@ -0,0 +1,37 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === +function foo1(results: number[] | undefined, results1: number[] | undefined) { +>foo1 : Symbol(foo1, Decl(logicalAssignment7.ts, 0, 0)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 0, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 0, 44)) + + (results ||= results1 ||= []).push(100); +>(results ||= results1 ||= []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 0, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 0, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { +>foo2 : Symbol(foo2, Decl(logicalAssignment7.ts, 2, 1)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 4, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 4, 44)) + + (results ??= results1 ??= []).push(100); +>(results ??= results1 ??= []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 4, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 4, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { +>foo3 : Symbol(foo3, Decl(logicalAssignment7.ts, 6, 1)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 8, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 8, 44)) + + (results &&= results1 &&= []).push(100); +>(results &&= results1 &&= []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment7.ts, 8, 14)) +>results1 : Symbol(results1, Decl(logicalAssignment7.ts, 8, 44)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + diff --git a/tests/baselines/reference/logicalAssignment7(target=es2021).types b/tests/baselines/reference/logicalAssignment7(target=es2021).types new file mode 100644 index 0000000000000..ae1031dcedbd8 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment7(target=es2021).types @@ -0,0 +1,55 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === +function foo1(results: number[] | undefined, results1: number[] | undefined) { +>foo1 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results ||= results1 ||= []).push(100); +>(results ||= results1 ||= []).push(100) : number +>(results ||= results1 ||= []).push : (...items: number[]) => number +>(results ||= results1 ||= []) : number[] +>results ||= results1 ||= [] : number[] +>results : number[] | undefined +>results1 ||= [] : number[] +>results1 : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo2(results: number[] | undefined, results1: number[] | undefined) { +>foo2 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results ??= results1 ??= []).push(100); +>(results ??= results1 ??= []).push(100) : number +>(results ??= results1 ??= []).push : (...items: number[]) => number +>(results ??= results1 ??= []) : number[] +>results ??= results1 ??= [] : number[] +>results : number[] | undefined +>results1 ??= [] : number[] +>results1 : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo3(results: number[] | undefined, results1: number[] | undefined) { +>foo3 : (results: number[] | undefined, results1: number[] | undefined) => void +>results : number[] | undefined +>results1 : number[] | undefined + + (results &&= results1 &&= []).push(100); +>(results &&= results1 &&= []).push(100) : number +>(results &&= results1 &&= []).push : (...items: never[]) => number +>(results &&= results1 &&= []) : never[] | undefined +>results &&= results1 &&= [] : never[] | undefined +>results : number[] | undefined +>results1 &&= [] : never[] | undefined +>results1 : number[] | undefined +>[] : never[] +>push : (...items: never[]) => number +>100 : 100 +} + diff --git a/tests/baselines/reference/logicalAssignment7(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment7(target=esnext).errors.txt index a4fb410eef7cc..dcce2596e3448 100644 --- a/tests/baselines/reference/logicalAssignment7(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment7(target=esnext).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts(10,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts (2 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts (2 errors) ==== function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= results1 ||= []).push(100); } @@ -17,4 +17,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts(10,40): e !!! error TS2532: Object is possibly 'undefined'. ~~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment7(target=esnext).js b/tests/baselines/reference/logicalAssignment7(target=esnext).js index 1b83f24c7affd..0149f954ec18f 100644 --- a/tests/baselines/reference/logicalAssignment7(target=esnext).js +++ b/tests/baselines/reference/logicalAssignment7(target=esnext).js @@ -9,7 +9,8 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= results1 &&= []).push(100); -} +} + //// [logicalAssignment7.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment7(target=esnext).symbols b/tests/baselines/reference/logicalAssignment7(target=esnext).symbols index 7bde5161df5a7..5e180352f3b41 100644 --- a/tests/baselines/reference/logicalAssignment7(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment7(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : Symbol(foo1, Decl(logicalAssignment7.ts, 0, 0)) >results : Symbol(results, Decl(logicalAssignment7.ts, 0, 14)) @@ -34,3 +34,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >results1 : Symbol(results1, Decl(logicalAssignment7.ts, 8, 44)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment7(target=esnext).types b/tests/baselines/reference/logicalAssignment7(target=esnext).types index 250fb4072f508..ae1031dcedbd8 100644 --- a/tests/baselines/reference/logicalAssignment7(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment7(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts === function foo1(results: number[] | undefined, results1: number[] | undefined) { >foo1 : (results: number[] | undefined, results1: number[] | undefined) => void >results : number[] | undefined @@ -52,3 +52,4 @@ function foo3(results: number[] | undefined, results1: number[] | undefined) { >push : (...items: never[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment8(target=es2015).errors.txt index 82b49d50c3e51..16247f2d73c69 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment8(target=es2015).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts (1 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts (1 errors) ==== declare const bar: { value?: number[] } | undefined function foo1(results: number[] | undefined) { @@ -16,4 +16,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): er (results &&= bar?.value ?? []).push(100); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment8(target=es2015).js b/tests/baselines/reference/logicalAssignment8(target=es2015).js index 3d32063651e40..6b71dbf8350b7 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2015).js +++ b/tests/baselines/reference/logicalAssignment8(target=es2015).js @@ -11,7 +11,8 @@ function foo2(results: number[] | undefined) { function foo3(results: number[] | undefined) { (results &&= bar?.value ?? []).push(100); -} +} + //// [logicalAssignment8.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment8(target=es2015).symbols b/tests/baselines/reference/logicalAssignment8(target=es2015).symbols index e92c95fa8915d..952c2f77add72 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2015).symbols +++ b/tests/baselines/reference/logicalAssignment8(target=es2015).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) @@ -41,3 +41,4 @@ function foo3(results: number[] | undefined) { >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2015).types b/tests/baselines/reference/logicalAssignment8(target=es2015).types index 5c9de4aecdbcf..ad2740ed3442d 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment8(target=es2015).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : { value?: number[] | undefined; } | undefined >value : number[] | undefined @@ -59,3 +59,4 @@ function foo3(results: number[] | undefined) { >push : (...items: number[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment8(target=es2020).errors.txt index 82b49d50c3e51..16247f2d73c69 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment8(target=es2020).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts (1 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts (1 errors) ==== declare const bar: { value?: number[] } | undefined function foo1(results: number[] | undefined) { @@ -16,4 +16,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): er (results &&= bar?.value ?? []).push(100); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment8(target=es2020).js b/tests/baselines/reference/logicalAssignment8(target=es2020).js index 6d8a806979a7f..bca5efda01325 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2020).js +++ b/tests/baselines/reference/logicalAssignment8(target=es2020).js @@ -11,7 +11,8 @@ function foo2(results: number[] | undefined) { function foo3(results: number[] | undefined) { (results &&= bar?.value ?? []).push(100); -} +} + //// [logicalAssignment8.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment8(target=es2020).symbols b/tests/baselines/reference/logicalAssignment8(target=es2020).symbols index e92c95fa8915d..952c2f77add72 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2020).symbols +++ b/tests/baselines/reference/logicalAssignment8(target=es2020).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) @@ -41,3 +41,4 @@ function foo3(results: number[] | undefined) { >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2020).types b/tests/baselines/reference/logicalAssignment8(target=es2020).types index 5c9de4aecdbcf..ad2740ed3442d 100644 --- a/tests/baselines/reference/logicalAssignment8(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment8(target=es2020).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : { value?: number[] | undefined; } | undefined >value : number[] | undefined @@ -59,3 +59,4 @@ function foo3(results: number[] | undefined) { >push : (...items: number[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment8(target=es2021).errors.txt new file mode 100644 index 0000000000000..16247f2d73c69 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment8(target=es2021).errors.txt @@ -0,0 +1,20 @@ +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. + + +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts (1 errors) ==== + declare const bar: { value?: number[] } | undefined + + function foo1(results: number[] | undefined) { + (results ||= bar?.value ?? []).push(100); + } + + function foo2(results: number[] | undefined) { + (results ??= bar?.value ?? []).push(100); + } + + function foo3(results: number[] | undefined) { + (results &&= bar?.value ?? []).push(100); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2532: Object is possibly 'undefined'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment8(target=es2021).js b/tests/baselines/reference/logicalAssignment8(target=es2021).js new file mode 100644 index 0000000000000..4c92b87b46338 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment8(target=es2021).js @@ -0,0 +1,27 @@ +//// [logicalAssignment8.ts] +declare const bar: { value?: number[] } | undefined + +function foo1(results: number[] | undefined) { + (results ||= bar?.value ?? []).push(100); +} + +function foo2(results: number[] | undefined) { + (results ??= bar?.value ?? []).push(100); +} + +function foo3(results: number[] | undefined) { + (results &&= bar?.value ?? []).push(100); +} + + +//// [logicalAssignment8.js] +"use strict"; +function foo1(results) { + (results ||= bar?.value ?? []).push(100); +} +function foo2(results) { + (results ??= bar?.value ?? []).push(100); +} +function foo3(results) { + (results &&= bar?.value ?? []).push(100); +} diff --git a/tests/baselines/reference/logicalAssignment8(target=es2021).symbols b/tests/baselines/reference/logicalAssignment8(target=es2021).symbols new file mode 100644 index 0000000000000..952c2f77add72 --- /dev/null +++ b/tests/baselines/reference/logicalAssignment8(target=es2021).symbols @@ -0,0 +1,44 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === +declare const bar: { value?: number[] } | undefined +>bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) +>value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) + +function foo1(results: number[] | undefined) { +>foo1 : Symbol(foo1, Decl(logicalAssignment8.ts, 0, 51)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 2, 14)) + + (results ||= bar?.value ?? []).push(100); +>(results ||= bar?.value ?? []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 2, 14)) +>bar?.value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) +>value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo2(results: number[] | undefined) { +>foo2 : Symbol(foo2, Decl(logicalAssignment8.ts, 4, 1)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 6, 14)) + + (results ??= bar?.value ?? []).push(100); +>(results ??= bar?.value ?? []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 6, 14)) +>bar?.value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) +>value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + +function foo3(results: number[] | undefined) { +>foo3 : Symbol(foo3, Decl(logicalAssignment8.ts, 8, 1)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 10, 14)) + + (results &&= bar?.value ?? []).push(100); +>(results &&= bar?.value ?? []).push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>results : Symbol(results, Decl(logicalAssignment8.ts, 10, 14)) +>bar?.value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) +>value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +} + diff --git a/tests/baselines/reference/logicalAssignment8(target=es2021).types b/tests/baselines/reference/logicalAssignment8(target=es2021).types new file mode 100644 index 0000000000000..ad2740ed3442d --- /dev/null +++ b/tests/baselines/reference/logicalAssignment8(target=es2021).types @@ -0,0 +1,62 @@ +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === +declare const bar: { value?: number[] } | undefined +>bar : { value?: number[] | undefined; } | undefined +>value : number[] | undefined + +function foo1(results: number[] | undefined) { +>foo1 : (results: number[] | undefined) => void +>results : number[] | undefined + + (results ||= bar?.value ?? []).push(100); +>(results ||= bar?.value ?? []).push(100) : number +>(results ||= bar?.value ?? []).push : (...items: number[]) => number +>(results ||= bar?.value ?? []) : number[] +>results ||= bar?.value ?? [] : number[] +>results : number[] | undefined +>bar?.value ?? [] : number[] +>bar?.value : number[] | undefined +>bar : { value?: number[] | undefined; } | undefined +>value : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo2(results: number[] | undefined) { +>foo2 : (results: number[] | undefined) => void +>results : number[] | undefined + + (results ??= bar?.value ?? []).push(100); +>(results ??= bar?.value ?? []).push(100) : number +>(results ??= bar?.value ?? []).push : (...items: number[]) => number +>(results ??= bar?.value ?? []) : number[] +>results ??= bar?.value ?? [] : number[] +>results : number[] | undefined +>bar?.value ?? [] : number[] +>bar?.value : number[] | undefined +>bar : { value?: number[] | undefined; } | undefined +>value : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + +function foo3(results: number[] | undefined) { +>foo3 : (results: number[] | undefined) => void +>results : number[] | undefined + + (results &&= bar?.value ?? []).push(100); +>(results &&= bar?.value ?? []).push(100) : number +>(results &&= bar?.value ?? []).push : (...items: number[]) => number +>(results &&= bar?.value ?? []) : number[] | undefined +>results &&= bar?.value ?? [] : number[] | undefined +>results : number[] | undefined +>bar?.value ?? [] : number[] +>bar?.value : number[] | undefined +>bar : { value?: number[] | undefined; } | undefined +>value : number[] | undefined +>[] : never[] +>push : (...items: number[]) => number +>100 : 100 +} + diff --git a/tests/baselines/reference/logicalAssignment8(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment8(target=esnext).errors.txt index 82b49d50c3e51..16247f2d73c69 100644 --- a/tests/baselines/reference/logicalAssignment8(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment8(target=esnext).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts(12,5): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts (1 errors) ==== +==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts (1 errors) ==== declare const bar: { value?: number[] } | undefined function foo1(results: number[] | undefined) { @@ -16,4 +16,5 @@ tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts(12,5): er (results &&= bar?.value ?? []).push(100); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/logicalAssignment8(target=esnext).js b/tests/baselines/reference/logicalAssignment8(target=esnext).js index 64c9fa99337a6..4c92b87b46338 100644 --- a/tests/baselines/reference/logicalAssignment8(target=esnext).js +++ b/tests/baselines/reference/logicalAssignment8(target=esnext).js @@ -11,7 +11,8 @@ function foo2(results: number[] | undefined) { function foo3(results: number[] | undefined) { (results &&= bar?.value ?? []).push(100); -} +} + //// [logicalAssignment8.js] "use strict"; diff --git a/tests/baselines/reference/logicalAssignment8(target=esnext).symbols b/tests/baselines/reference/logicalAssignment8(target=esnext).symbols index e92c95fa8915d..952c2f77add72 100644 --- a/tests/baselines/reference/logicalAssignment8(target=esnext).symbols +++ b/tests/baselines/reference/logicalAssignment8(target=esnext).symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : Symbol(bar, Decl(logicalAssignment8.ts, 0, 13)) >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) @@ -41,3 +41,4 @@ function foo3(results: number[] | undefined) { >value : Symbol(value, Decl(logicalAssignment8.ts, 0, 20)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } + diff --git a/tests/baselines/reference/logicalAssignment8(target=esnext).types b/tests/baselines/reference/logicalAssignment8(target=esnext).types index 5c9de4aecdbcf..ad2740ed3442d 100644 --- a/tests/baselines/reference/logicalAssignment8(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment8(target=esnext).types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts === declare const bar: { value?: number[] } | undefined >bar : { value?: number[] | undefined; } | undefined >value : number[] | undefined @@ -59,3 +59,4 @@ function foo3(results: number[] | undefined) { >push : (...items: number[]) => number >100 : 100 } + diff --git a/tests/baselines/reference/logicalAssignment9.symbols b/tests/baselines/reference/logicalAssignment9.symbols index b22586c0afdc5..f2c2ebcccfcb7 100644 --- a/tests/baselines/reference/logicalAssignment9.symbols +++ b/tests/baselines/reference/logicalAssignment9.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment9.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment9.ts === declare let x: { a?: boolean }; >x : Symbol(x, Decl(logicalAssignment9.ts, 0, 11)) >a : Symbol(a, Decl(logicalAssignment9.ts, 0, 16)) diff --git a/tests/baselines/reference/logicalAssignment9.types b/tests/baselines/reference/logicalAssignment9.types index ea2d6f84ed7a8..76062618efb9e 100644 --- a/tests/baselines/reference/logicalAssignment9.types +++ b/tests/baselines/reference/logicalAssignment9.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/esnext/logicalAssignment/logicalAssignment9.ts === +=== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment9.ts === declare let x: { a?: boolean }; >x : { a?: boolean | undefined; } >a : boolean | undefined diff --git a/tests/baselines/reference/parser.numericSeparators.binary.symbols b/tests/baselines/reference/parser.numericSeparators.binary.symbols index 548836c3a3a52..fd24dd4df6019 100644 --- a/tests/baselines/reference/parser.numericSeparators.binary.symbols +++ b/tests/baselines/reference/parser.numericSeparators.binary.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binary.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts === 0b00_11; No type information for this code.0B0_1; No type information for this code.0b1100_0011; diff --git a/tests/baselines/reference/parser.numericSeparators.binary.types b/tests/baselines/reference/parser.numericSeparators.binary.types index 44a859385f048..45f9a8ef358f2 100644 --- a/tests/baselines/reference/parser.numericSeparators.binary.types +++ b/tests/baselines/reference/parser.numericSeparators.binary.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binary.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts === 0b00_11; >0b00_11 : 3 diff --git a/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt index 93118bc9c7fb7..a1c51539cd0dd 100644 --- a/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'B0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'B0101'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ==== 0b00_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ==== 0b_110 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (3 errors) ==== 0_B0101 ~ !!! error TS6188: Numeric separators are not allowed here. @@ -29,17 +29,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ~~~~~ !!! error TS2304: Cannot find name 'B0101'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (1 errors) ==== 0b01__11 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ==== 0B0110_0110__ ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (3 errors) ==== 0b___0111010_0101_1 ~ !!! error TS6188: Numeric separators are not allowed here. diff --git a/tests/baselines/reference/parser.numericSeparators.binaryNegative.js b/tests/baselines/reference/parser.numericSeparators.binaryNegative.js index b6cce556f780d..6056e35418c0c 100644 --- a/tests/baselines/reference/parser.numericSeparators.binaryNegative.js +++ b/tests/baselines/reference/parser.numericSeparators.binaryNegative.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binaryNegative.ts] //// +//// [tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binaryNegative.ts] //// //// [1.ts] 0b00_ diff --git a/tests/baselines/reference/parser.numericSeparators.binaryNegative.symbols b/tests/baselines/reference/parser.numericSeparators.binaryNegative.symbols index a637eaa687a54..3605b2f942481 100644 --- a/tests/baselines/reference/parser.numericSeparators.binaryNegative.symbols +++ b/tests/baselines/reference/parser.numericSeparators.binaryNegative.symbols @@ -1,19 +1,19 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0b00_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0b_110 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_B0101 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0b01__11 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0B0110_0110__ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0b___0111010_0101_1 No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.binaryNegative.types b/tests/baselines/reference/parser.numericSeparators.binaryNegative.types index 14747bae17c38..495fd9fab0b62 100644 --- a/tests/baselines/reference/parser.numericSeparators.binaryNegative.types +++ b/tests/baselines/reference/parser.numericSeparators.binaryNegative.types @@ -1,25 +1,25 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0b00_ >0b00_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0b_110 >0b_110 : 6 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_B0101 >0_ : 0 >B0101 : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0b01__11 >0b01__11 : 7 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0B0110_0110__ >0B0110_0110__ : 102 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0b___0111010_0101_1 >0b___0111010_0101_1 : 1867 diff --git a/tests/baselines/reference/parser.numericSeparators.decimal.symbols b/tests/baselines/reference/parser.numericSeparators.decimal.symbols index 0e0cf2d17421b..3dca38ab535e1 100644 --- a/tests/baselines/reference/parser.numericSeparators.decimal.symbols +++ b/tests/baselines/reference/parser.numericSeparators.decimal.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decimal.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts === 1_000_000_000 No type information for this code.1.1_00_01 No type information for this code.1e1_0 diff --git a/tests/baselines/reference/parser.numericSeparators.decimal.types b/tests/baselines/reference/parser.numericSeparators.decimal.types index f8537553dd016..f254c9721e655 100644 --- a/tests/baselines/reference/parser.numericSeparators.decimal.types +++ b/tests/baselines/reference/parser.numericSeparators.decimal.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decimal.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts === 1_000_000_000 >1_000_000_000 : 1000000000 diff --git a/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt index 8e48e7c1750e6..52c0581246a99 100644 --- a/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt @@ -1,328 +1,328 @@ -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,1): error TS2304: Cannot find name '_10'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts(1,1): error TS2304: Cannot find name '_0'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts(1,3): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts(1,8): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts(1,1): error TS2304: Cannot find name '_0'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts(1,3): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts(1,7): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts(1,1): error TS2304: Cannot find name '_0'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts(1,3): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts(1,7): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts(1,1): error TS1128: Declaration or statement expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts(1,2): error TS2304: Cannot find name '_'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts(1,2): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts(1,2): error TS2304: Cannot find name '\u005F01234'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/49.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/49.ts(1,6): error TS1124: Digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts(1,6): error TS1124: Digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/51.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,1): error TS2304: Cannot find name '_10'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts(1,1): error TS2304: Cannot find name '_0'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts(1,3): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts(1,6): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts(1,8): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts(1,6): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts(1,1): error TS2304: Cannot find name '_0'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts(1,3): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts(1,7): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts(1,6): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts(1,1): error TS2304: Cannot find name '_0'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts(1,3): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts(1,7): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts(1,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts(1,2): error TS2304: Cannot find name '_'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts(1,2): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts(1,2): error TS2304: Cannot find name '\u005F01234'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts(1,6): error TS1124: Digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts(1,6): error TS1124: Digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts(1,3): error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ==== _10 ~~~ !!! error TS2304: Cannot find name '_10'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ==== 10_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (1 errors) ==== 1__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (1 errors) ==== 0_.0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ==== 0._0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (1 errors) ==== 0.0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts (1 errors) ==== 0.0__ ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts (1 errors) ==== 0_e0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts (1 errors) ==== 0e_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts (1 errors) ==== 0e0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts (1 errors) ==== 0e0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts (1 errors) ==== 0_.0e0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts (1 errors) ==== 0._0e0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts (1 errors) ==== 0.0_e0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts (1 errors) ==== 0.0e_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts (2 errors) ==== _0.0e0 ~~ !!! error TS2304: Cannot find name '_0'. ~~~~ !!! error TS1005: ';' expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts (1 errors) ==== 0.0e0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts (1 errors) ==== 0__0.0e0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts (1 errors) ==== 0.0__0e0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts (1 errors) ==== 0.00e0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts (1 errors) ==== 0_e+0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts (1 errors) ==== 0e+_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts (1 errors) ==== 0e+0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts (1 errors) ==== 0e+0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts (1 errors) ==== 0_.0e+0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts (1 errors) ==== 0._0e+0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts (1 errors) ==== 0.0_e+0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts (1 errors) ==== 0.0e+_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts (2 errors) ==== _0.0e+0 ~~ !!! error TS2304: Cannot find name '_0'. ~~~~~ !!! error TS1005: ';' expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts (1 errors) ==== 0.0e+0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts (1 errors) ==== 0__0.0e+0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts (1 errors) ==== 0.0__0e+0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts (1 errors) ==== 0.00e+0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts (1 errors) ==== 0_e+0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts (1 errors) ==== 0e-_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts (1 errors) ==== 0e-0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts (1 errors) ==== 0e-0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts (1 errors) ==== 0_.0e-0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts (1 errors) ==== 0._0e-0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts (1 errors) ==== 0.0_e-0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts (1 errors) ==== 0.0e-_0 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts (2 errors) ==== _0.0e-0 ~~ !!! error TS2304: Cannot find name '_0'. ~~~~~ !!! error TS1005: ';' expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts (1 errors) ==== 0.0e-0_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts (1 errors) ==== 0__0.0e-0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts (1 errors) ==== 0.0__0e-0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts (1 errors) ==== 0.00e-0__0 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts (2 errors) ==== ._ ~ !!! error TS1128: Declaration or statement expected. ~ !!! error TS2304: Cannot find name '_'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts (2 errors) ==== 1\u005F01234 ~~~~~~~~~~~ !!! error TS1005: ';' expected. ~~~~~~~~~~~ !!! error TS2304: Cannot find name '\u005F01234'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/49.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts (2 errors) ==== 1.0e_+10 ~ !!! error TS6188: Numeric separators are not allowed here. !!! error TS1124: Digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts (2 errors) ==== 1.0e_-10 ~ !!! error TS6188: Numeric separators are not allowed here. !!! error TS1124: Digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/51.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts (1 errors) ==== 0._ ~ !!! error TS6188: Numeric separators are not allowed here. diff --git a/tests/baselines/reference/parser.numericSeparators.decmialNegative.js b/tests/baselines/reference/parser.numericSeparators.decmialNegative.js index 2ccffcc146067..9a4c02ba3b16a 100644 --- a/tests/baselines/reference/parser.numericSeparators.decmialNegative.js +++ b/tests/baselines/reference/parser.numericSeparators.decmialNegative.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decmialNegative.ts] //// +//// [tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decmialNegative.ts] //// //// [1.ts] _10 diff --git a/tests/baselines/reference/parser.numericSeparators.decmialNegative.symbols b/tests/baselines/reference/parser.numericSeparators.decmialNegative.symbols index daa418358b988..bcfd1533c30dc 100644 --- a/tests/baselines/reference/parser.numericSeparators.decmialNegative.symbols +++ b/tests/baselines/reference/parser.numericSeparators.decmialNegative.symbols @@ -1,154 +1,154 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === _10 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 10_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 1__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0_.0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0._0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0.0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts === 0.0__ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts === 0_e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts === 0e_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts === 0e0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts === 0e0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts === 0_.0e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts === 0._0e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts === 0.0_e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts === 0.0e_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts === _0.0e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts === 0.0e0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts === 0__0.0e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts === 0.0__0e0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts === 0.00e0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts === 0_e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts === 0e+_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts === 0e+0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts === 0e+0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts === 0_.0e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts === 0._0e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts === 0.0_e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts === 0.0e+_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts === _0.0e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts === 0.0e+0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts === 0__0.0e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts === 0.0__0e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts === 0.00e+0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts === 0_e+0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts === 0e-_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts === 0e-0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts === 0e-0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts === 0_.0e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts === 0._0e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts === 0.0_e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts === 0.0e-_0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts === _0.0e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts === 0.0e-0_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts === 0__0.0e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts === 0.0__0e-0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts === 0.00e-0__0 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts === ._ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts === 1\u005F01234 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/49.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts === 1.0e_+10 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts === 1.0e_-10 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/51.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts === 0._ No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.decmialNegative.types b/tests/baselines/reference/parser.numericSeparators.decmialNegative.types index 84ab9b585b90e..be9ee142b7caa 100644 --- a/tests/baselines/reference/parser.numericSeparators.decmialNegative.types +++ b/tests/baselines/reference/parser.numericSeparators.decmialNegative.types @@ -1,212 +1,212 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === _10 >_10 : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 10_ >10_ : 10 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 1__0 >1__0 : 10 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0_.0 >0_.0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0._0 >0._0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0.0__0 >0.0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts === 0.0__ >0.0__ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts === 0_e0 >0_e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts === 0e_0 >0e_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts === 0e0_ >0e0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts === 0e0__0 >0e0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts === 0_.0e0 >0_.0e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts === 0._0e0 >0._0e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts === 0.0_e0 >0.0_e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts === 0.0e_0 >0.0e_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts === _0.0e0 >_0 : any >.0e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts === 0.0e0_ >0.0e0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts === 0__0.0e0 >0__0.0e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts === 0.0__0e0 >0.0__0e0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts === 0.00e0__0 >0.00e0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts === 0_e+0 >0_e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts === 0e+_0 >0e+_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts === 0e+0_ >0e+0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts === 0e+0__0 >0e+0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts === 0_.0e+0 >0_.0e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts === 0._0e+0 >0._0e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts === 0.0_e+0 >0.0_e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts === 0.0e+_0 >0.0e+_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts === _0.0e+0 >_0 : any >.0e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts === 0.0e+0_ >0.0e+0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts === 0__0.0e+0 >0__0.0e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts === 0.0__0e+0 >0.0__0e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts === 0.00e+0__0 >0.00e+0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts === 0_e+0 >0_e+0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts === 0e-_0 >0e-_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts === 0e-0_ >0e-0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts === 0e-0__0 >0e-0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts === 0_.0e-0 >0_.0e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts === 0._0e-0 >0._0e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts === 0.0_e-0 >0.0_e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts === 0.0e-_0 >0.0e-_0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts === _0.0e-0 >_0 : any >.0e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts === 0.0e-0_ >0.0e-0_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts === 0__0.0e-0 >0__0.0e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts === 0.0__0e-0 >0.0__0e-0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts === 0.00e-0__0 >0.00e-0__0 : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts === ._ >_ : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts === 1\u005F01234 >1 : 1 >\u005F01234 : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/49.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts === 1.0e_+10 >1.0e_+10 : number >1.0e_ : 1 >10 : 10 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts === 1.0e_-10 >1.0e_-10 : number >1.0e_ : 1 >10 : 10 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/51.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts === 0._ >0._ : 0 diff --git a/tests/baselines/reference/parser.numericSeparators.hex.symbols b/tests/baselines/reference/parser.numericSeparators.hex.symbols index 9c8a5176cdae0..6ebbb0a3b4095 100644 --- a/tests/baselines/reference/parser.numericSeparators.hex.symbols +++ b/tests/baselines/reference/parser.numericSeparators.hex.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hex.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts === 0x00_11; No type information for this code.0X0_1; No type information for this code.0x1100_0011; diff --git a/tests/baselines/reference/parser.numericSeparators.hex.types b/tests/baselines/reference/parser.numericSeparators.hex.types index 25830f414b1b3..8d430361794a5 100644 --- a/tests/baselines/reference/parser.numericSeparators.hex.types +++ b/tests/baselines/reference/parser.numericSeparators.hex.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hex.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts === 0x00_11; >0x00_11 : 17 diff --git a/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt index c6048a1bbfb4c..b2146e0fd38ea 100644 --- a/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'X0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'X0101'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ==== 0x00_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ==== 0x_110 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (3 errors) ==== 0_X0101 ~ !!! error TS6188: Numeric separators are not allowed here. @@ -29,17 +29,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ~~~~~ !!! error TS2304: Cannot find name 'X0101'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (1 errors) ==== 0x01__11 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ==== 0X0110_0110__ ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (3 errors) ==== 0x___0111010_0101_1 ~ !!! error TS6188: Numeric separators are not allowed here. diff --git a/tests/baselines/reference/parser.numericSeparators.hexNegative.js b/tests/baselines/reference/parser.numericSeparators.hexNegative.js index 8ac48fcb144b1..450b1ac4054c0 100644 --- a/tests/baselines/reference/parser.numericSeparators.hexNegative.js +++ b/tests/baselines/reference/parser.numericSeparators.hexNegative.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hexNegative.ts] //// +//// [tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hexNegative.ts] //// //// [1.ts] 0x00_ diff --git a/tests/baselines/reference/parser.numericSeparators.hexNegative.symbols b/tests/baselines/reference/parser.numericSeparators.hexNegative.symbols index f69f51519fb1a..eacbed235dab0 100644 --- a/tests/baselines/reference/parser.numericSeparators.hexNegative.symbols +++ b/tests/baselines/reference/parser.numericSeparators.hexNegative.symbols @@ -1,19 +1,19 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0x00_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0x_110 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_X0101 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0x01__11 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0X0110_0110__ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0x___0111010_0101_1 No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.hexNegative.types b/tests/baselines/reference/parser.numericSeparators.hexNegative.types index fa48c933bdc0a..52ca86eb808b1 100644 --- a/tests/baselines/reference/parser.numericSeparators.hexNegative.types +++ b/tests/baselines/reference/parser.numericSeparators.hexNegative.types @@ -1,25 +1,25 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0x00_ >0x00_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0x_110 >0x_110 : 272 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_X0101 >0_ : 0 >X0101 : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0x01__11 >0x01__11 : 273 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0X0110_0110__ >0X0110_0110__ : 17826064 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0x___0111010_0101_1 >0x___0111010_0101_1 : 1172542853137 diff --git a/tests/baselines/reference/parser.numericSeparators.octal.symbols b/tests/baselines/reference/parser.numericSeparators.octal.symbols index a69900ae50f1a..6b479ce696a0f 100644 --- a/tests/baselines/reference/parser.numericSeparators.octal.symbols +++ b/tests/baselines/reference/parser.numericSeparators.octal.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octal.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts === 0o00_11; No type information for this code.0O0_1; No type information for this code.0o1100_0011; diff --git a/tests/baselines/reference/parser.numericSeparators.octal.types b/tests/baselines/reference/parser.numericSeparators.octal.types index 18f0b5bd0f23b..2a020865661c4 100644 --- a/tests/baselines/reference/parser.numericSeparators.octal.types +++ b/tests/baselines/reference/parser.numericSeparators.octal.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octal.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts === 0o00_11; >0o00_11 : 9 diff --git a/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt index ebdec3371aa64..4b9c7c5741f0e 100644 --- a/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'O0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'O0101'. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ==== 0o00_ ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ==== 0o_110 ~ !!! error TS6188: Numeric separators are not allowed here. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (3 errors) ==== 0_O0101 ~ !!! error TS6188: Numeric separators are not allowed here. @@ -29,17 +29,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ~~~~~ !!! error TS2304: Cannot find name 'O0101'. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (1 errors) ==== 0o01__11 ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ==== 0O0110_0110__ ~ !!! error TS6189: Multiple consecutive numeric separators are not permitted. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (3 errors) ==== 0o___0111010_0101_1 ~ !!! error TS6188: Numeric separators are not allowed here. diff --git a/tests/baselines/reference/parser.numericSeparators.octalNegative.js b/tests/baselines/reference/parser.numericSeparators.octalNegative.js index d265869d1e48a..34c729aeebf7e 100644 --- a/tests/baselines/reference/parser.numericSeparators.octalNegative.js +++ b/tests/baselines/reference/parser.numericSeparators.octalNegative.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octalNegative.ts] //// +//// [tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octalNegative.ts] //// //// [1.ts] 0o00_ diff --git a/tests/baselines/reference/parser.numericSeparators.octalNegative.symbols b/tests/baselines/reference/parser.numericSeparators.octalNegative.symbols index 212331d001097..0157379b4dbf0 100644 --- a/tests/baselines/reference/parser.numericSeparators.octalNegative.symbols +++ b/tests/baselines/reference/parser.numericSeparators.octalNegative.symbols @@ -1,19 +1,19 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0o00_ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0o_110 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_O0101 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0o01__11 No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0O0110_0110__ No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0o___0111010_0101_1 No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.octalNegative.types b/tests/baselines/reference/parser.numericSeparators.octalNegative.types index 5479030d794a5..08adf4e4bdf11 100644 --- a/tests/baselines/reference/parser.numericSeparators.octalNegative.types +++ b/tests/baselines/reference/parser.numericSeparators.octalNegative.types @@ -1,25 +1,25 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === 0o00_ >0o00_ : 0 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === 0o_110 >0o_110 : 72 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === 0_O0101 >0_ : 0 >O0101 : any -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === 0o01__11 >0o01__11 : 73 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === 0O0110_0110__ >0O0110_0110__ : 294984 -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === 0o___0111010_0101_1 >0o___0111010_0101_1 : 1224999433 diff --git a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.errors.txt b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.errors.txt index 6ba8c2efdf75a..abe6e24373616 100644 --- a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.errors.txt @@ -1,236 +1,236 @@ -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts(1,4): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts(1,11): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts(1,11): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts(1,11): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts(1,7): error TS1199: Unterminated Unicode escape sequence. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts(1,5): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts(1,6): error TS1125: Hexadecimal digit expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts(1,4): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts(1,11): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts(1,11): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts(1,11): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts(1,7): error TS1199: Unterminated Unicode escape sequence. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts(1,5): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts(1,6): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts(1,5): error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ==== "\u{10_ffff}" !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ==== '\u{10_ffff}' !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (1 errors) ==== `\u{10_ffff}` !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (0 errors) ==== /\u{10_ffff}/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ==== "\uff_ff" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (1 errors) ==== '\uff_ff' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts (1 errors) ==== `\uff_ff` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts (0 errors) ==== /\uff_ff/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts (1 errors) ==== "\xf_f" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts (1 errors) ==== '\xf_f' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts (1 errors) ==== `\xf_f` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts (0 errors) ==== /\xf_f/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts (1 errors) ==== "\u{_10ffff}" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts (1 errors) ==== '\u{_10ffff}' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts (1 errors) ==== `\u{_10ffff}` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts (0 errors) ==== /\u{_10ffff}/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts (1 errors) ==== "\u_ffff" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts (1 errors) ==== '\u_ffff' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts (1 errors) ==== `\u_ffff` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts (0 errors) ==== /\u_ffff/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts (1 errors) ==== "\x_ff" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts (1 errors) ==== '\x_ff' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts (1 errors) ==== `\x_ff` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts (0 errors) ==== /\x_ff/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts (1 errors) ==== "\u{10ffff_}" !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts (1 errors) ==== '\u{10ffff_}' !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts (1 errors) ==== `\u{10ffff_}` !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts (0 errors) ==== /\u{10ffff_}/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts (0 errors) ==== "\uffff_" -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts (0 errors) ==== '\uffff_' -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts (0 errors) ==== `\uffff_` -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts (0 errors) ==== /\uffff_/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts (0 errors) ==== "\xff_" -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts (0 errors) ==== '\xff_' -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts (0 errors) ==== `\xff_` -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts (0 errors) ==== /\xff_/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts (1 errors) ==== "\u{10__ffff}" !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts (1 errors) ==== '\u{10__ffff}' !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts (1 errors) ==== `\u{10__ffff}` !!! error TS1199: Unterminated Unicode escape sequence. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts (0 errors) ==== /\u{10__ffff}/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts (1 errors) ==== "\uff__ff" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts (1 errors) ==== '\uff__ff' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts (1 errors) ==== `\uff__ff` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts (0 errors) ==== /\uff__ff/u -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts (1 errors) ==== "\xf__f" !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts (1 errors) ==== '\xf__f' !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts (1 errors) ==== `\xf__f` !!! error TS1125: Hexadecimal digit expected. -==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts (0 errors) ==== +==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts (0 errors) ==== /\xf__f/u \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.js b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.js index 8e19ba9994913..13e8f2403e216 100644 --- a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.js +++ b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.unicodeEscape.ts] //// +//// [tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.unicodeEscape.ts] //// //// [1.ts] "\u{10_ffff}" diff --git a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.symbols b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.symbols index 908e05065a7ff..86584c432e975 100644 --- a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.symbols +++ b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.symbols @@ -1,145 +1,145 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === "\u{10_ffff}" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === '\u{10_ffff}' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === `\u{10_ffff}` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === /\u{10_ffff}/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === "\uff_ff" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === '\uff_ff' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts === `\uff_ff` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts === /\uff_ff/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts === "\xf_f" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts === '\xf_f' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts === `\xf_f` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts === /\xf_f/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts === "\u{_10ffff}" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts === '\u{_10ffff}' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts === `\u{_10ffff}` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts === /\u{_10ffff}/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts === "\u_ffff" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts === '\u_ffff' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts === `\u_ffff` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts === /\u_ffff/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts === "\x_ff" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts === '\x_ff' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts === `\x_ff` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts === /\x_ff/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts === "\u{10ffff_}" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts === '\u{10ffff_}' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts === `\u{10ffff_}` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts === /\u{10ffff_}/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts === "\uffff_" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts === '\uffff_' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts === `\uffff_` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts === /\uffff_/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts === "\xff_" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts === '\xff_' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts === `\xff_` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts === /\xff_/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts === "\u{10__ffff}" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts === '\u{10__ffff}' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts === `\u{10__ffff}` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts === /\u{10__ffff}/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts === "\uff__ff" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts === '\uff__ff' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts === `\uff__ff` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts === /\uff__ff/u No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts === "\xf__f" No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts === '\xf__f' No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts === `\xf__f` No type information for this code. -No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts === +No type information for this code.=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts === /\xf__f/u No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.types b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.types index 052fc3c09cd76..6eeaec715b664 100644 --- a/tests/baselines/reference/parser.numericSeparators.unicodeEscape.types +++ b/tests/baselines/reference/parser.numericSeparators.unicodeEscape.types @@ -1,192 +1,192 @@ -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts === "\u{10_ffff}" >"\u{10_ffff}" : "_ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts === '\u{10_ffff}' >'\u{10_ffff}' : "_ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts === `\u{10_ffff}` >`\u{10_ffff}` : "_ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts === /\u{10_ffff}/u >/\u{10_ffff}/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts === "\uff_ff" >"\uff_ff" : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts === '\uff_ff' >'\uff_ff' : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts === `\uff_ff` >`\uff_ff` : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts === /\uff_ff/u >/\uff_ff/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts === "\xf_f" >"\xf_f" : "_f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts === '\xf_f' >'\xf_f' : "_f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts === `\xf_f` >`\xf_f` : "_f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts === /\xf_f/u >/\xf_f/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts === "\u{_10ffff}" >"\u{_10ffff}" : "_10ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts === '\u{_10ffff}' >'\u{_10ffff}' : "_10ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts === `\u{_10ffff}` >`\u{_10ffff}` : "_10ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts === /\u{_10ffff}/u >/\u{_10ffff}/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts === "\u_ffff" >"\u_ffff" : "_ffff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts === '\u_ffff' >'\u_ffff' : "_ffff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts === `\u_ffff` >`\u_ffff` : "_ffff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts === /\u_ffff/u >/\u_ffff/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts === "\x_ff" >"\x_ff" : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts === '\x_ff' >'\x_ff' : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts === `\x_ff` >`\x_ff` : "_ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts === /\x_ff/u >/\x_ff/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts === "\u{10ffff_}" >"\u{10ffff_}" : "_}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts === '\u{10ffff_}' >'\u{10ffff_}' : "_}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts === `\u{10ffff_}` >`\u{10ffff_}` : "_}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts === /\u{10ffff_}/u >/\u{10ffff_}/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts === "\uffff_" >"\uffff_" : "￿_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts === '\uffff_' >'\uffff_' : "￿_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts === `\uffff_` >`\uffff_` : "￿_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts === /\uffff_/u >/\uffff_/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts === "\xff_" >"\xff_" : "ÿ_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts === '\xff_' >'\xff_' : "ÿ_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts === `\xff_` >`\xff_` : "ÿ_" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts === /\xff_/u >/\xff_/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts === "\u{10__ffff}" >"\u{10__ffff}" : "__ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts === '\u{10__ffff}' >'\u{10__ffff}' : "__ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts === `\u{10__ffff}` >`\u{10__ffff}` : "__ffff}" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/40.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts === /\u{10__ffff}/u >/\u{10__ffff}/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts === "\uff__ff" >"\uff__ff" : "__ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts === '\uff__ff' >'\uff__ff' : "__ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts === `\uff__ff` >`\uff__ff` : "__ff" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts === /\uff__ff/u >/\uff__ff/u : RegExp -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts === "\xf__f" >"\xf__f" : "__f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts === '\xf__f' >'\xf__f' : "__f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts === `\xf__f` >`\xf__f` : "__f" -=== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts === +=== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts === /\xf__f/u >/\xf__f/u : RegExp diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 0eeaea8431cd5..add44c4a37748 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 6db38567dd9b8..8f6dfb272db94 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 5658355879292..5f20390286c24 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 01173fdad2063..f88c76a526ca8 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index a9788c05c5c04..449723ad6367f 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 469b0fae31c22..f7039bfbca288 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 0eeaea8431cd5..add44c4a37748 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 45d5717e35f3a..d6c803e36c930 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 4701983aad879..48811f1681bb0 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tsc/runWithoutArgs/initial-build/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/runWithoutArgs/initial-build/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index 9f4c962a20c64..362d9209ea89e 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/initial-build/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/initial-build/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -23,10 +23,10 @@ Options: --init Initializes a TypeScript project and creates a tsconfig.json file. -p FILE OR DIRECTORY, --project FILE OR DIRECTORY Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'. -b, --build Build one or more projects and their dependencies, if out of date - -t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. + -t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. -m KIND, --module KIND Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. --lib Specify library files to be included in the compilation. - 'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'es2019' 'es2020' 'esnext' 'dom' 'dom.iterable' 'webworker' 'webworker.importscripts' 'webworker.iterable' 'scripthost' 'es2015.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellknown' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'es2017.typedarrays' 'es2018.asyncgenerator' 'es2018.asynciterable' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'es2019.array' 'es2019.object' 'es2019.string' 'es2019.symbol' 'es2020.bigint' 'es2020.promise' 'es2020.sharedmemory' 'es2020.string' 'es2020.symbol.wellknown' 'es2020.intl' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 'esnext.string' 'esnext.promise' 'esnext.weakref' + 'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'es2019' 'es2020' 'es2021' 'esnext' 'dom' 'dom.iterable' 'webworker' 'webworker.importscripts' 'webworker.iterable' 'scripthost' 'es2015.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellknown' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'es2017.typedarrays' 'es2018.asyncgenerator' 'es2018.asynciterable' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'es2019.array' 'es2019.object' 'es2019.string' 'es2019.symbol' 'es2020.bigint' 'es2020.promise' 'es2020.sharedmemory' 'es2020.string' 'es2020.symbol.wellknown' 'es2020.intl' 'es2021.promise' 'es2021.string' 'es2021.weakref' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 'esnext.string' 'esnext.promise' 'esnext.weakref' --allowJs Allow javascript files to be compiled. --jsx KIND Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. -d, --declaration Generates corresponding '.d.ts' file. diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index 78263fcf39d99..fa56b5062e6e3 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index c676199b9da6b..0585c1897c8cd 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index e1971370dca8f..bcaad992e4d0b 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index 67a64e87262eb..d55d9057910a0 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js index 2b5b1f5dbdd34..a1f3ef05d3f72 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index 6c61ff127dbd0..051cd4e2ed9db 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -25,7 +25,7 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts b/tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts index 897c4e8e5dcbd..fdff373fee882 100644 --- a/tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts +++ b/tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts @@ -40,7 +40,9 @@ const testStringMatchAll = "".matchAll(); const testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); const testBigInt = BigInt(123); -// esnext +// es2021 const testPromiseAny = Promise.any([]); const testStringReplaceAll = "".replaceAll(); -const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); \ No newline at end of file + +// esnext +const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts similarity index 90% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts index cb1b51369e6d3..283cf7d752921 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment1.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 declare let a: string | undefined declare let b: string | undefined declare let c: string | undefined diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts similarity index 72% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts index 11c98cea77860..3a83ab8085ae7 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment10.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment10.ts @@ -1,4 +1,4 @@ -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 var count = 0; var obj = {}; diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts similarity index 92% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts index 30bd5b9254df5..19d0b6862293f 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment2.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 interface A { foo: { bar(): { diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts similarity index 84% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts index ea6085ece8023..d52c40303e415 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment3.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 interface A { baz: 0 | 1 | 42 | undefined | '' } diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts similarity index 96% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts index bb13be7db6bb5..a1c9883f8b23b 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment4.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 // @allowUnreachableCode: false function foo1(results: number[] | undefined) { @@ -49,4 +49,4 @@ function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue defaultValue.name; } } -} \ No newline at end of file +} diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts similarity index 92% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts index f9e4317b8ee84..1fdc638062deb 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 function foo1 (f?: (a: number) => void) { f ??= (a => a) diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts similarity index 89% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts index 3fa7987f72081..aab964b1e925c 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment6.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment6.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= (results1 ||= [])).push(100); @@ -11,4 +11,4 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= (results1 &&= [])).push(100); -} \ No newline at end of file +} diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts similarity index 89% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts index 78812fa0b73f6..b4d97e81bb91b 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment7.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment7.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 function foo1(results: number[] | undefined, results1: number[] | undefined) { (results ||= results1 ||= []).push(100); @@ -11,4 +11,4 @@ function foo2(results: number[] | undefined, results1: number[] | undefined) { function foo3(results: number[] | undefined, results1: number[] | undefined) { (results &&= results1 &&= []).push(100); -} \ No newline at end of file +} diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts similarity index 88% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts index 15fe3b74b5e53..2e0ba2af76e32 100644 --- a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment8.ts +++ b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment8.ts @@ -1,5 +1,5 @@ // @strict: true -// @target: esnext, es2020, es2015 +// @target: esnext, es2021, es2020, es2015 declare const bar: { value?: number[] } | undefined @@ -13,4 +13,4 @@ function foo2(results: number[] | undefined) { function foo3(results: number[] | undefined) { (results &&= bar?.value ?? []).push(100); -} \ No newline at end of file +} diff --git a/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment9.ts b/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment9.ts similarity index 100% rename from tests/cases/conformance/esnext/logicalAssignment/logicalAssignment9.ts rename to tests/cases/conformance/es2021/logicalAssignment/logicalAssignment9.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binary.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binary.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binaryNegative.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binaryNegative.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binaryNegative.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binaryNegative.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decimal.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decimal.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decmialNegative.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decmialNegative.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decmialNegative.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decmialNegative.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hex.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hex.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hexNegative.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hexNegative.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hexNegative.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hexNegative.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octal.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octal.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octalNegative.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octalNegative.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octalNegative.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octalNegative.ts diff --git a/tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.unicodeEscape.ts b/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.unicodeEscape.ts similarity index 100% rename from tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.unicodeEscape.ts rename to tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.unicodeEscape.ts